1 DATECS
DPP-350
Programmer’s manual VER.1.50
20
•
If command
ESC >
with argument > 0 was executed since last
ESC u
command, then this is
the print direction.
•
If command
ESC <
was executed after this, the print direction is changed to the opposite.
The command is supported starting from version 1.42.
38.
Reading magnetic stripe card (
ESC ?
)
Code:
[1Bh] + [3Fh] + n
The tracks that are read are returned in ascending order and depending on that which of them have
been demanded. The returned data end with ASCII code 00h.
The bits of the argument
n
have the following meaning:
0
Read track 1
1
Read track 2
2
Read track 3
3
Not used
4
Not used
5
Not used
6
If it is 1, magnetic stripe card data are returned in raw format (as a bit sequence)
7
If it is 1, the reading is with time-out 60 seconds, else it is 10 seconds.
Response data format when bit 6 = 1
Always all 3 tracks data are returned (independent of the value of the least significant bits of
n
). Data
format:
n
1
m
1
D
1i
n
2
m
2
D
2i
n
3
m
3
D
3i
[00h]
where:
n
1
Two characters - track 1 bytes count.
m
1
Two characters - valid bit count in last data byte of track 1.
D
1i
2*n1
characters, containing track 1 data. Data are regarded as bit sequence. If total bit count is
not a multiple of 8, then valid are
m
1
most significant bits of last byte only.
n
1
,
m
1
and
D
1i
are returned as text, hexadecimal, i. e. every byte of data is returned as two characters in
the range ‘
0
’ – ‘
9
’ or ‘
A
’ – ‘
F
’.
The format of track 2 and 3 is the same. The response ends with ASCII code
00h
. If no magnetic stripe
card is read (a timeout has occurred), only
00h
is returned.
39.
Initializing the printer (
ESC @
)
Code:
[1Bh] + [40h]
Clears data stored in the print buffer and brings various settings to the initial state (Default state).
Data (items) in serial buffer are not cleared.
40.
Black mark mode sensor calibration (ESC CAL)
Code:
[1Bh] + [43h] + [41h] + [4Ch] + n
Selects the ADC value, which the printer uses to distinguish the black marks on paper or labels. The
command is used in black mark mode only.
Possible values for
n
:
01h
Returns one byte, which is the current ADC threshold value.
Warning!
Data are returned as they are read from the magnetic stripe card. They will not be the same when
sliding the card in left and right direction. The application software must “know” and interpret correctly
the bits read before using them!