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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Control Codes

Status
Not open for further replies.

bobbarker

Programmer
Dec 20, 2001
83
0
0
GB
Have a customer with a bespoke label printing utility written in Foxpro 2.6 DOS.

They are changing their label printer and the programme needs to be updated to include the new printers control codes.

The old code went along the lines of

SET CONSOLE OFF
SET PRINTER TO "LPT2"
??? "2"+"911002"+"0168"+"0384"+"TEXT TO SEND"+CHR(13) &&Where "TEXT TO SEND" is the text to print, all other are control codes
SET MEMOWIDTH TO 25
SET CONSOLE ON

The new printer is a Zebra LP-2844-Z. Not sure if I have got the controls codes but have obtained a manual called "ZPLII Programming Guide" where example to send text to printer is "^FO20,10^AFN,56,30^FDTEXT TO PRINT^FS". I have tried to include this in my code (for example ??? "^FO20,10^AFN,56,30^FDTEXT TO PRINT^FS" + CHR(13)) but it just seems to output the whole string rather just "TEXT TO PRINT".

Does anyone have any suggestions what to do and where to look?

Thanks in advance
 
Usually, the caret character (^) is used to indicate an ASCII control character. So a couple of examples are:
Code:
^F   ACK  chr(6)
^A   SOH  chr(1)
^B   STX  chr(2)
^C   ETX  chr(3)
...
^J   LF   chr(10)
^M   CR   chr(13)
^[   ESC  chr(27)
Just do a Google search on 'ASCII characters', and you find a number of charts. e.g.
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top