Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i identify the drawer status with an Epson TM printer

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hello,

I have a big problem. I want to control the printing of receipts on a Com1 conected Epson TM 88 thermal printer with ESC/POS codes. I work in a Windows2000 OS.I can open a drawer but i can't obtain the drawer status (open/closed) eather the printer status (on/off) because PRINTSTATUS( ) always returns true (.T.) in Windows. Please help me

Thank's

Bogdan Lazar

 
Some sample code for accessing serial data in VFP using MSCOMM32 can be found in the following:
- HOWTO: Receive from the Serial Port by Using MScomm32.ocx.
Also useful may be
- HOWTO: Send to the Serial Port by Using Mscomm32.ocx.
And of course,
- HOWTO: Transmit and Receive Binary Data using MSCOMM32.

If MSCOMM32 doesn't provide you with enough control, you'll need to find another 3rd party control to handle the serial communication. Remember that in the Windows environment, it controls the I/O ports - you can't do it directly - especially in WinNT and Win2000.

Rick
 
Hi,

I faces the same problem like you in controlling the POS drawer on Espon POS printer.

I had problem of senting a command to the printer to open the drawer but the printer also print some empty line,
is anyway to disable the printing, please kindly advise
 
Epson has an active X component which is supposed to control printers and other POS equipment. I believe there is an SDK on thier web site.
Hope this helps

Wayne
 
Bogdan Lazar

I had using similar printer as you under Window 2000,
I had this problem of printer printing some blank
line before opening my cashdrawer.

Do you encountered the same problem ?
I don't use any ActiveX, but ??? command
Please kindly help
 
You cannot obtain the drawer status of a cash drawer that does not return any signal. We have drawers to which we only send a signal via OPOS and the drawer opens. And that's it !
But if you try to open it again, OPOS returns that it is already open since it cannot open it again.

If a printer is busy or off line, you cannot claim it for exclusive use via OPOS. Which indicates that the printer is busy or off line.

HTH,
Weedz (Edward W.F. Veld)
My private project:Download the CrownBase source code !!
 
virusim,
I didn't notice this problem on my printers.
Here are some code lines for the drawer:
For the Epson TM90(TM88II) driver and a double drawer:
do case
case drawer=1
set printer font "control",10
?"d" && drawer number 1
case drawer=2
set printer font "control",10
?"D" && drawer number 2
endcase

For the "Generic/Text only" printer driver:
??? chr(27)+"p"+chr(0)+chr(150)+chr(250)

HTH,
Bogdan
 
Hi bogdanlz,

Thank for your help, for the Epson printer, I am running under Window 2000, with Epson TM88III and a single layer drawer. Whenever I sent the following command

??? Chr(27)+Chr(112)+Chr(0)+Chr(5)+Chr(5) using VFP6
it will print a blank line before opening my drawer, this
command work fine in my DOS POS application written in Clipper.

Even following the printer manual on using wordpad, changing
to "control","A" to sent it to the printer will cause my printer to print the blank line before opening the drawer.
I had checked that my dip switch of the printer is properly configured.



 
Hi Virusim

Try this:

procedure Myproc
set printer to name "Whatever"
set printer on
set console off
* Cash Drawer *
if Myvariable
??? chr(27)+"p"+chr(0)+chr(150)+chr(250)
endif
set printer off
set printer to
return

Turning off and on the printer maybe can help.
I run this in Windows2000 SP2 and VFP6.00 SP5 with the "Generic\Text Only" printer driver with both TM90 and TM88II. This code worked fine also under Win95 and Win98 with VFP 5.00. I'll check the deepswitch configuration today.


HTH,

Bogdan


 
Hi Bogdan,

Thank for your kind help, but your command still cause my
printer to print a blank line before opening the drawer.

I discover that ??? cause the printer to print the blank line.

Actually, I find a VCX library from UT that work for me in VFP, but when I convert it into a DLL for use with my Visual Basic application who will call this DLL, it don't work, insteads, it just print out my command.

Strange ?

Any ideal on this issue ?






 
Hi Virusim,

I checked up our printers,(all are TM90 but i know that is working with TM88) and i can't see anything wrong. Maybe you can send your code to look at it. What kind of printer driver did you used? How do you initialized your printer? It is the default printer? Is there other apps who use the same printer?

Bogdan

 

Hi,

Below are my code


SET CONSOLE OFF
SET PRINTER OFF
SET PRINTER TO LPT1
SET PRINTER ON
SET DEVICE TO PRINTER

??? chr(27)+chr(112)+chr(0)+chr(5)+chr(5)

SET CONSOLE ON
SET PRINTER OFF
SET PRINTER TO
SET DEVICE TO SCREEN

RETURN

I am using the printer driver from Epson

 
If i remember well, in the driver manual there is a command that turn the line feed off when special characters (for drawer or POS display) are printed. I will ckeck monday.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top