OVERVIEW OF NCR PRINTER PROPOSAL FOR SCSI-2 1. REQUEST SENSE COMMAND - Printer-related Additional Sense Code Definitions 2. COPY COMMAND - Printer-related COPY function codes and segment descriptors 3. MODE SENSE and MODE SELECT COMMANDS - Parameter List Header - Parallel (Dataproducts- and Centronics-type) Printer Interface parameter page definitions - Serial Printer Interface parameter page definition REQUEST SENSE Command The REQUEST SENSE Extended Sense Data format remains as previously defined - with the addition of the Additional Sense Code Qualifier. Extended Sense Data ======================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte(s)| | | | | | | | | ======================================================================== 8-11 | Command-specific Information Bytes | -------|---------------------------------------------------------------| 12 | Additional Sense Code | -------|---------------------------------------------------------------| 13 | Additional Sense Code Qualifier | -------|---------------------------------------------------------------| 14 | FRU Failed | -------|---------------------------------------------------------------| 15 | FPV | C/D | VU | VU | BPV | Bit Pointer | -------|---------------------------------------------------------------| 16 | Field Pointer (MSB) | -------|---------------------------------------------------------------| 17 | Field Pointer (LSB) | -------|---------------------------------------------------------------| 18-N | Vendor Unique | ======================================================================== The Additional Sense Code (Qualifier) fields for Printer Devices are defined on the following page. Additional Sense Codes for Printer Devices ======================================================================== Byte Related Sense Keys 12 13 Description (others may apply) -- -- ----------------------------------------- ------------------ 00 00 No additional sense information NO SENSE 01 00 No printer interface verify (printer device not present) HARDWARE ERROR 03 00 Printer-detected parity error HARDWARE ERROR 04 00 Printer not ready NOT READY 05 00 Printer off-line NOT READY 06 00 No Top-of-Form (TOF) detected HARDWARE ERROR 08 00 Paper movement failure HARDWARE ERROR 08 01 Slew failure 08 02 Paper jam 09 00 Printer Fault HARDWARE ERROR 10 00 Tape/Electronic Vertical Forms Unit (TVFU/EVFU) not ready NOT READY 1B 00 Synchronous transfer error HARDWARE ERROR 20 00 Invalid command operation code ILLEGAL REQUEST 20 01 Illegal function for device type 20 02 Unsupported function 21 00 Invalid byte transfer length ILLEGAL REQUEST 22 00 Invalid function for device type ILLEGAL REQUEST 24 00 Illegal CDB field ILLEGAL REQUEST 24 02 Reserved bit/field set 25 00 Invalid Logical Unit Number (LUN) ILLEGAL REQUEST 26 00 Invalid parameter list field ILLEGAL REQUEST 29 00 Power-on / bus reset occurred UNIT ATTENTION 2A 00 MODE SELECT parameters changed UNIT ATTENTION 31 00 FORMAT failed HARDWARE ERROR 3A 00 Out of paper MEDIUM ERROR 3B 00 Paper position error MEDIUM ERROR or HARDWARE ERROR 3B 01 Failed to sense Bottom-of-Form (BOF) 3B 02 Failed to sense Top-of-Form (TOF) 42 00 Power-on diagnostic failure HARDWARE ERROR 43 00 Message Reject Error ABORTED COMMAND 44 00 Internal controller SCSI failure HARDWARE ERROR 45 00 Select/Reselect failure HARDWARE ERROR 46 00 Unsuccessful soft reset HARDWARE ERROR 47 00 SCSI parity error ABORTED COMMAND or RECOVERED ERROR or HARDWARE ERROR 48 00 Initiator detected error ABORTED COMMAND or RECOVERED ERROR or HARDWARE ERROR 49 00 Inappropriate/Illegal message ABORTED COMMAND 60 00 Target status error on COPY command COPY ABORTED 70 00 Self-test failed HARDWARE ERROR COPY Command Define additional COPY function codes as follows: COPY function code: 04h Direct access to printer 05h Sequential access to printer Segment Descriptor for COPY Function Code 04h ======================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte(s)| | | | | | | | | ======================================================================== 0 | Source Address | Resvd | Cat | Source LUN | -------|---------------------------------------------------------------| 1 | Destination Address | Reserved | Destination LUN | -------|---------------------------------------------------------------| 2,3 | Direct-Access Device Block Length (MSB first) | -------|---------------------------------------------------------------| 4-7 | Direct-Access Device Number of Blocks (MSB first) | -------|---------------------------------------------------------------| 8-11 | Direct-Access Device Logical Block Address (MSB first) | -------|---------------------------------------------------------------| Segment Descriptor for COPY Function Code 05h ======================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte(s)| | | | | | | | | ======================================================================== 0 | Source Address | Resvd | Cat | Source LUN | -------|---------------------------------------------------------------| 1 | Destination Address | Reserved | Destination LUN | -------|---------------------------------------------------------------| 2,3 | Reserved | -------|---------------------------------------------------------------| 4,5 | Source Block Length (MSB first) | -------|---------------------------------------------------------------| 6,7 | Reserved | -------|---------------------------------------------------------------| 8-11 | Source Number of Blocks (MSB first) | -------|---------------------------------------------------------------| MODE SELECT / MODE SENSE Commands After a MODE SELECT command is successfully completed, a UNIT ATTENTION condition for the Logical Unit will begin for all other initiators (if the MODE SELECT changed any parameters from their previous values. (If none changed, the UNIT ATTENTION condition will not begin.) The UNIT ATTENTION condition is described in 6.1.3 of the SCSI-2 Working Draft Proposal. Parameter List Header ======================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte(s)| | | | | | | | | ======================================================================== 0 | Reserved (MODE SELECT) or Sense Data Length (MODE SENSE) | -------|---------------------------------------------------------------| 1 | Reserved | -------|---------------------------------------------------------------| 2 | Resvd | Buffered Mode | Reserved | -------|---------------------------------------------------------------| 3 | Reserved | -------|---------------------------------------------------------------| The SCSI-2 Working Draft Proposal describes the Parameter List Header. In most cases, the printer options/parameters described herein are not available to a controller via the printer/controller interface. These parameters provide a means for printer options to be communicated to the controller via the host system(s), or for the controller to report its parameter assumptions to the host. It will be incumbent upon the user or installer to verify that the printer and controller options agree or are compatible for proper operation. The Page Codes for the following page definitions are to be assigned. PARALLEL PRINTER INTERFACE PARAMETERS (Page Code h) The following page includes parameters pertaining to both Dataproducts and Centronics type parallel interface printers. This was done since both interface types emulate the other to some degree. Combining the parameters then, requires only one page to be defined. The appropriate parameters to specific applications can be determined by issuing a MODE SENSE (Changeable Parameters) command. ======================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte(s)| | | | | | | | | ======================================================================== 0 | Page Code ( h) | -------|---------------------------------------------------------------| 1 | Page Length (0Eh) | -------|---------------------------------------------------------------| 2 | EVFU | Reserved | Band Identification | -------|---------------------------------------------------------------| 3 | Reserved | Slew Limit | -------|---------------------------------------------------------------| 4 | VCBS | VCBP | Slew Mode | Reserved | SCTE | AFC | -------|---------------------------------------------------------------| 5 | Parity Select | PIPC | Reserved | -------|---------------------------------------------------------------| 6 | Max. Line Length - MSB | -------|---------------------------------------------------------------| 7 | Max. Line Length - LSB | -------|---------------------------------------------------------------| 8 | EVFU Format Start Character | -------|---------------------------------------------------------------| 9 | EVFU Format Stop Character | -------|---------------------------------------------------------------| 10 | Line Slew Options | Form Slew Options | -------|---------------------------------------------------------------| 11 | Data Termination Options | Reserved | Autofd| -------|---------------------------------------------------------------| 12 | BUSY Signal Options | -------|---------------------------------------------------------------| 13 | ACK Signal Options | -------|---------------------------------------------------------------| 14 | Reserved | -------|---------------------------------------------------------------| 15 | Reserved | -------|---------------------------------------------------------------| Parallel Printer Interface Parameters - cont'd. EVFU indicates if a Tape/Electronic Vertical Forms Unit is present. (MODE SENSE command only - RESERVED in the MODE SELECT command.) The Band Identification provides band information. (MODE SENSE command only - RESERVED in the MODE SELECT command.) Band I.D. Definition --------- ---------- 0000b The Band I.D. is invalid. 1XXXb Band I.D. bits 2-0 (which are controller and/or printer- specific) are valid. The Slew Limit specifies the maximum line count accepted by the EVFU for SLEW AND PRINT line skip commands. A 00h value will specify the target's default value is to be selected (in the MODE SELECT command). VCBS (VFU Control Bit Select) indicates the VFU control bit selected. The selected bit indicates VFU channel/line skip commands, depending on its state (selected by VCBP). VCBS = 0/1 = bit 4/6. VCBS VFU Control Byte Function of Control Bit (C) 7 6 5 4 3 2 1 0 ---- --------------- ------------------------------------------ 0 0 E E C N N N N Advance (EE)NNNN lines (C = line skip) 0 0 0 C N N N N Skip to VFU channel NNNN (C = VFU channel) 1 0 C E E N N N N Advance (EE)NNNN lines (C = line skip) 0 C 0 0 N N N N Skip to VFU channel NNNN (C = VFU channel) VCBP (VFU Control Bit Polarity) indicates the state of the VFU control bit for VFU channel or line skip (paper motion control) commands. VCBP = 0: Logic true control bit indicates a line skip command. Logic false control bit indicates a VFU channel command. VCBP = 1: Logic true control bit indicates a VFU channel command. Logic false control bit indicates a line skip command. SCTE = 0/1 indicates the printer's Step Count Truncate Enable option is disabled/enabled to truncate line skip commands to stop at the top of the next form. AFC = 0/1 indicates the printer does not/does support ASCII Form Control characters. Parallel Printer Interface Parameters - cont'd. The Slew Mode options specify the printer's support mode for SLEW AND PRINT line skip commands: Slew Mode Definition --------- ---------- 00b Select controller's default mode. 01b Line skip commands are supported without host/controller intervention. The host and/or controller need not issue an EVFU Format function. (The printer EVFU READY = TRUE will not be required.) 10b Intervention is required for line skip command support. The initiator must first issue the necessary FORMAT data (Printer interface EVFU READY = TRUE will be required.) 11b Intervention is required for line skip command support. The initiator must first issue the necessary FORMAT data or the controller may send a START/STOP format sequence to enable the EVFU Line Counter-only mode of operation. Parity Select controls/indicates printer interface parity checking: Parity Select Definition ------------- ---------- 00b Default (Controller-specific) 01b No parity checking 10b Even Parity 11b Odd Parity PIPC = 0/1 indicates the Paper Instruction (is not/is) included in Parity Checking by the printer. The Maximum Line Length will specify/indicate the maximum byte count per line to be accepted in the SLEW AND PRINT command. A value of 0000h will specify the controller's default value. The EVFU Start/Stop Code bytes will specify/indicate the codes used by the controller, if the Slew Mode option is set to 11b. The controller's default START and STOP codes will be specified if these bytes are set to 00h in the MODE SELECT parameters. Parallel Printer Interface Parameters - cont'd. Line Slew Options will specify/indicate the controller's implementation of line slewing for support of SLEW AND PRINT (Line Skip) commands for Centronics-type printers. Code Line Slew Option ----- ---------------- 0000b Controller's Default 0001b No implementation. (SLEW AND PRINT commands will be Illegal Requests for Centronics-type printers.) 0010b 0Dh (Carriage Return) 0100b 0Ah (Line Feed) 0110b 0Dh,0Ah (Carriage Return, Line Feed) Form Slew Options specify/indicate the controller's implementation of form slewing for support of the SLEW AND PRINT (Line Skip) command for Centronics-type printers. Code Form Slew Option ----- ---------------- 0000b Controller's Default 0001b No implementation. (SLEW AND PRINT commands will be Illegal Requests for Centronics-type printers.) 0010b 0Dh (Carriage Return) 1000b 0Ch (Form Feed) 1010b 0Dh,0Ch (Carriage Return, Form Feed) Data Termination Options specify/indicate the controller implementation of data termination for support of the FLUSH BUFFER command. Used for printers which require data termination to print data in their buffer. Code Data Termination Option ----- ----------------------- 0000b Controller's Default 0001b No implementation. (Data termination must be provided by the initiator.) 0010b 0Dh (Carriage Return) 0100b 0Ah (Line Feed) 0110b 0Dh,0Ah (Carriage Return, Line Feed) 1000b 0Ch (Form Feed) 1010b 0Dh,0Ch (Carriage Return, Form Feed) 1100b Issue a 0-line slew command The Autofd option = 0/1, will disable/enable the controller to drive the printer interface Auto Line Feed line. Parallel Printer Interface Parameters - cont'd. BUSY Signal Options: Bit Option --- ------ 7 0 = select defaults for bits 0-6 (which are ignored) 1 = bits 0-6 valid 6 0/1 = BUSY (does not/does) reflect Paper Out 5 0/1 = BUSY (does not/does) reflect Printer Fault 4 0/1 = BUSY (does not/does) reflect Online/Local status 3 Reserved, must be set to 0 2 0/1 = BUSY (does not/does) reflect full print buffer 1 0/1 = BUSY (does not/does) reflect ACK 0 0/1 = BUSY active low/high ACK Signal Options: Bit Option --- ------ 7 0 = select defaults for bits 0-6 (which are ignored) 1 = bits 0-6 valid 6 0/1 = ACK (does not/does) reflect Paper Out 5 0/1 = ACK (does not/does) reflect Printer Fault 4 0/1 = ACK (does not/does) reflect Online/Local status 3 Reserved, must be set to 0 2 Reserved, must be set to 0 1 Reserved, must be set to 0 0 Reserved, must be set to 0 SERIAL INTERFACE PARAMETERS (Page Code h) The following page defines parameters for RS232-interface printers. ======================================================================== Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte(s)| | | | | | | | | ======================================================================== 0 | Page Code ( h) | -------|---------------------------------------------------------------| 1 | Page Length (06h) | -------|---------------------------------------------------------------| 2 | Reserved | -------|---------------------------------------------------------------| 3 | Reserved | Baud Rate Select | -------|---------------------------------------------------------------| 4 | Reserved | Stop Bit Length | -------|---------------------------------------------------------------| 5 | Parity Select | Reserved | Bits per Character | -------|---------------------------------------------------------------| 6 | RTS | Rsvd | CTS | Reserved | Ready/Busy Protocol | -------|---------------------------------------------------------------| 7 | Reserved | -------|---------------------------------------------------------------| Baud Rate Selection is specified as follows: Code Baud Rate Code Baud Rate ------ --------- ------ --------- 00000b Default 10000b reserved 00001b 50 10001b 75 00010b 110 10010b 110 00011b 134.5 10011b 134.5 00100b 200 10100b 150 00101b 300 10101b 300 00110b 600 10110b 600 00111b 1200 10111b 1200 01000b 1050 11000b 2000 01001b 2400 11001b 2400 01010b 4800 11010b 4800 01011b 7200 11011b 1800 01100b 9600 11100b 9600 01101b 38400 11101b 19200 01110b reserved 11110b reserved 01111b reserved 11111b reserved Serial Interface Parameters - cont'd. Stop Bit Length is specified as follows: Code Stop Bit Length ------- --------------- 000000b Default XXXXXXb All non-zero values are interpreted as n-16ths bits. Parity Select controls parity selection as follows: Parity Select Parity Mode: 5-7-bit 8-bit ------------- ----------------------------------- 000b Default Default 001b None None 100b Mark None 101b Space None 110b Odd Odd 111b Even Even Bits per Character are specified as follows: Code Bits per Character ---- ------------------------------ 000b Default (Controller-Specific) 001b 5 bits per character 010b 6 bits per character 011b 7 bits per character 100b 8 bits per character RTS provides a Request-To-Send timing option: 0 = high after power-on 1 = RTS follows DTR CTS provides a Clear-To-Send control option: 0 = CTS not used 1 = Delay transmission till CTS asserted Ready/Busy Protocol Code Definition ---- ---------- 000b Default 001b XON/XOFF 010b ETX/ACK 011b Busy on DTR 100b BUSY Pin(s)