Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

<ESC> sequence for printer 2

Status
Not open for further replies.

nbucska

Electrical
Jun 1, 2000
2,191
On the EPSON printer &quot;<ESC>G&quot; commands double print
Similarly different <ESC>???? seqences mean different
other commands.

Is there any way to find out the different control codes
for other printers ? Or at least find a character
sequence which would be interpreted by any printer
as &quot;NO-OP&quot; ?


<nbucska@pcperipherals.com>
 
Replies continue below

Recommended for you

You need to refer to the various printer manuels for each model. They are not standard often even within a single manufacturer's product family!
 
If the printer is recent, it may support PCL at some level. That stands for Page Composition Language, and it started with what HP had for its LaserJet III, I believe. The purpose was to address the evolving problem of different printers each having its own set of escape codes. Coming to a standard simplifies drivers and other software. So, check the printer documentation to see if it supports PCL, and if it does then do a Google search for a site (such as HP's) that will provide the various codes. Or you can look up Epson's site for the information.

PCL is a bit confusing at first for some things, but once you get the hang of it, the essentials aren't too bad. I had to do this a while back so I could assemble a stream of &quot;RAW&quot; data to a printer under Windows, from a Fortran program. I posted this on the Lahey.com web site under their &quot;Code Repository&quot; if you are interested.
 
Back in the days of yore, when more than doctor's offices had dot matrix printers, there was a book that listed control codes for a variety of printers.

I had that book, but it's been so long since it's been useful that I haven't a clue where it is or what the exact title was.

Barring that, you might just have to hunt through the various manufacturer sites for the printer manuals.



TTFN
 
What nbucska originally mentioned, is called EscPOS standard. It is a printer commandset, specified by Epson, for point of sale system printers.

This standard includes many formatting commands, as well as some specific POS related commands like cutting receipts, printing bar codes and opening cash drawers attached to the printer. It is quite standard for POS printers. Many manufacturers support this standard, including many non-POS devices. However, most use a subset, or a superset of the commands.

I cannot remember any no-op command in EscPOS. But unsupported commands are ignored by the printer. That may behave like no-op.

I do have some documents on EscPOS. If you need further info, you can contact me.

Regards

Yeasir Rahul
VoltSmith Technologies
Industrial Automation and Data Acquisition
Code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Phone: (880)-2-8125296               ~
~ Cell : (880)-19-355436               ~
~ Fax  : (880)-2-8116655               ~
~ Email: rahul@voltsmith.com           ~
~ Web  : [URL unfurl="true"]www.voltsmith.com[/URL]             ~
~                                      ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor