>Hello
>
>I need to build a little PRG in VFP to sending ASCII commands or equivalent in Decimal to open a POS CASHDRAWER that was connet to an EPSON TM-U220DP (LPT1 port).
>
>the manual of ESCPOS comands to Generate the Pulse is :
>
>ESC p
>EXECUTING COMMAND
>[Name] Generate pulse
>[Format] ASCII ESC p m t1 t2
>Hex 1B 70 m t1 t2
>Decimal 27 112 m t1 t2
>[Range] m = 0, 1, 48, 49
>0 ≤ t1 ≤ 255
>0 ≤ t2 ≤ 255
>[Default] None
>[Printers not featuring this command] None
>[Description] Outputs the pulse specified by t1 and t2 to the specified connector pin m as follows:
>• t1 indicates ON time and t2 indicates OFF time.
>[Notes] If m is out of range, this command is canceled and the following data is processed as normal data.
> If t2 < t1, the OFF time is equal to the ON time.
>[Model-dependent variations] TM-U950
>TM-U950
>A pulse is (ON time = t1 × 10 msec / OFF time = t2 × 10 msec).
>m Connector pin
>0, 48 Drawer kick-out connector pin 2
>1, 49 Drawer kick-out connector pin 5
>
>Program Example
>PRINT #1, CHR$(&H1B);"p";CHR$(0);CHR$(25);CHR$(250);
>
>I would like very grateful if someone could give me some help to make this PRG, because i don´t know , first , how to begin an how i can send decimal command to LPT1.
>
>Many thanks
>Luis Santos
For starters, try
SET PRINTER TO LPT1:
SET PRINTER ON
??? CHR(27)+"p"
....
SET PRINTER OFF
SET PRINTER TO
Read the help topics on these, and other printer (lpt1) commands.
Greg Reichert