Results 1 to 2 of 2

Thread: Cash Drawer.

  1. #1
    Join Date
    Feb 2009
    Posts
    29

    Unanswered: how can i detect cash drawer when it close?

    I use vb6.0 and mscomm to communicate with cash drawer RS232 connected in serial port. I can Open cashdrawer thru commands. but when i tried to detect if cash drawer is still open or not thru code i am having trouble,

    what i wanna happen is to detect cashdrawer when it close.

    have tried these codes already in MSComm1_OnComm
    ---------------------------
    If comNoOpen Then
    MsgBox "Closed"
    MSComm1.PortOpen = False
    Else
    MsgBox "Hi"
    End If
    --------------------------
    If comPortNotOpen Then
    MsgBox "Closed"
    MSComm1.PortOpen = False
    ElseIf comPortOpen Then
    MsgBox "Hi"
    End If
    --------------------------

    I havve noticed that it always return the Msgbox "Closed" even if cash drawer is open or not.
    Last edited by jerome.mercado26; 03-10-09 at 04:46.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    I'm not sure about this but you seem to be testing the status of the communication port, not the status of the cash drawer. The later one should probably be tested by the status of a line in the communication port or by receiving a message indicating that the drawer is open or closed.

    It's difficult to help you more because it mainly depends on how those functionalities are implemented at the cash drawer level.

    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •