User manual
2. INTERFACES
52-
DPT100-B/I/BT
DATA [LUNG bytes] = data to be communicated to the printer.
The datafield may include both data to be printed and command characters (see
Section 3 “Printer Functions”).
ID JOB [1byte] = ID of the data packet received. The $00 value of this data field is reserved. This
number must be different for each transmission: a data packet with the same ID JOB
as the previous data packet is formally accepted (an ACK message is transmitted),
but it is not interpreted by the printer.
CKS [1byte] = Check sum of the transmitted bytes: the check sum is calculated as an 8 bit sum of
all previous fields (STX, LUNG, DATI, ID JOB)
One of three responses may be sent back to the printer: ACK, NACK and BUSY. The structure of these
responses is as follows:
etyB1etyB1etyB1
XTSEPYTSTS
STX [1byte] = $02 Start Transmission ID
TYPE [1byte] = Response type: ACK ($06), NACK ($15) and BUSY ($13))
STS [1byte] = Printer status: the byte is structured like that
tiBnO/ffOxeHlamiceDnoitcnuF
01,ffO000 tneserprepap,esolcrevoC
nO03 3 gnikrowtonrosnesrepaproneporevoC
3,2ffO000 :rosnesdne-repaP
tneserprepaP
nOC021:rosnesdne-repaP
tneserptonrepaP
4ffO000 ]devreseR[
5ffO000 tcerrocerutarepmetdaeH
nO0223rorreerutarepmetdaeH
6ffO000 tcerrocegatlovyrettaB
nO0446rorreegatlovyrettaB
7- - - ]devreseR[
An ACK response is returned in the event the entire protocol was interpreted correctly and the check sum
calculated is the same as that received by the host.
A NACK response is returned in the event of transmission errors that cause a discrepancy between the
calculated and received check sums.
A BUSY response is returned in the event the printer does not have sufficient memory to store the transmitted
data. If this response is returned, use the STS byte to find the cause that generated the BUSY condition. If
there are no errors (no paper, head overheating or incorrect electrical voltage), the BUSY message has been
generated because the buffer is full and it is necessary to wait for the buffer to empty; then change the IDJOB
field and repeat the transmission.
EXAMPLE:
To use this protocol to print the text “CUSTOM” in double height and width, send the following data to the
printer :