Acknowledge reply (ack) – Compuprint 4247-Z03 Programmer Manual User Manual

Page 102

Advertising
background image

Acknowledge Reply (ACK)

The printer uses the Acknowledge Reply to return device status, sense information, and any additionally
requested information to the host application program.

The application program uses the Acknowledge data to maintain control of the printing application and to
initiate error recovery actions when necessary.

The format for the Acknowledge Reply is:

Length

D6FF

Flag

Data

or

Length

D6FF

Flag

Correlation ID

Data

The printer sends an acknowledgment:

v

Whenever the acknowledgment required bit in the flag byte is on

v

Whenever the printer detects a command stream error or device error and a negative response must be
sent.

A negative reply (NACK), if required, has priority over a positive reply (ACK).

Length

Length is the total length of the ACK reply, including this field. The maximum length of this command is
255 bytes. If there is a five-byte command header (no correlation ID present), the data field can be up to
250 bytes long. If a correlation ID is present in the header, the maximum data field length is 248 bytes.

D6FF

D6FF in the command ID field indicates this is an Acknowledge Reply from the printer to the host.

Flag

Flag is a one-byte field that specifies the flags for this command. Bits 1, 2, and 7 are the only bits used in
this byte. All other bits are reserved and must be zeros. If bit 1 is BX'1', a Correlation ID is present in this
command. If bit 1 is BX'0', no Correlation ID is present. If bit 2 is B'1', the response can be continued in a
later Acknowledge Reply. If bit 2 is B'0', the response is complete in this Acknowledge Reply.

Correlation ID

Correlation ID is a two-byte field that contains the identifier from a previously received command, such as
Sense Type and Model. If the printer receives a command that requires an Acknowledgment Reply, and if
that command contains a correlation ID, the printer also includes the same correlation ID in its
corresponding field. Also, if an error occurs and the printer can recognize the command that caused the
error, the printer includes the correlation ID of that command in the NACK.

Data

Acknowledgement Type

Page/Copy Counters

Special Data (SD)

82

Programmer Manual

Advertising
This manual is related to the following products: