Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1061
  • Last Modified:

Controlling a Com Port without using the MSCOMM control.

I have an application, written in Access 2002 & VBA. I plan on redistributing this application using the access runtime.

I need to be able to output to a pole display hooked up to a comm port. I don't want to use the mscomm method because after reading some things about it, I think it will cause too much grief.

Using Open and Write to the comm port won't work as far as I know because I also want to send configuration commands to the display, not just text.

I would prefer being able to communicate directly using the correct driver. Honestly, I'm not sure exactly what to do here.

Here's what I need to do, someone can hopefully guide me in the right direction :->

On program startup, using VBA, I need to be able to configure the pole display correctly, in case something has gone wrong.
  I need to reset the display
  Set the Comm port
  Set the Baud Rate
  Set the Parity
  Set the Command Type (although I'm not even sure which command type to use)

During program operation I need to be able to
  Send text to the display
  Clear the display

The Pole Display I am using is a PartnerTech CD7220. It’s hooked up via USB, but winds up communicating through one of the computer’s comm ports.

I've exhausted every avenue with Partner Tech. Although they were very nice, they didn't know much about using the display with Access.

One more thing - if anything I've stated above about not being able to do, is in-correct, please let me know.

Thanks.

Brian


0
bselltiz
Asked:
bselltiz
  • 4
  • 3
2 Solutions
 
ArjiCommented:
Most of the serial devices I've talked to use character strings to communicate in either direction.  Often times, it's a character command followed by a hexadecimal value.  In the past these were referred to as escape sequences.  With that in mind, using Open and write should be appropriate.  You would Open and write # to a printer just like you would write to a sequential file.   Have you tried it yet?
0
 
Gustav BrockCIOCommented:
It may not be that easy.
You can save a lot of time by using a supporting dll:

http://www.marshallsoft.com/wsc4vb.htm

/gustav
0
 
ArjiCommented:
It may not but it also may.. I've had years of experience talking to serial devices like that.  You really have to look at the technical reference of the device in question to know one way or the other.  That being said, a custom comms dll is almost always an easier way but usually you have to spend money on those...like the one you referenced.
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
bselltizAuthor Commented:

cactus_data  - I have downloaded and am currently evaluating Marshall Software's DLL.


Arji - Can you give me an example of using your method, to do each of the following:

     Set Baud Rate
     Set Parity
     Set Command Type
0
 
ArjiCommented:
Let me find some of my older code and I'll get back to you but if I remember correctly it was in VB so maybe the dll would be better....I'll get back to you though.

0
 
bselltizAuthor Commented:
As long as it doesn't use the comm control, it should work in VBA, I hope.

Thanks
0
 
bselltizAuthor Commented:
Arji - any luck?
0
 
ArjiCommented:
So far none.  I have to pull it off a tape so it's kind of difficult.  But in thinking about it, I was doing that in VB a while back.  There should be VB documentation showing how to open a com port.  It was somethng like Open "Com1:, 9600, 1 ,1, Odd" as #1.  There's got to be some documentation on that somewhere.  I think I'll take a look at Googe to see if I can find it.  After Opening the port you would use the OUT method to send serial data to the device.  Something like "Out #1, HD0 & H00"......
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now