I am running a pos system out of excel and just bought a cash drawer that connects to my usb epson tm88iv receipt printer. I know that the code I need to send to the drawer is 27 112 48 55 121 but I dont know how to code that into vba. Can someone please help. Thanks
Open cash drawer with vba code
Collapse
X
-
Sounds like you didn't get the good luck I'm afraid. Reputable suppliers would be expected to provide a driver and publish an interface (API) for their devices. It sounds like you bagged a bum one there.
You may get lucky and find someone who knows printing well enough to work out a method to send the string, but I wouldn't hold your breath. Formulating the data itself is no big deal. It's the interface that is pretty undefined that is the problem. Hence the manufacturer of the device needs to be involved I'd suggest.Comment
-
I haven't worked with a POS register in over 15 years, but those are just simple ASCII codes ie: 27 is the ESC key so chr(27).
So just build a simple string of ASCII codes and send it to the port the register is connected to. They used to be connected to a simple serial port so just sending the string to the serial port would open the register.
Hope this helps some.
cheers,Comment
-
I'm guessing from the OP that the string would need to be sent to a specific printer. This brings so much in that we have no info about that I'd hesitate to lead anyone in that direction without at least hands-on access to the project. Others more experienced at controlling printers and printing from code may find themselves in a better position to help maybe.
BTW 27 112 48 55 121 resolves to <ESC>, p, 0, 7, y or Chr(27) & "p07y".Last edited by NeoPa; Aug 12 '10, 08:06 PM.Comment
-
I guess you could open port the printer is connected to as a binary file and send the code sequence to it. Ports associated with USB devices have names like "USBnnn".
Sending plain text printer portComment
Comment