|
-
Dec 21st, 2010, 01:20 PM
#1
Thread Starter
New Member
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
-
Dec 21st, 2010, 05:41 PM
#2
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
Last edited by CDRIVE; Dec 21st, 2010 at 07:03 PM.
<--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
If topic has been resolved, please pull down the Thread Tools & mark it Resolved.
Is VB consuming your life, and is that a bad thing?? 
-
Dec 22nd, 2010, 11:47 AM
#3
Fanatic Member
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
Richard Grier, Consultant, Hard & Software
Microsoft MVP (Visual Basic)
-
Dec 10th, 2012, 10:33 AM
#4
Junior Member
Re: Bill acceptor programming - rs232
 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|