Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 483
  • Last Modified:

Opening a cash Drawer connected to PC using access2000

i am trying to open a cash drawer connected to a PC via a USB trigger. trigger came with a small exe file which opens the drawer when run with "RunCommand" under access 2000. however i also need to check the open/close status of the drawer. i tried using MSCOMM control but that conflicts with the orignal exe file as both try to work on the same com port.
so i think i would'nt be able to use them both together and have to open & check the status of the drawer using my own code, as the exe file provided just opens it.
i managed to track the open close staus of drawer by "mscomm1.CTSHolding" property. but cant open the drawer itself.
i have tried everything i can think of but its not working. i tried sending diff values to the port using ".output" property but with no gain. may be i am not using ".output" properly. i tried most of the code available here but cash drawer does'nt wanna open.
alternatively is there any way to use the exe file & MSCOMM together i-e (one opens the drawer one checks the status) but as i have to open port using mscomm at form load & when the exe file tries to open the drawer it finds the port alreday open.
Hope i made myself clear :)

any help appriciated THANKS
  • 2
1 Solution
could you not temporarily close the port, open cashdraw, then reopen?
Hmm, interesting problem.

Don´t you have any documentation on the codes sent to the drawer ?
When it´s similar like a printer, they would use what´s called "Escape sequences" as the printer is steered by first sending en Esc (Escape) character (CHR(27) ) followed by one or more characters as the instruction.

arkswtAuthor Commented:
thanks everybody. rockiroads ur idea was a food for thought & it worked eventually.
i know there can be abetter way of doing it as nico5038 suggested but this works for me. so i am happy :)
ok, no worries
I know its not elegant but I guess it could be considered a working alternative  

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now