PDA

View Full Version : Sending printer "Esc/Pos" commands



Kman
- 25th June 2007, 01:59
I have a serial reciept printer, Its working fine with normal text. using the Serial out command.

I would like to use some of the advance features like the "Underline, Double-strike" modes.

The ansi commands are "ESC -" ( 1B 2D hex) to turn underline mode on/off, and "ESC G" ( 1B 47 hex) to Turn double-strike mode on/off.

How can I send the commands using SerOut ?
Help Please

skimask
- 25th June 2007, 04:56
I have a serial reciept printer, Its working fine with normal text. using the Serial out command.
I would like to use some of the advance features like the "Underline, Double-strike" modes.
The ansi commands are "ESC -" ( 1B 2D hex) to turn underline mode on/off, and "ESC G" ( 1B 47 hex) to Turn double-strike mode on/off.
How can I send the commands using SerOut ?
Help Please

Have you tried something silly, such as, oh, I don't know...checking the manual for syntax?

serout seroutpin, n2400, [ 27 , 45 ] -there's your underline mode on/off

You figure out the rest...

Kman
- 25th June 2007, 20:17
Thanks Skimask, the printer was defaulting to a special mode that would not eccept any "Esc" commands. Sending a $28 hex put the printer into a navative mode witch im getting a few of the commands to work.

I Think I found a use for that 12c508a ( send FS command when the printer powers up )

Kman