Results 1 to 4 of 4

Thread: Bill acceptor programming - rs232

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2010
    Posts
    1

    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

  2. #2
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    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??

  3. #3
    Fanatic Member
    Join Date
    Sep 2009
    Location
    Lakewood, Colorado
    Posts
    621

    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)

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Posts
    20

    Re: Bill acceptor programming - rs232

    Quote Originally Posted by misteryman View Post
    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
  •  



Click Here to Expand Forum to Full Width