You are on page 1of 3

Programmers Guide TH230/TH230+

GS a
Function: Enable/disable Automatic Status Back (ASB)
Code ASCII: GS a n
Code HEX: 0x1D 0x61 n
Range: 0 ≤ n ≤ 255
Default: n=0
Description: Enable or disable ASB (Automatic Status Back) and specifies the status items
to include, using n as follows:
Bit Function Value
0 1
0 Drawer kick-out connector status Disabled Enabled
1 Busy status Disabled Enabled
2 Error status Disabled Enabled
3 Paper roll sensor status Disabled Enabled
4 Handshake customer display Disabled Enabled
5 Undefined
6 Undefined
7 Undefined
Notes: • ASB is the function that transmit the status of [cover open/close],
[Online/Offline] from the printer automatically. It is called [ASB function]
and the status is [ASB status]. If you use ASB, application can acquire the
printer change in a real-time and passively.
• Select any status enabled (except n = 0) and ASB starts. Then transmit the
current ASB status. After that during ASB is active, the selected enabled
ASB status is transmitted whenever the status changes.
• When n = 0, ASB is disabled. During ASB is disabled, ASB status is not
transmitted.
• Multiple status items can be selected.
• During ASB is active, ASB status is transmitted whenever the status
changes even if ESC = is not selected.
• This command setting is effective until the printer is reset or power is
turned off.
• During Block data [header – NUL] is transmitted, ASB is disabled
temporarily. Therefore you can not get the printer status change through
ASB status during block data [header – NUL] is transmitted.
• Basic ASB status is 4-byte configuration [first byte – fourth byte].
• If the error status is enabled, a change in the following conditions will
trigger the ASB:
- Cover
- Cutter Error
- Out-of-Range Printhead Temperature
- Out-of-Range Voltage
- Paper Exhaust
• If the busy status is enabled, a change in the following conditions will
trigger the ASB:
- Paper feed button

160
TH230/TH230+ Programmers Guide

- Busy (RS232 interface only)


• All ASB status is represent the enabled status whenever the status
changes. Therefore the disabled status items may change, because each
status transmission represents the current status.
• The status bytes to be transmitted are as follows:
• First byte (printer information)
Value
Bit Function
0 1
0 Not used Fixed to 0
1 Not used Fixed to 0
Drawer kick-out Low High
2 connector pin 3
3 Busy Not Busy Busy
4 Not used Fixed to 1
5 Cover Closed Open
Paper is being fed by
6 No Yes
the paper feed button.
7 Not used Fixed to 0
• Bit 3: Busy is set when the printer enters the Offline State (see chapter
Online / Offline State Diagram) or if the receive buffer is nearly full.
Exception: A change of the Busy State by receive buffer nearly full
doesn’t trigger an ASB message when using USB interface.
• Second byte (error information)
Value
Bit Function
0 1
Customer Not connected or Connected and
0
display Handshake blocked Handshake ready
1 Undefined
2 Undefined
3 Cutter error No error Error occurred
4 Not used Fixed to 0
5 Not used Fixed to 0
6 Error No error Error occurred
7 Not used Fixed to 0
• Bit 3: If Cutter error occurs due to paper jams or the like, it is possible
to recover by correcting the cause of the error and executing DLE ENQ.
• Bit 6: Error means Cover open, Paper out, Black mark error, Cutter
error, Thermistor error, High voltage error or Low voltage error.
Thermistor error is an unrecoverable error. High voltage error and Low
voltage error are automatic recoverable errors!
• Please note that both bit 6 and bit 3 are set if a cutter error occurred.
• If Black Mark error occurs, it is possible to recover by correcting the
cause of the error (change to mark paper for example) and executing DLE
ENQ.

161
Programmers Guide TH230/TH230+

• Third byte (paper sensor information)


Value
Bit Function
0 1
Paper roll near-end
0 Paper present No paper
sensor
Paper roll near-end
1 Paper present No paper
sensor
2 Paper roll end sensor Paper present No paper
3 Paper roll end sensor Paper present No paper
4 Not used Fixed to 0
5 Undefined
6 Undefined
7 Not used Fixed to 0

Bit 0 and Bit 1: To avoid false reports the paper near end sensor is
monitored by a 0.2 m paper feed hysteresis. That means the printer
doesn’t report paper near end to the host until 0.2 m paper is feed and all
the time the paper near end sensor detects no paper! If the linefeed
button is pressed within the hysteresis, the printer reports paper near
end immediately.
• Fourth byte (paper sensor information)
Value
Bit Function
0 1
0 Sleep Mode status Normal-Mode Sleep Mode
1 Undefined
2 Undefined
3 Undefined
4 Not used Fixed to 0
5 Undefined
6 Undefined
7 Not used Fixed to 0
• The printer transmits a 4-byte ASB status message without confirming
whether the host can receive data. ASB status, except for the XOFF code,
is always consecutive.
• ASB status can be differentiated by other transmission data by Bit 0, 1, 4,
and 7 of the first byte. Process the transmitted data from the printer as
ASB status which is consecutive 3 byte if it is “0xx1xx00” [x = 0 or 1].
However, the processing shown in the following is necessary in the
identifying processing of ASB status.
• When processing block data [Header ~ NUL], do not identify ASB status.
• When the host communicates with the printer by XON/XOFF control, the
host should process 4 bytes of data, except for the XOFF code, as ASB
status. ASB status configuration is different from that of the XOFF code.
• Third byte (paper sensor information): When the paper roll cover is open,
paper detection (detected by the paper roll end sensor) may be incorrect.

162

You might also like