Monitoring the cash drawer "Open/Close" status in vb

I am trying to write a POS program which uses an RS232 generic cash drawer PCD-005. I was able to kick open the cash drawer using some of the codes suggested here in experts exchange. I am now having problems as to how to monitor the cash drawer whether it is open or not. I tried searching through experts exchange solutions but I have no premium account and I cannot view the answers posted for a similar problem as mine. Can anyone help me?

Additional Info:
Computer Info:
    IBM
    Intel Celeron 534 Mhz
    256 MB RAM
    Windows XP Professional
fiSBoN3Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jlsjlsCommented:
First of all ; if you're writing a POS programm I'll suggest to use OPOS (see http://www.monroecs.com/posstandards.htm). Very interesting for using in VB.

Based on info at :http://www.iposltd.com/drwty5tc.html it isn't to difficult to get the position of the drawerposition.
The site mentions one can use the EPSON commands to open/close the drawer.
Maybe you can use the EPSON service objects for the Cashdrawer to steer the drawer see drivers at http://www.pos.epson-europe.com/support/drivers.htm 
0
fiSBoN3Author Commented:
I've tried all of them but none worked. Are there drawers that do not support open/close status monitoring?

Here are the codes that I used. It opens the drawer but the status monitoring doesn't work... please check what's wrong.

Dim sopen As Boolean

Private Sub Form_Load()
 ' Set and open port
 MSComm1.CommPort = 1
 MSComm1.Settings = "9600,n,8,1"
 MSComm1.PortOpen = True

 Timer1.Enabled = True
 Timer1.Interval = 1000 'change as you see fit. now set to 1 second
End Sub

Private Sub OpenDrawer_Click()
    MSComm1.Output = Chr(&H1B) + Chr(&H70) + Chr(&H0) + Chr$(&H19) + Chr$(&HFA) + Chr$(0)  'hex code

End Sub

Private Sub Timer1_Timer()

Do
    Dummy = DoEvents()
    Loop Until MSComm1.InBufferCount >= 5
If MSComm1.Input <> Chr(&H1) Then
  MsgBox "Warning Cash Drawer Is Open"
End If

End Sub
0
jlsjlsCommented:
Based on information on the website; the drawer doesn't automatically tells its position when status has changed. One need to query the position each time it's needed.
Maybe you can build into your timer, the command to get the drawerposition and then process the answer.
Most drawer don't support automatic status reporting.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.