Link to home
Start Free TrialLog in
Avatar of khaled salem
khaled salemFlag for United States of America

asked on

Open cash drawer

I trying to use receipt printer (Star TSP100) connected to cash drawer. its print Ok , but I can't open cash drawer.
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image


If you use com port component send following string:

#27+#112+#48+char(30)+char(30)

where 30 is half-period of square signal.

Avatar of khaled salem

ASKER

The cash drawer is not connected directly to my PC.The Cash drawer connect via printer (STAR TSP100) after print it should be opened.


Concatenate strings and send to printer:
...
s := <text to print> + <open drawer string>;
SendToComPort(s);
...

Printer will do rest.
Avatar of olmy
olmy

If you are using TSP100 as a normal windows printer, you can define drawer to open automaticly in printer properties "Device settings"-page, by setting "Open after printing"-value into "Cash Drawer 1" parameter.

See the embedded image below.
User generated image
I hope this helps.

Best regards
  Janne
Yes, I'm using using TSP100 as a normal windows printer. but i didn't find this setting. as you see in attached image    
tsp.png
ASKER CERTIFIED SOLUTION
Avatar of olmy
olmy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

It is possible that you want to print without to open drawer. So upper solution is not ideal.
Try to send esc characters (and text) to open drawer with this function:

http://www.swissdelphicenter.ch/torry/showcode.php?id=716

olmy: Thank you very much, I've installed version 2.4 driver for TSP. I've found Open after print
Excellent! I'm glad that you found a sollution to your problem and thank you for accepting my answer :).