Bill acceptor programming - rs232
I might have bitten more then i can chew, nut here it goes.
I am trying to implement a bill acceptor in to my VB6 project, but i am having som problems dealing with the com port.
By now i have almost got the right settings for the comport
9600,e,7,1 - comRTSXon/of
The instruktions that i got, handels evrything in HEX and i can send the first command to activate the unit.
The problem is the response from the unit. I simply don't know how to handle the OnComm (where i gues the responce will come?)
How do you normaly handle serial communikation in HEX?
your response will be greatly appreciated
Re: Bill acceptor programming - rs232
Do a VB6 forum search for 'MSComm', 'RS232' or 'Serial Port'. There are lots of examples sending and receiving binary that you can express as a Hex value.
EDIT: Here's a link to a recent MSComm topic. Read down until it gets into Hex.
http://www.vbforums.com/forumdisplay.php?f=1
Re: Bill acceptor programming - rs232
I will add this to CDRIVE's reply. If by HEX, you mean binary data (non-text), you cannot configure the port the way that you have done. Your configuration will work only with ASCII text data. Binary data transfer requires 8-data bits, not 7. Also, if you are working with binary data you cannot use Xon/Xoff flowcontrol.
My best guess is that your bill acceptor actually outputs TEXT data, not binary. The details for implementation depend on the protocol that the manufacture specifies. By that, I mean the embedded data format, not speed, data bits and parity.
Do you have documentation for the acceptor? If so, you can provide a link, or post the communication protocol, and someone may be able to give you a more pointed response.
Dick
Re: Bill acceptor programming - rs232
Quote:
Originally Posted by
misteryman
I might have bitten more then i can chew, nut here it goes.
I am trying to implement a bill acceptor in to my VB6 project, but i am having som problems dealing with the com port.
By now i have almost got the right settings for the comport
9600,e,7,1 - comRTSXon/of
The instruktions that i got, handels evrything in HEX and i can send the first command to activate the unit.
The problem is the response from the unit. I simply don't know how to handle the OnComm (where i gues the responce will come?)
How do you normaly handle serial communikation in HEX?
your response will be greatly appreciated
caN I ask what is the first command to activate the unit?? I been having trouble with it :(