Brian Selltiz
asked on
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
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
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
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
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.
ASKER
As long as it doesn't use the comm control, it should work in VBA, I hope.
Thanks
Thanks
ASKER
Arji - any luck?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.