Print# to LTP1 and COM1 causing problems

Lizba

New member
Local time
Today, 17:12
Joined
Apr 29, 2010
Messages
9
Hi There
I need to send commands to both the Com1 (Customer/Pole display) and LTP1 (Printer and Cash drawer). I first used it for the Com1 port and it worked beautifully. Now I added the command for the Ltp1 port and this works but now the pole display doesn't work.

ie:
Open "COM1" For Output As #1
Print #1, Chr$(12); "Tendered"; Chr$(31) & Chr$(36) & Chr$(PositionB) & Chr$(1) & FormatCurrency(AmntTen, -1) & Chr$(13)
Print #1, "Change"; Chr$(31) & Chr$(36) & Chr$(PositionA) & Chr$(2) & FormatCurrency(Chnge, -1)
Close #1


and

Open "LPT1" For Output As #1
Print #1, Chr$(27); Chr$(112); Chr$(0)
Close #1

I suppose the commands are clashing somehow.
How can I adapt it so that they both work?
Lizba
 
I would try using a different filename for "LTP1:" and include the colon too.

Open "LPT1:" For Output As #2

I would have thought the preferential language for reading/writing to ports is C++?
 
Normally when sending code to ports for poles and drawers the keyboard, such as a digipos keyboard usually has escape sequences for pinging the drawer open etc. Look at the SDK that comes with it.
 
The drawer is opening properly, it is just the customer display that is not working now.
 
I am assuming that the printer is slaved directly to LPT1?

what is actually happening? or in your case Not happening.
 

Users who are viewing this thread

Back
Top Bottom