The text of a manual · part 5 of 15
PcOS Series 60 Multi-Station Slip Printers Programmer's Guide, pages 41 to 50
Pages 41 to 50 of 150
The original document is the PDF (1.6 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Ithaca PcOS Series 60
Page 41
Control Codes Control
PcOS Series 60
Ithaca Peripherals Incorporated
Function:
Open Cash Drawer
ASCII: Hexadecimal: Decimal: IPCL: IPCL:
[ESC] x <n> 1BH 78H <n> <27><120><n> &%D1 For Cash Drawer 1 &%D2 For Cash Drawer 2
Description:
Energize cash drawer n for 150 msec.
Programmer's Guide
Note: The open cash drawer commands are processed as part of print data. They are not processed until they are found in the input buffer by the print processor. They are not immediate commands. Note: Cash drawer 1 is the connector nearest the communications cable. Note: Cash drawer 2 is configurable in one of two modes. Either pin 2 or 3 is active depending on an internal jumper setting. The factory default is pin 3. Cash drawer 1 is always on pin 2.
Page 40
Rev C 7/8/2008
Page 42
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Control Codes
Inquire
Printer Status Set/Inquire The Series 60 printer is designed to be used as part of an automated system where the host computer will make every attempt to correct problems with the printer. In addition, the host application requires that it be able to obtain more information from the printer than is typical of normal computer printers. The normal computer printer interfaces do not have cash drawers and slip stations to deal with. This requires that the standard printer protocol be extended to deal with the added features of a POS printer. The Series 60 printer has defined a set of status inquiry commands that will allow a host to obtain information about the printer and devices connected to it. The method chosen to interact with the computer is designed to allow a reasonable approach to the host application. It will not always be possible for an existing application to use the ENQ commands unless the communications drivers are available to the programmer. There are 7 status inquiry commands and 2 ENQ status set commands. The ENQ character is treated differently from all other characters received by the printer. In normal operation all information that is sent to the printer is received and placed in a holding buffer. The information stays in the holding buffer until the printer prints or interprets it. The ENQ commands are intercepted and acted on before they are placed in the input buffer. This presents a few problems for the printer. To allow the printer to operate as fast as possible, the normal commands are not interpreted by the ENQ preprocessor. It is possible for an ENQ sequence to be found by the pre-processor that is really part of a different command or part of graphics. For this reason a command is provided to disable the pre-processor. (See [ESC] y <n> below). Another IMPORTANT effect on the printer by ENQ commands is performance. The priority of communications in the printer is very high. ENQ commands are processed at the high priority of the input ISR8. It is possible for the host computer to send ENQ commands so fast that the printer does not have any time for printing (or do any thing else). ENQ commands must be paced to allow the printer time to get to its idle task. The pacing of ENQ's should average no more than 100 per second. In serial mode it is very IMPORTANT that the response to an ENQ be received by the host before another command is issued to the printer. When an ENQ is received by the printer, the printer may do some complicated processing at a very high priority. During this time the printer disables it’s interrupts. This means that any data sent to the printer during this time may be lost. In parallel mode this is not a problem because the printer remains busy until the processing is complete. All ENQ commands require a response from the printer. For this reason the parallel and serial operation of ENQ commands are different. In serial operation all ENQ commands are responded to by ACK or NAK and then the command ID. In parallel operation the PE (Paper Error) signal is driven as a response to an ENQ. The serial ACK or NAK responses are always uniform and followed with a command ID. This makes the design of the host application easier because the response can be identified and always follows the same format. In parallel operation there is no easy way to return complex information to the host. For this reason the PE (Paper Error) signal is driven in response to ENQ's. If a true PE is being signaled the fault line will also be driven. It is, therefore, possible to distinguish between a paper error and an ENQ response. In parallel mode the printer will respond to the ENQ before the parallel sequence is complete. That is when the parallel port acknowledges the ID part of the ENQ sequence, the PE signal will be valid. The host must, however, remember what status was requested as the printer has no way of signaling that information. In addition the host must not interpret the PE signal as an error but as a response to an ENQ. The PE signal will remain set until a next ENQ is issued or until a true paper exhaust is found. A true paper exhaust will only be reported after a line feed. If the PE signal is to be returned to the valid paper error state, an [ENQ] <4> should be issued.
8ISR - Interrupt Service Routine.
Rev C 7/8/2008
Page 41
Page 43
Control Codes Inquire
PcOS Series 60
Ithaca Peripherals Incorporated
PE DATA
Programmer's Guide Valid
ID
Next
STROBE BUSY ACK
PE to ENQ request timing ENQ commands are as follows: Function: Inquire Printer Status ASCII: [ENQ] <n> Hexadecimal: 05H <n> Decimal: <5><n> IPCL: (None) IPCL commands are not pre-processed. Description:.
Inquire printer status and return result. The following ENQ's are defined: NOTE: In serial mode, if the printer is off line, it will still accept ENQ commands and respond. The modem control lines are ignored by the printer in serial mode. NOTE: In parallel mode, if the printer is off line, ENQ's will not be accepted.
Function:
Inquire Cash Drawer 1 Status
ASCII: Hexadecimal: Decimal: Function:
[ENQ] <1> 05H 01H <5><1> Cash Drawer 1 Status Serial ACK <1> (06H 01H) Cash Drawer 1 is Closed NAK <1> (15H 01H) Cash Drawer 1 is Open Inquire Cash Drawer 2 Status
Response:
Function: ASCII: Hexadecimal: Decimal: Function: Response:
Page 42
[ENQ] <2> 05H 02H <5><2> Cash Drawer 2 Status Serial ACK <2> (06H 02H) Cash Drawer 2 is Closed NAK <2> (15H 02H) Cash Drawer 2 is Open
Rev C 7/8/2008
Parallel PE High: PE Low
Parallel PE High: PE Low
Page 44
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Function:
Inquire Printer Buffer Status
ASCII: Hexadecimal: Decimal: Function:
[ENQ] <3> 05H 03H <5><3> Is Buffer Empty Serial ACK <3> (06H 03H) Buffer is Empty NAK <3> (15H 03H) Buffer is not Empty
Response:
Control Codes
Inquire
Parallel PE High: PE Low
Description:
This command can also be used to detect printer IDLE by sending an [ESC] q (Wait printer Que.) to the printer and waiting for printer buffer empty.
Function: ASCII: Hexadecimal: Decimal: Function:
Inquire Journal Paper Status [ENQ] <4> 05H 04H <5><4> Is Journal Paper exhausted Parallel Serial ACK <4> (06H 04H) PE Low: There is journal paper NAK <4> (15H 04H) PE High There is no journal paper Inquire Front Slip Sensor Status [ENQ] <5> 05H 05H <5><5> Is the Front Slip sensor sensing paper? Parallel Serial ACK <5> (06H 05H) PE High: Front sensor is clear (no paper). NAK <5> (15H 05H) PE Low Front Sensor is blocked. (there is paper) Inquire Rear Slip Sensor Status
Response:
Function: ASCII: Hexadecimal: Decimal: Function: Response:
Function: ASCII: Hexadecimal: Decimal: Function: Response:
[ENQ] <6> 05H 06H <5><6> Is the Rear Slip Sensor Clear. Serial Parallel ACK <6> (06H 06H) PE High The rear Sensor is clear (no paper) NAK <6> (15H 06H) PE Low The rear sensor is blocked (there is paper)
Rev C 7/8/2008
Page 43
Page 45
Control Codes Inquire
Programmer's Guide
Function:
Inquire Printer Ready Status
ASCII: Hexadecimal: Decimal: Function:
[ENQ] <7> 05H 07H <5><7> Is the printer ready? Serial Not available in parallel mode ACK <7> (06H 07H) The printer is ready. NAK <7> (15H 07H) The printer is not ready. Set Input OFF Request
Response:
Function: ASCII: Hexadecimal: Decimal: Function: Response:
[ENQ] <8> 05H 08H <5><8> Ignore all data except ENQ's Not available in parallel mode Serial ACK <8> (06H 08H) The command was accepted. NAK <8> (15H 08H) The command was rejected.
Description:
This command prevents serial information from being placed in the printers input buffer. This command could be used to allow a second device to receive data on the same serial port as the printer. NOTE: The Serial transmitter is not disabled. This means that the printers transmitter can not be paralleled with other devices.
Function: ASCII: Hexadecimal: Decimal: Function:
Set Input ON Request [ENQ] <9> 05H 09H <5><9> Re-enable data input (Reverses ENQ <8>) Serial Not available in parallel mode ACK <9> (06H 09H) The command was accepted. NAK <9> (15H 09H) The command was rejected.
Response:
Page 44
PcOS Series 60
Ithaca Peripherals Incorporated
Rev C 7/8/2008
Page 46
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Function:
Request Printer Reset
ASCII: Hexadecimal: Decimal: Function:
[ENQ] <10> 05H 0AH <5><10> Reset Printer. Serial Not available in parallel mode ACK <10> (06H 0AH) The command was accepted. NAK <10>(15H 0AH) The command was rejected.
Response:
Description:
Control Codes
Inquire
This command is similar to asking for a power on reset except no internal diagnostics are run. The internal print buffer will be flushed, all displayed alarms will be cleared, the slip clamp will be opened, and the printer will go on line. The printer will be ready to except new information as soon as the ACK response is sent. If an NAK is received (or no response was received) by the host, the command was blocked by a [ESC] y <n> control command. Note: This also resets a [ENQ] <8> buffer block.
Function: ASCII: Hexadecimal: Decimal: Function: Response:
Description:
Inquire Power Cycle Status [ENQ] <11> 05H 0BH <5><11> Is the Front Slip sensor sensing paper? Parallel Serial ACK <11> (06H 0BH) PE High: Printer power has been cycled since last [ENQ]<11> NAK <5> (15H 0BH) PE Low Printer has not power cycled since last [ENQ]<11> The first time after a reset this command will return [ACK] <11>, after that the command will return [NAK] <11>. This command allows the application to determine if the printer has been power cycled and needs to be set up. The [ENQ] <10> command and the INIT signal on the parallel port will both cause the printer to return power up status.
Rev C 7/8/2008
Page 45
Page 47
Control Codes Feature Control
PcOS Series 60
Ithaca Peripherals Incorporated
Programmer's Guide
Function:
Control Feature Commands
ASCII: Hexadecimal: Decimal: IPCL: Where n:
[ESC] y <n> 1BH 79H <n> <27><121><n> &%Y0 through 8 0 Disable All ENQ commands 1 Enable All ENQ commands 2 Strip ENQ commands from input buffer9 3 Disable ENQ 8 - 10 commands (Required if graphics are used) 4 Disable IPCL Commands 5 Enable IPCL Commands Note: Once disabled, this command will not be a valid IPCL code 6 Disable Slip Clamp Check 7 Enable Slip Clamp Checks 8 Enable Extended Diagnostics
Description:
Enable and disable command set features. This command allows graphic and other binary data to be sent to the printer without an ENQ response. If the ENQ <8> or <10> command is recognized in graphic or format data the printer will ignore the rest of the data or will reset. If an unwanted ENQ response is tolerable, only ENQ <8> and <10> need be disabled. It is possible that the IPCL commands will interfere with print data. If this is the case they can be disabled with and [ESC] y <4> Some applications can not control the line formatting features of their print drivers. In some cases when a control string is formed the print driver will append a [CR] and/or a [LF] to the end. For some commands this is a problem for the Series 60 printer. The printer tries to prevent printing with the slip clamp open. The print head is not designed to allow the print wires to bottom. The printer tries to detect this by detecting print commands that might cause print and generates an error indication. If a command like [ESC]z (Slip Clamp Open) is followed by a [CR] and error will be indicated. Because the application can not control the [CR] the printer has a way to disable the slip clamp checks. By sending a [ESC]y<6> before every transaction (as the first command) the [CR] will not generate an error. The printer will however, now print with the slip clamp open. Under no circumstances should this be allowed to occur. The printer may be damaged by printing with the slip clamp open.
9This allows ENQ's to be used in polling sequences without filling the input buffer.
Page 46
Rev C 7/8/2008
Page 48
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
Control Codes
Extended Diagnostics
Extended Diagnostics Commands Function:
Adjust Vertical Alignment
ASCII: Hexadecimal: Decimal: IPCL: Where n: Description:
[ESC] | <n> 1BH 7CH <n> <27><124><n> None 0 to 15 This command allows the vertical alignment between bi-directional print passes to be adjusted. This commands only effects rotated 90° and 180° print. It is active only after an [ESC] y <8> command to enable extended diagnostics. A typical value of 7 is generally a good place to start. [ESC] ^ 4 will print an alignment chart. (Note: this value is stored in EEPROM and need only be set once. As it is factory adjusted this adjustment need not be performed unless the printer is disassembled.) In addition to this command the diagnostics adjustment procedure is also available. Extended Diagnostics.
Function: ASCII: Hexadecimal: Decimal: IPCL: Where n:
[ESC] ^ <n> 1BH 5EH <27><94> NONE 0 Reads and prints all sensor readings, model number and serial number. 1 Set vertical alignment to 4 2 Decrease Vertical alignment adjustment 3 Increase Vertical alignment adjustment 4 Print a vertical adjustment alignment chart. 5 Print the serial number and the model number 6 Read adjust and reread all sensor adjustments. (works on journal only) 7 Cycle Receipt knife 8 Force sensor adjustment 9 Force Journal exhaust to Magnetic. A Force Journal exhaust to Optical. Z Places the printer in configuration mode. C Closes the slip clamp. O Opens the slip clamp. R Moves print head to right home. H Moves head Home (Last selected home) L Moves print head to left home.
Description:
These commands are designed to be used by Ithaca Peripherals to help adjust and test the printer. There is no guarantee that these commands are valid and /or stable. They are not intended for use by the end user. To prevent accidental use of these commands they must be enabled by an [ESC]y<8> command.
Rev B 7/8/2008
Page 47
Page 49
Control Codes
PcOS Series 60
Codes
Ithaca Peripherals Incorporated
Programmer's Guide
Control Codes Summary (by Code) Normal ASCII [NUL] [ENQ]10
Second ASCII field
IPCL Equivalent code
<n>
[HT] [LF] [CR] [SO]4 [SI] [DC2] [DC4] [CAN] [ESC] [SP]2 <32> ... <255> [ESC] [ESC] [ESC]
[SI] #0 - <n>
[ESC] [ESC] [ESC] [ESC]
0 1 2 3 <n>
[ESC] [ESC] [ESC] [ESC]
6 7 : A <n>
&%C2 &%C1 &%F2
[ESC]
B
&%SX
[ESC]
D <n>1<n>2 <n>3...<n>k <0>
[ESC] [ESC] [ESC] [ESC] [ESC]
E F G H I <n>
[ESC]
J <n>
&%LF &%CR &%MW &%F1 &%F3 &%MN &%RD &%
&%F4 &%QT &%CU{n=0} &%MU{n=1} &%ST &%SG &%SV <n>
&%MM &%CM &%ME &%CE &%QU{n=1} &%QE{n=2} &%QL{n=3} &%LV <n>
Description Null Inquire Status (n=1 Cash Dwr 1, n=2 Cash Dwr 2, n=3 Buffer Empty, n=4 Journal Paper, n=5 Front Slip Sensor, n=6 Rear Slip Sensor, n=7 Printer Ready, n=8 Ignore All Input, n=9 Enable Input.11,n=10 Reset Printer, n=11 Power Cycle Status Horizontal Tab Line Feed Carriage Return One Line Double Wide Set 17 CPI Set 10 CPI Cancel One Line Double Wide Clear Print Buffer Begin Escape Sequence Space Character Printable Characters
42
20 xv xv 23 22 22 23 47
Set 24 CPI Set Normal Print Mode (HSD is Normal) Underline (n=0 End, n=1 Begin )
22 24 31
Set 1/8" Line Space Set 7/72" Line Space Begin Variable Line Spacing (Enable [ESC] A n) Set Fine Line Space n/216" (n=1..255) (defines feed used by LF) Select IBM Character Set 2 Select IBM Character Set 1 Set 12 CPI Set Variable Line Spacing n/72 (n=1..85) (Enabled by [ESC] 2) Load Slip and Position to First Print Line in 180° mode.(Ck Front Sensor only) Horizontal tab set ( Sets tabs at columns n1 n2 ... nk 0) The maximum value of n depends on the station selected.
xvii xviii xviii xvii
Begin Emphasized Print (Half Speed) End Emphasized Print Begin Enhanced Print (Double Pass) End Enhanced Print Select Print Mode (n=1 Feat Util; n=2 Enhanced; n=3 NLQ)
31 32 31 31 24
Do a Fine Line Feed n/216" (n=0 no line feed; n=1..255)
xv
10ENQ Returns ACK n or NAK n. ENQ's Are preprocessed and return immediate responses. 11ENQ 7, 8, 9 and 10 are not valid in parallel mode.
Page 48
Page
Rev C 7/8/2008
26 25 22 xviii 37 20
Page 50
Programmer's Guide
PcOS Series 60
Ithaca Peripherals Incorporated
[ESC]
K <n>1 <n>2
[ESC]
L <n>1 <n>2
[ESC]
M
&%GS <n>1 <n>2 &%GD <n>1 <n>2 &%SM
[ESC] [ESC]
N Q
&%SQ NONE
[ESC]
S <n>
[ESC] [ESC]
T U <n>
[ESC]
W <n>
[ESC]
Y <n>1 <n>2
&%SB{n=1} &%SP{n=0} &%SE &%GU{n=1} &%GB{n=0} &%FD{n=1} &%FE{n=2} &%GF <n>1 <n>2
[ESC] [ESC] [ESC] [ESC] [ESC] [ESC] [ESC] [ESC] [ESC] [ESC] b d e f g h i j k l <n>
&%SW NONE &%LC &%SR &%SJ &%SL &%SF &%SN &%LK &%SD {n = 1} &%SS {n = 0}
[ESC] [ESC] [ESC] [ESC] [ESC] [ESC] m n o p <n> q r <n>
[ESC] [ESC] s <n> u <n>1 <m>1 <n>2 <m>2 ... <n>k <0>
[ESC] [ESC] v x <n>
[ESC]* y <n>
&%LE &%LR &%LB &%LM <n> NONE &%R0{n=0} &%R1{n=1} &%R2{n=2} &%R3{n=3} &%RL <n> &%RP <n>1 <m>1 <n>2<m>2 ... <n>k<0> &%FC &%D1{n=1} &%D2{n=2} &%Y0 - 7
[ESC] z
&%SO
Control Codes Codes
Single Density Graphics (n1=0..255, n2=0..3, len=n1 +256*n2) DD Half-Speed Graphics (n1=0..255, n2=0..3,Len=n1 + 256*n2) Load Slip and Position to First Print Line(Ck Front Sensor only) Load Slip and Position to Slip Sensor (Ck Front Sensor only) Wait in input Que. until previous commands are complete and then return a response. (CFG60 will automatically wait for this command Select Superscript / Subscript (n=0 Super, n=1 Sub)
33 33 36 36 39 31
End Superscript / Subscript Select Bi-directional / Unidirectional (n=0 Bi, n=1 Uni)
32 33
Multi-line Double-Wide Sequence (n=0 End, n=1 Begin)
23
DD Full-Speed Graphics (n1=0..255,n2=0..3,Len=n1 +256 * n2) Load Slip and Position to First Print Line in 180° mode. Continuous Feed 7" Continuous Feed 2" Receipt Load Select Journal Load Slip and Position to Slip Sensor Load Slip and Position to First Print Line Load Slip (no auto position and no sensors checked) Feed Receipt 2.0" or to mark (monitors rear sensor only) Dual station operation. ( n = 1 Dual station, n = 0 single station) (Enable journal feed in Slip or Receipt mode) Feed to end of slip. Set Feed Direction Back to Front Set Feed Direction Front to Back Set Slip Left Margin (n dot col at 60 dots per inch) Wait for operation complete; Rotated Print (n: 0-End, 1-Rot B 90, 2 Rot-L 180, 3-Rot B 270)
33 37 xvi xvi 34 34 36 35 35 xvi 37 xvi xix xix 37 47 28
Set Rotated Print Line Length (n = 1..80) Default 48 Set Rotated Print Line Spacing (nk=0 End) Where n = line and m = Dots from last line. NOTE: All lines not specified are set to 1 dot.
29 29
Cycle Receipt Cutter Open Cash Drawer n (n=1 or 2)
34 40
Control ENQ's, Control IPCL, Disable Clamp Checks. Where: n=0 Disable, n=1 Enable, n=2 Strip ENQs, n=3 Disable ENQ 8 - 10 (n=1 Will enable all ENQ's), n=4 Disable IPCL translation, n=5 Enable IPCL translation, n=6 Disable Slip Clamp Checks, n=7 Enable Slip Clamp Checks n=8 Enable Extended Diagnostics Open Slip Clamp
47
Rev C 7/8/2008
Page 49
35