19
EA KIT160-6
ESC
Y
W n1 n2
Write output port
Changes the output port (
n1
=1..8 = OUT1..OUT8) to the value
n2
(0=low level; 1=high level; 2=invert port). When
n1
=0, all the outputs are output as a binary value
n2
(MSB:OUT8...OUT1:LSB); see application on page 5.
Example: $1B
$59 $57 $02
$01
Switches the output port OUT2 to high level.
ESC
Y
A
n1
Automatic port query on/off
Each change at the input port (8-bit binary value IN8..IN1) can call a port macro (0..255). This command activates
(
n1
=1) or deactivates (
n1
=0) the automatic port query. After power-on, the current port status is read and the
associated port macro executed immediately.
Example: $1B
$59 $41 $01
Activates the automatic port query and executes the associated port macro.
ESC
Y
I
n1
Invert input port
This command allows the logic of the input port to be inverted (
n1
=0 for normal or
n1
=1 for inverse). This is useful
with the optocoupler inputs, for example.
Example: $1B
$59 $49 $01
Inverts the input port logic.
ESC
Y
L
n1
LED backlight On/Off
LED backlight is switched off (
n1
=0) or permanently on (
n1
=1). At
n1
=2 backlight is inverted (on->off, off->on).
n1
=3..255 turns the backlight n1/10 sec. on and then off. Note: LED backlight is the same line as output port 8. If
you need to use output port 8 then you have to cut backlight from output 8 by changing the solder strip LB8.
Backlight will be turned on and cannot controled by software anymore.
ESC
Z
L/Z/R
x1 y1 text...
NUL
Horizontal string
Writes the string
text...
left justified (
L
), centered (
Z
) or right justified (
R
) at position
x1
taking into account the set text mode (
ESC L
). Multi-line text can also be output,
with the lines separated by the character '|' (=$7C). The string must be concluded with
NUL
= $00. Position
y1
is the upper edge of the 1st line.
Example 1: Writes the text "Left|Ok" left justified at 0,0.
$1B $5A $4C $00 $00 $4C $65 $66 $74 $7C $4F $6B $00
Example 2: Writes the text "Center|Ok" centered at 25,0.
$1B $5A $5A $19 $00 $43 $65 $6E $74 $65 $72 $7C $4F
$6B $00
Example 3: Writes the text "Right|Ok" right justified at 49,0.
$1B $5A $52 $31 $00 $52 $69 $67 $68 $74 $7C $4F $6B
$00
ESC
Z
O/M/U x1 y1 text...
NUL
Vertical string
Writes the string
text...
rotated by 90° degrees top justified (
O
), vertically centered (
M
)
or bottom justified (
U
) at position
y1
taking into account the text mode (
ESC L
). Multi-
line text can also be output, with the lines separated by the character '|' (=$7C). The
string must be concluded with
NUL
= $00. Position
x1
is the right edge of the 1st line.
Example 1: Writes the text "Top|Ok" top justified at 49,0.
$1B $5A $4F $31 $00 $54 $6F $70 $7C $4F $6B $00
Example 2: Writes the text "Mid|Ok" vertically centered at
49,15.
$1B $5A $4D $31 $0F $4D $69 $64 $7C $4F $6B $00
Example 3: Writes the text "Bot|Ok" bottom justified at
49,31.
$1B $5A $55 $31 $1F $42 $6F $74 $7C $4F $6B $00