Link to home
Create AccountLog in
Avatar of arkswt
arkswt

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
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.

Nic;o)
Avatar of arkswt
arkswt

ASKER

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