National Instruments GPIB-SCSI-A User Manual

Scsi-to-ieee 488 controller
Hide thumbs Also See for GPIB-SCSI-A:
Table of Contents

Advertisement

Quick Links

GPIB-SCSI-A
User Manual
SCSI-to-IEEE 488 Controller
July 1994 Edition
Part Number 320427-01
© Copyright 1991, 1994 National Instruments Corporation.
All Rights Reserved.

Advertisement

Table of Contents
loading

Summary of Contents for National Instruments GPIB-SCSI-A

  • Page 1 GPIB-SCSI-A User Manual SCSI-to-IEEE 488 Controller July 1994 Edition Part Number 320427-01 © Copyright 1991, 1994 National Instruments Corporation. All Rights Reserved.
  • Page 2 National Instruments Corporate Headquarters 6504 Bridge Point Parkway Austin, TX 78730-5039 (512) 794-0100 Technical support fax: (800) 328-2203 (512) 794-5678 Branch Offices: Australia (03) 879 9422, Austria (0662) 435986, Belgium 02/757.00.20, Canada (Ontario) (519) 622-9310, Canada (Québec) (514) 694-8521, Denmark 45 76 26 00, Finland (90) 527 2321, France (1) 48 14 24 24,...
  • Page 3 The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.
  • Page 4 Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation. Trademarks ®...
  • Page 5 FCC/DOC Radio Frequency Interference Compliance This equipment generates and uses radio frequency energy and, if not installed and used in strict accordance with the instructions in this manual, may cause interference to radio and television reception. This equipment has been tested and found to comply with the following two regulatory agencies: Federal Communications Commission This device complies with Part 15 of the Federal Communications...
  • Page 6 National Instruments could void the user’s authority to operate the equipment under the FCC Rules. If necessary, consult National Instruments or an experienced radio/television technician for additional suggestions. The following booklet prepared by the FCC may also be helpful: How to Identify and Resolve Radio-TV Interference Problems.
  • Page 7: Table Of Contents

    S Mode............2-5 Configuration Switch Settings for SW2 in G Mode ............2-7 SCSI Terminating Resistors......2-8 Step 3. Connect the Cables ........2-10 Step 4. Switch On Your GPIB-SCSI-A and Power on Your System ........2-11 Chapter 3 Technical Information ..............3-1 Assumption of Previous Knowledge ..........3-1...
  • Page 8 GPIB Address............... 4-2 Status Information ..............4-3 GPIB Read and Write Termination Method (END and EOS) ... 4-3 The SCSI Message System and the GPIB-SCSI-A in S Mode ..4-4 S Mode Error Indication............. 4-4 Disconnection/Reconnection ............4-5 Disconnection/Reconnection during Data Transfers ... 4-5 Disconnection/Reconnection while Waiting for GPIB Events..............
  • Page 9 Contents cac - Become Active Controller ........... 5-15 caddr - Change the GPIB Address of the GPIB-SCSI-A ..5-17 clr - Clear Specified Device*..........5-20 cmd - Send GPIB Commands..........5-23 config - Read/Change GPIB-SCSI-A Configuration....5-26 eos - Change/Disable GPIB EOS Termination Mode ..5-30 eot - Enable/Disable END Message on GPIB Writes ..5-34...
  • Page 10 Peripherals ..................6-5 Addressing Terminology..........6-5 The GPIB-SCSI-A and SCSI System as Listener....... 6-5 The GPIB-SCSI-A and SCSI System as Talker ......6-7 GPIB Read and Write Termination (END and EOS)....6-8 SCSI Data Transmission............. 6-9 The SCSI Message System and the GPIB-SCSI-A ....6-9 Handling of SCSI Phases in G Mode .........
  • Page 11 - Mode Select ..............7-37 mdsns - Mode Sense..............7-39 msgin - Transfer Message Bytes from the Target to the GPIB-SCSI-A ............. 7-41 msgout - Transfer Message Bytes from the GPIB-SCSI-A to the SCSI Target ............7-43 pad - Set Pad Byte ............... 7-45 rblks - Reassign Blocks............7-47...
  • Page 12 ATN* (attention) ........... C-4 IFC* (interface clear)........C-4 REN* (remote enable) ........C-4 SRQ* (service request) ........C-4 EOI* (end or identify) ........C-5 Physical and Electrical Characteristics........C-5 Configuration Requirements............C-9 Related Documentation ..............C-9 GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 13 Issuing Remote Configurations in S Mode......... E-3 Issuing Local Configurations in S Mode ........E-4 The Parallel Poll ................. E-5 S Mode Example................. E-5 Appendix F Customer Communication ............F-1 Glossary ....................G-1 Index ....................Index-1 © National Instruments Corp. xiii GPIB-SCSI-A User Manual...
  • Page 14 Figure 2-1. SW1 Default Mode Switch Settings ........2-2 Figure 2-2. SW2 Default Switch Settings ..........2-5 Figure 2-3. SW2 Sample Setting for G Mode..........2-7 Figure 2-4. GPIB-SCSI-A Physically Located at End of SCSI Bus ..2-9 Figure 2-5. GPIB-SCSI-A Not Physically Located at End of SCSI Bus................2-10 Figure 4-1.
  • Page 15 Table 5-1. Buffering Methods for Data Transfer Commands....5-27 Table 5-2. Data Transfer Termination Methods ........5-31 Table 5-3. Inquiry Data Format for the GPIB-SCSI-A......5-42 Table 5-4. Sense Data Format for the GPIB-SCSI-A ......5-73 Table 5-5. GPIB-SCSI-A Sense Keys ............. 5-74 Table 5-6. GPIB-SCSI-A Status Conditions..........5-92 Table 5-7.
  • Page 16: About This Manual

    This manual describes the function of the GPIB-SCSI-A and contains information concerning its operation and programming. The GPIB-SCSI-A is one of the National Instruments family of IEEE 488 support products. These products are small, high-performance, converters, and controllers packaged in all-metal cases.
  • Page 17 GPIB-SCSI-A records as it executes each programming message. Also described are the SCSI message bytes that the GPIB-SCSI-A responds to or generates while operating, as well as the Extended Sense keys that the GPIB-SCSI-A uses. •...
  • Page 18: Conventions Used In This Manual

    • ANSI X3.131-1986, small computer system interface (SCSI). • ANSI/IEEE Standard 488.1-1987, IEEE Standard Digital Interface for Programmable Instrumentation. • ANSI/IEEE Standard 488.2-1987, IEEE Standard Codes, Formats, Protocols, and Common Commands © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 19: Customer Communication

    About This Manual Customer Communication National Instruments wants to receive your comments on our products and manuals. We are interested in the applications you develop with our products, and we want to help if you have problems with them. To make it easy for you to contact us, this manual contains comment and configuration forms for you to complete.
  • Page 21: Description Of The Gpib-Scsi-A

    SCSI port into a GPIB Talker/Listener/Controller or can make any device on the SCSI bus look like a GPIB device. The GPIB-SCSI-A has all the software and logic required to implement the physical and electrical specifications of the IEEE 488.2 and the ANSI X3T9.2 standards.
  • Page 22: Optional Equipment

    Chapter 1 Description of the GPIB-SCSI-A Optional Equipment You can call National Instruments to order the following optional equipment. • Rack-mount kit Single (one unit) Dual (two units) • Type SCSI-A cable 25-pin D-Sub to SCSI-1 (50-pin Champ) —1 m, 2 m, 3 m, 4 m, or 5 m lengths •...
  • Page 23: Inspection

    Description of the GPIB-SCSI-A Chapter 1 Inspection Before you install the GPIB-SCSI-A, inspect the shipping container and its contents for damage. Retain the packaging material for possible inspection or for reshipment. If the equipment appears to be damaged, do not attempt to operate it.
  • Page 24: Table 1-2. Environmental Characteristics

    Chapter 1 Description of the GPIB-SCSI-A Table 1-2. Environmental Characteristics Characteristic Specification Operating Temperature 0° to 40° C Storage Temperature -20° to 70° C Relative Humidity 10% to 90% noncondensing conditions FCC Class A Verified Table 1-3. Physical Characteristics Characteristic...
  • Page 25: Table 1-4. Maximum Transfer Rates

    Description of the GPIB-SCSI-A Chapter 1 Table 1-4. Maximum Transfer Rates Transfer Type Transfer Rate Buffered Transfer Rates: SCSI Reads to Buffer Memory 1 Mbytes/sec SCSI Writes from Buffer Memory 800 kbytes/sec GPIB Reads to Buffer Memory 980 kbytes/sec GPIB Writes from Buffer Memory...
  • Page 26: The Gpib-Scsi-A Front Panel

    Chapter 1 Description of the GPIB-SCSI-A The GPIB-SCSI-A Front Panel The front panel of the GPIB-SCSI-A is shown in Figure 1-1. Six status Light Emitting Diodes (LEDs) are mounted on the GPIB-SCSI-A front panel. The LEDs show the current status of the GPIB-SCSI-A at all times.
  • Page 28: The Scsi Port

    Description of the GPIB-SCSI-A The SCSI Port The SCSI port on the GPIB-SCSI-A uses a standard SCSI-1 50 pin shielded female connector with locking clamps. A diagram of the SCSI connector and the signals supported is shown in Figure 1-3 (a * suffix indicates that the signal is active low).
  • Page 29: The Gpib Port

    SIGNAL GROUND SHIELD Figure 1-4. The GPIB Connector and Signal Assignments Choosing Between S Mode and G Mode The GPIB-SCSI-A can operate in one of two modes: SCSI (S) mode or GPIB (G) mode. GPIB-SCSI-A User Manual 1-10 © National Instruments Corp.
  • Page 30: Figure 1-5. Scsi Computer Controlling Gpib Devices

    Chapter 1 Description of the GPIB-SCSI-A You will be connecting the GPIB-SCSI-A to both a SCSI device or system and a GPIB device or system. The mode of operation is determined from the method by which the GPIB-SCSI-A receives its programming instructions.
  • Page 31: Figure 1-6. A Scsi Bus Connected To A Gpib Controller

    Description of the GPIB-SCSI-A Chapter 1 Figure 1-6 shows the GPIB-SCSI-A operating in the G mode where the GPIB-SCSI-A enables SCSI devices to be accessed by a GPIB Controller. GPIB printer GPIB cable SCSI cable SCSI scanner GPIB Controller GPIB-SCSI-A...
  • Page 32: Installation And Configuration Of The Gpib-Scsi-A

    These steps are described in more detail in the following sections. Step 1. Verify the Voltage Requirement The GPIB-SCSI-A is shipped from the factory with a 100 to 120 VAC or 220 to 240 VAC power supply. Verify that the voltage specified on the label on the bottom of the GPIB-SCSI-A matches the voltage that is supplied in your area.
  • Page 33: Step 2. Configure The Operating Characteristics

    Figure 2-1 shows the factory default setting of the GPIB-SCSI-A for switch SW1. Switches 1 through 3 are ON, OFF, ON, respectively, to indicate that the SCSI ID of the GPIB-SCSI-A is 5. Switches 4 through 8 are OFF to indicate that the primary GPIB address of the GPIB-SCSI-A is 0.
  • Page 34 Chapter 2 Installation and Configuration of the GPIB-SCSI-A Tables 2-1 and 2-2 show the possible configurations of the eight switches and what each configuration indicates. Note: The factory default settings are in bold italic. Table 2-1. Configuration Parameters for Switches 1 through 3...
  • Page 35 Installation and Configuration of the GPIB-SCSI-A Chapter 2 Table 2-2. Configuration Parameters for Switches 4 through 8 Switches Indication OFF OFF OFF OFF OFF GPIB Primary address 0 OFF OFF OFF OFF GPIB Primary address 1 OFF OFF OFF GPIB Primary address 2...
  • Page 36: Configuration Switch Settings For Sw2 In S Mode

    1 2 3 4 5 6 7 8 Figure 2-2. SW2 Default Switch Settings Switch 8 is OFF, indicating that the GPIB-SCSI-A will be operating in S mode. Switch 7 is ON, indicating that the GPIB-SCSI-A will neither notice nor report SCSI parity errors. Switch 6 is ON, indicating that the GPIB-SCSI-A will buffer data during data transfer commands.
  • Page 37: Table 2-3. Possible Configurations For Sw2 In S Mode

    Installation and Configuration of the GPIB-SCSI-A Chapter 2 Table 2-3 shows the possible configurations of the eight switches in S mode and what each configuration indicates. Table 2-3. Possible Configurations for SW2 in S Mode Switch Position Indication S mode...
  • Page 38: Configuration Switch Settings For Sw2 In G Mode

    SCSI bus attached to the GPIB-SCSI-A. Switch 5 is OFF, indicating that the GPIB-SCSI-A responds to Major/Minor GPIB device addressing. Switch 4 is OFF indicating that the GPIB-SCSI-A will not assert EOI on the serial poll response byte. Switches 1 through 3 are OFF as they are reserved.
  • Page 39: Scsi Terminating Resistors

    Installation and Configuration of the GPIB-SCSI-A Chapter 2 Table 2-4 shows the possible configurations of the eight switches in G mode and what each configuration indicates. Table 2-4. Possible Configurations for SW2 in G Mode Switch Position Indication G mode...
  • Page 40: Figure 2-4. Gpib-Scsi-A Physically Located At End Of Scsi Bus

    Figure 2-4. GPIB-SCSI-A Physically Located at End of SCSI Bus If this is similar to your application, ensure that all devices between the two ends (for example, the two ends being the SCSI host and the GPIB-SCSI-A as shown in Figure 2-4) do not have terminating resistors installed. Also ensure that the GPIB-SCSI-A has the terminating resistor pack in place on one of the SCSI ports on the rear panel of the GPIB-SCSI-A.
  • Page 41: Step 3. Connect The Cables

    Installation and Configuration of the GPIB-SCSI-A Chapter 2 Figure 2-5 shows a system in which the GPIB-SCSI-A is not at the end of the system. SCSI disk drive SCSI host SCSI tape drive GPIB-SCSI-A Figure 2-5. GPIB-SCSI-A Not Physically Located at End of SCSI Bus...
  • Page 42: Step 4. Switch On Your Gpib-Scsi-A And Power On Your System

    Step 4. Switch On Your GPIB-SCSI-A and Power on Your System Power on your GPIB-SCSI-A by using the rocker switch on the rear panel. The POWER LED should come on immediately and the READY indicator on the front panel should come on after the GPIB-SCSI-A has passed its power-on self-test, indicating the unit is ready for operation.
  • Page 43: Technical Information

    This chapter contains detailed information for advanced users who want to increase the power of the GPIB-SCSI-A. The GPIB-SCSI-A is actually a powerful 8-bit microcomputer tailored for use as an IEEE 488-to-SCSI protocol controller. The operating system of the unit is contained in Read-Only Memory (ROM) and 256 kilobytes of Dynamic Random-Access Memory (DRAM).
  • Page 44: Buffering Methods

    Chapter 3 Buffering Methods In both S mode and G mode, the GPIB-SCSI-A supports three different methods of buffering data transferred between the GPIB and SCSI ports. In S mode, the buffering method can be chosen using switches 4 and 6 of SW2, or by using the config command.
  • Page 45: S Mode Operation

    SCSI system. In this mode, any SCSI device that can perform Initiator abilities (that is, the ability to select, command, and communicate with targets) on the SCSI can use the GPIB-SCSI-A to control a GPIB system of which the GPIB-SCSI-A is a part.
  • Page 46: Switch 6

    Status phase to CHECK CONDITION and the Extended Sense key to ERROR. To understand the error reporting technique employed on the GPIB-SCSI-A during S mode, see the S Mode Error Indication section in Chapter 4, Programming in S Mode.
  • Page 47: Switch 5

    (an error, a device clear, or END detected), the GPIB-SCSI-A sends all the valid data to the SCSI Initiator followed by a number of null bytes (0) equal to the difference of the original count requested and the actual count transferred.
  • Page 48: G Mode Operation

    Technical Information Chapter 3 Switch 4 OFF If Switch 4 is OFF and Switch 6 is ON, the GPIB-SCSI-A uses the single buffering method to buffer data transferred during the brd, bwrt, rd, and wrt commands. Switches 1 Through 3 Switches 1 through 3 are reserved for future use and should remain in the factory default position of OFF.
  • Page 49: Switch 6

    SCSI RST* signal. Switch 6 ON If Switch 6 is ON, the GPIB-SCSI-A causes a RESET condition on the SCSI bus at power on by asserting the SCSI RST* signal for approximately 100 µsec. Asserting the RST* signal for 25 µsec creates the SCSI RESET condition.
  • Page 50: Switch 5

    Additionally, you may create a RESET condition by issuing the rst command via the GPIB port. Switch 6 OFF If Switch 6 is OFF, the GPIB-SCSI-A does not cause a RESET condition on the SCSI bus at power-on. Switch 5...
  • Page 51: Switches 1 Through 3

    Switch 4 determines whether or not the GPIB-SCSI-A asserts the GPIB EOI* signal during a serial poll response. Switch 4 ON If Switch 4 is ON, the GPIB-SCSI-A asserts the GPIB EOI* signal during a serial poll response. Switch 4 OFF If Switch 4 is OFF, the GPIB-SCSI-A will not assert the GPIB EOI* signal during a serial poll response.
  • Page 52: Programming In S Mode

    Programming in S Mode This chapter explains how to program the GPIB-SCSI-A when operating in S mode. In this mode, the GPIB-SCSI-A can be programmed from any operating system and language that has access to a SCSI port. This chapter...
  • Page 53: Function Names And Opcodes

    In the discussion of each command in Chapter 5, S Mode Functions, there is an associated name for each command. These names do not have any meaning to the GPIB-SCSI-A, but it is suggested that you define constants with these names to represent the opcode for each GPIB-SCSI-A function in order to ease program reading and understanding.
  • Page 54: Gpib Address

    GPIB Read and Write Termination Method (END and EOS) You must program the GPIB-SCSI-A to talk in order to send data messages over the GPIB, and to listen in order to receive data messages from the GPIB. The IEEE 488 specification defines two methods that GPIB Talkers and Listeners can use to identify the last byte of data messages—END and EOS.
  • Page 55: The Scsi Message System And The Gpib-Scsi-A In S Mode

    Message Out phase. The Target does not have to process this ATTENTION condition. The GPIB-SCSI-A processes the ATTENTION condition, but only if the GPIB-SCSI-A is selected by the Initiator with the ATN* signal active. The GPIB-SCSI-A responds to this condition by entering the Message Out phase immediately after selection and receiving the message from the Initiator.
  • Page 56: S Mode Error Indication

    Status phase, the status byte that is sent (if any kind of error occurred) is the CHECK CONDITION status. At this point, the GPIB-SCSI-A also sets the Extended Sense key to further indicate the error that has occurred. To get the Sense data, you need to use the rqsns command to request that sense data be returned from the GPIB-SCSI-A to the Initiator.
  • Page 57: Disconnection/Reconnection During Data Transfers

    ATN* active to indicate that the Initiator has a message for the GPIB-SCSI-A. 2. Message Out Phase . As soon as the GPIB-SCSI-A is selected and before going into the Command phase, the GPIB-SCSI-A responds to the ATN* signal by going into the Message Out phase. The Initiator should then send the IDENTIFY message with bit 6 (the hex 0x40 bit) set to indicate that it can support disconnection/ reconnection.
  • Page 58 2. The Data Transfer is not using the SCSI port When there is no data to transfer on the SCSI port, and the data transfer is not complete, the GPIB-SCSI-A disconnects from the SCSI so that other devices can use the SCSI. This disconnection is accomplished by...
  • Page 59 Step 6 : Completes the command. If the GPIB-SCSI-A detects a condition on the GPIB port that causes a data transfer to abort (such as the END message or Device Clear), it immediately reconnects to the SCSI Initiator. If there is valid GPIB data that remains to...
  • Page 60: Disconnection/Reconnection While Waiting For Gpib Events

    ATN* active to indicate that the Initiator has a message for the GPIB-SCSI-A. 2. Message Out Phase . As soon as the GPIB-SCSI-A is selected and before going into the Command phase, the GPIB-SCSI-A responds to the ATN* signal by going into the Message Out phase. The Initiator then sends the IDENTIFY message with bit 6 (the hex 0x40 bit) set to indicate that it can support disconnection/ reconnection.
  • Page 61: S Mode Default Settings

    Chapter 4 If the Initiator does not indicate a desire to disconnect while waiting for the GPIB events to occur, the GPIB-SCSI-A will go into the Status phase immediately after it completes the Command phase, and remains in that phase until one of the conditions occurs.
  • Page 62: S Mode Functions

    Chapter 4 Programming in S Mode S Mode Functions The GPIB-SCSI-A S mode functions are divided into three main groups: GPIB functions, SCSI functions, and General Use functions. GPIB Function Group The GPIB functions are divided into subgroups. Table 4-2 lists these subgroups with the most frequently used groups listed first.
  • Page 63 0xC5 Change or disable GPIB EOS termination mode 0xC6 Enable or disable END termination message on GPIB write operations 0xCB Place the GPIB-SCSI-A online/offline 0xD1 Request System Control 0xD8 Change or disable time limits Serial Poll Functions: 0xD3 Conduct (request) a serial poll of...
  • Page 64 0xD5 Controller-In-Charge 0xD6 Set/clear remote enable Parallel Poll Functions: 0xC9 Set or clear individual status bit for use in GPIB-SCSI-A response to Parallel Polls 0xCD Parallel Poll Configure 0xCE Parallel Poll Unconfigure 0xD0 Conduct (request) a Parallel Poll © National Instruments Corp.
  • Page 65: Scsi Function Group

    SCSI Function Group The SCSI functions are provided to comply with the SCSI specification as well as to provide ways for users to determine internal conditions within the GPIB-SCSI-A. Table 4-3 lists these SCSI functions. Table 4-3. SCSI Functions Function...
  • Page 66: Alphabetical List Of S Mode Functions

    Chapter 4 Programming in S Mode Alphabetical List of S Mode Functions Table 4-5 contains an alphabetical list of all S mode functions. Table 4-5. GPIB-SCSI-A S Mode Functions Function Opcode Description 0xDD Low Level read GPIB data 0xDC Low Level write GPIB data...
  • Page 67 Programming in S Mode Chapter 4 Table 4-5. GPIB-SCSI-A S Mode Functions (continued) Function Opcode Description 0xD2 Check for a listening device 0xCA Place specified device into local mode 0xCB Place the GPIB-SCSI-A online/offline 0xCC Pass Control 0xCD Parallel Poll Configure...
  • Page 68: Chapter 5 S Mode Functions

    The purpose for the command • The associated Command Descriptor Block (CDB) that the GPIB-SCSI-A uses to interpret the command, along with the meaning of each bit, field, or byte within the CDB • Additional and related remarks concerning the command •...
  • Page 69: Understanding The Examples

    • Any bit, field, or byte in the Command Descriptor Blocks that is marked Reserved and is not zero when issued to the GPIB-SCSI-A will cause the GPIB-SCSI-A to abort the command, issue a CHECK CONDITION status response, and set the Sense Key to ILLEGAL REQUEST.
  • Page 70 Select the GPIB-SCSI-A with the SCSI ATN* signal asserted. • SCSIMesgOut([IDENTIFY message]) If the GPIB-SCSI-A is selected with the ATN* line asserted, the first phase it enters is the Message Out phase. The message sent here should be the IDENTIFY message. If you want to indicate support of disconnection/reconnection, bit 6 in the IDENTIFY message should be set (for example, 0xC0).
  • Page 71: S Mode Function Descriptions

    • SCSIRead(databuffer, count) The GPIB-SCSI-A is now in the Data In phase. As an Initiator, you should read data from the SCSI bus. This data comes from the GPIB. Count indicates the number of bytes desired.
  • Page 72: Brd - Board Level Read Data

    All data received is passed to the SCSI Initiator. If an error occurs with the GPIB, or the GPIB-SCSI-A receives an END condition, the GPIB-SCSI-A stops attempting to transfer data from the GPIB to the SCSI. Instead, the GPIB-SCSI-A finalizes processing of the command according to Switch 5 of configuration switch SW2.
  • Page 73 The only possible errors are an EABO (if the I/O time limit is exceeded) or an EADR (if the GPIB-SCSI-A has not been addressed by the Controller to listen). If an error occurs, the GPIB-SCSI-A will abort the command, issue a Check Condition status response, and set the Sense Key to ERROR.
  • Page 74 Chapter 5 S Mode Functions (continued) user through cmd if the GPIB-SCSI-A is CIC and the high- level command, rd, does not perform satisfactorily with your device. The information transfer phases that the GPIB-SCSI-A drives the SCSI through after selection are the Command, Data In, Status, and Message In phases.
  • Page 75 If Mbyte = SAVE DATA POINTER Set up necessary conditions and wait to be reconnected by the GPIB-SCSI-A. Upon reconnection, the GPIB-SCSI-A enters the Message In phase and sends an IDENTIFY message of 0x80. The Data In phase should resume.
  • Page 76 S Mode Functions (continued) /* In the outer While loop, wait until you * are sure that the GPIB-SCSI-A has finished * the command. The only time you can be sure * about this is after the final Status and * Message In phases.
  • Page 77: Bwrt - Board Level Write Data

    Switch 5 of configuration switch SW2. If Switch 5 is OFF, the GPIB-SCSI-A reads all the data from the SCSI Initiator until the count requested is exhausted. If Switch 5 is ON, the GPIB-SCSI-A immediately changes to the Status phase without transferring additional data.
  • Page 78 GPIB addressing. All addressing must be done by the CIC of the GPIB, or by the user through cmd if the GPIB-SCSI-A is CIC and the high- level command, wrt, does not perform satisfactorily with your device.
  • Page 79 250 bytes of data to the GPIB. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xDC Byte 1 = 0x00 Byte 2 = 0x00 Byte 3 = 0x00 Byte 4 = 0xFA Byte 5 = 0x00 SCSIArbitrate GPIB-SCSI-A User Manual 5-12 © National Instruments Corp.
  • Page 80 SCSIStatus(Sbyte) SCSIMesgIn(Mbyte) Done /* In the outer While loop, wait until you * are sure that the GPIB-SCSI-A has finished * the command. The only time you can be sure * about this is after the final Status and * Message In phases.
  • Page 81 (continued) * message. As long as the phase is the Data * Out phase, the GPIB-SCSI-A is receiving data * bytes from the SCSI to send to the GPIB. * The count of bytes specified in the CDB * should be sent.
  • Page 82: Cac - Become Active Controller

    GPIB-SCSI-A takes control after any handshake in progress completes–that is, it takes control synchronously. If you call cac and the GPIB-SCSI-A is not Controller-In- Charge (CIC), the GPIB-SCSI-A records the ECIC error, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR.
  • Page 83 Byte 2 = 0x00 Byte 3 = 0x00 Byte 4 = 0x00 Byte 5 = 0x00 2. Request the GPIB-SCSI-A to become Active Controller of the GPIB synchronously. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC0 Byte 1 = 0x00...
  • Page 84: Caddr - Change The Gpib Address Of The Gpib-Scsi-A

    GPIB-SCSI-A Type: Initialization function Purpose: Use caddr at the beginning of your program to change the GPIB address of the GPIB-SCSI-A from that indicated on configuration switch SW1, or to assign a secondary GPIB address to the GPIB-SCSI-A. Format: Byte...
  • Page 85 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to change its primary GPIB address to 5, with no secondary addressing. If secondary addressing were enabled, this would disable secondary addressing, too.
  • Page 86 Chapter 5 S Mode Functions caddr (continued) 2. Request the GPIB-SCSI-A to change its primary GPIB address to 8, with a secondary address of 2. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC1 Byte 1 = 0x40 Byte 2 = 0x14...
  • Page 87: Clr - Clear Specified Device

    The argument GPIB Primary Address along with the GPIB Secondary Address indicates the address of the device to which the GPIB-SCSI-A issues an SDC command. To indicate that the GPIB Secondary Address contains a valid device address, Mode should be set to 1.
  • Page 88 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to send SDC to the GPIB device with primary address 9, secondary address 5. Build SCSI Command Descriptor Block (CDB)
  • Page 89 S Mode Functions Chapter 5 (continued) 2. Request the GPIB-SCSI-A to send SDC to the GPIB device with primary address 15 and no secondary address. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC2 Byte 1 = 0x78 Byte 2 = 0x00...
  • Page 90: Cmd - Send Gpib Commands

    Do not use cmd to send programming instructions to devices. Use rd, wrt, brd, and bwrt to send or receive programming instructions and other device-dependent information. © National Instruments Corp. 5-23 GPIB-SCSI-A User Manual...
  • Page 91 (except for the successful transfer of commands), the count may be less than expected. The only possible errors are ECIC (if the GPIB-SCSI-A is not Controller-In-Charge (CIC)), ENOL (if there is no device on the bus receiving the command bytes), or EABO (if the I/O time limit is exceeded).
  • Page 92 Chapter 5 S Mode Functions (continued) Example: The GPIB-SCSI-A is commanded to send four bytes across the GPIB with the GPIB ATN* signal asserted. This is interpreted as GPIB command data. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC4...
  • Page 93: Config - Read/Change Gpib-Scsi-A Configuration

    S Mode Functions Chapter 5 config - Read/Change GPIB-SCSI-A Configuration Type: General Use function Purpose: Use config when you want the GPIB-SCSI-A to change or report its current operating configuration. Format: Byte Opcode = DE H High 4 bits of Size Rsvd...
  • Page 94 Use the Double Buffering method. The Size argument is used to change the size of the internal buffer used by the GPIB-SCSI-A. This buffer is used by the brd,bwrt,rd, and wrt commands when Single or Double Buffering is enabled. The actual buffer size is set to the lower of the Size argument and the amount of DRAM available for use.
  • Page 95 S Mode Functions Chapter 5 config (continued) The GPIB-SCSI-A responds by sending five bytes to the Initiator during the Data In phase representing the following: • Byte 1: Power-On SW2 configuration • Byte 2: Power-On SW1 configuration • Byte 3: High byte of current buffer size •...
  • Page 96 (continued) Example: Request the GPIB-SCSI-A to return to the Initiator the five bytes of parameter identification. The buffering method used is Single Buffering, and the buffer size is set to 32K. The Parallel Poll subset used by the GPIB-SCSI-A is set to PP1.
  • Page 97: Eos - Change/Disable Gpib Eos Termination Mode

    Use eos at the beginning of your program if you want to use an End-Of-String (EOS) mode when you transfer data to and from the GPIB. eos tells the GPIB-SCSI-A when to stop reading information from the GPIB. eos also enables the GPIB-SCSI-A to tell other devices that it is finished writing information to the GPIB.
  • Page 98 EOS character's ASCII value. If the second and third methods are chosen, a full 8-bit comparison is used. Note: Defining an EOS byte for the GPIB-SCSI-A does not cause the GPIB-SCSI-A to insert that byte into the data string when performing GPIB writes. To send...
  • Page 99 CDB, only the place where the CDB is created is repeated. Example 3 contains the entire program sequence. 1. Command the GPIB-SCSI-A to terminate GPIB reads when <LF> is detected with an 8-bit comparison. The GPIB-SCSI-A will not assert EOI* when writing <LF>.
  • Page 100 Chapter 5 S Mode Functions (continued) 2. Command the GPIB-SCSI-A to assert EOI* with a <CR> on GPIB writes and a 7-bit comparison. The GPIB-SCSI-A will not terminate GPIB reads when <CR> is detected. Build SCSI Command Descriptor Block (CDB)
  • Page 101: Eot - Enable/Disable End Message On Gpib Writes

    Use eot at the beginning of your program if you want to change how the GPIB-SCSI-A terminates GPIB writes. Using eot, you tell the GPIB-SCSI-A to automatically send or not send the GPIB END message with the last byte that it writes to the GPIB.
  • Page 102 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to not assert the GPIB EOI* signal with the last byte of GPIB writes. Build SCSI Command Descriptor Block (CDB)
  • Page 103: Gts - Go From Active Controller To Standby

    If Mode is 1, shadow handshaking is enabled. If Mode is 0, shadow handshaking is not performed. gts causes the GPIB-SCSI-A to go to the Controller Standby state and to unassert the ATN* signal if it is initially the Active Controller. gts permits GPIB devices to transfer data without the GPIB-SCSI-A participating in the transfer.
  • Page 104 EOS detection if the End-Of-String character used by the Talker is not known. If you call gts and the GPIB-SCSI-A is not Controller-In- Charge (CIC), the GPIB-SCSI-A records the ECIC error, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR.
  • Page 105 S Mode Functions Chapter 5 (continued) 2. Request the GPIB-SCSI-A to become Standby Controller and shadow handshake the data on the GPIB. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC7 Byte 1 = 0x00 Byte 2 = 0x00...
  • Page 106: Id - Identify System

    The third string identifies the number of bytes of DRAM in the GPIB-SCSI-A that are available for use as buffer space. The information transfer phases that the GPIB-SCSI-A drives the SCSI through after selection are the Command, Data In, Status, and Message In phases.
  • Page 107 S Mode Functions Chapter 5 (continued) Example: 1. Request the GPIB-SCSI-A to return the System Identification strings to the Initiator during the Data In phase. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC8 Byte 1 = 0x00 Byte 2 = 0x00...
  • Page 108: Inq - Inquiry

    Length of zero indicates that no bytes of inquiry data are transferred. Any other value indicates the maximum number of bytes that are transferred, up to 49. The GPIB-SCSI-A terminates the Data In phase when Allocation Length bytes have transferred or when all available inquiry data have transferred to the Initiator, whichever is less.
  • Page 109 S Mode Functions Chapter 5 (continued) Table 5-3. Inquiry Data Format for the GPIB-SCSI-A Byte Value Description Peripheral Device Type Device Type Qualifier ISO Version 0, ECMA Version 0, ANSI Approved Version 1 SCSI-2 Inquiry Data Format Additional Inquiry Data Bytes...
  • Page 110 Chapter 5 S Mode Functions (continued) Table 5-3. Inquiry Data Format for the GPIB-SCSI-A (continued) Byte Value Description Command 3, Request Sense No commands in this range Command 18, Inquiry No commands in this range Bit map of Group 6 (Vendor Unique)
  • Page 111 S Mode Functions Chapter 5 (continued) Example: Request the GPIB-SCSI-A to return 49 bytes of inquiry data to the Initiator during the Data In phase. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0x12 Byte 1 = 0x00 Byte 2 = 0x00...
  • Page 112: Ist - Set Or Clear Individual Status Bit

    Reserved Reserved Remarks: If Mode is 1, the individual status bit of the GPIB-SCSI-A is set to 1. If Mode is 0, the individual status bit of the GPIB-SCSI-A is cleared. The power-on default is 0. The information transfer phases that the GPIB-SCSI-A drives the SCSI through after selection are the Command, Data In, Status, and Message In phases.
  • Page 113 Because the only difference between Examples 1 and 2 is the CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to clear its Individual Status bit. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC9...
  • Page 114: Lines - Return The State Of The Eight Gpib Control Lines

    If the mask bit is 0, then the corresponding bit in the first byte should be disregarded. The information transfer phases that the GPIB-SCSI-A drives the SCSI through after selection are the Command, Data In, Status, and Message In phases.
  • Page 115 S Mode Functions Chapter 5 lines (continued) Example: Request the GPIB-SCSI-A to return the current state of the eight GPIB control lines. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC3 Byte 1 = 0x00 Byte 2 = 0x00...
  • Page 116: Ln - Check For The Presence Of A Listening Device On The Bus

    GPIB Primary Address. If this is the first function you call that requires GPIB Controller capability, and you have not disabled System Controller capability with rsc, the GPIB-SCSI-A sends © National Instruments Corp. 5-49 GPIB-SCSI-A User Manual...
  • Page 117 SCSI through after selection are the Command, Data In, Status, and Message In phases. Example: 1. Request the GPIB-SCSI-A to detect if there are any GPIB devices located at primary address 1. All secondary addresses are checked. Build SCSI Command Descriptor Block (CDB)
  • Page 118: Loc - Go To Local

    Remarks: This function is used to configure a specified device for local program mode. It can be used to configure the GPIB-SCSI-A as well as other devices. When the Me bit is 0, the GPIB-SCSI-A configures another device. When the Me bit is 1, the GPIB-SCSI-A configures itself.
  • Page 119 If you passed control to some other GPIB device, control must be passed back to you or you must send IFC to make yourself CIC before making this call. Otherwise, the GPIB-SCSI-A aborts the command, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR.
  • Page 120 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to send the Go To Local (GTL) command to the GPIB device with primary address 1, secondary address 2.
  • Page 121: Onl - Place The Gpib-Scsi-A Online/Offline

    Reserved Reserved Remarks: If Mode is 1, the GPIB-SCSI-A places itself online. If Mode is 0, the GPIB-SCSI-A places itself offline. By default, the GPIB-SCSI-A powers up online, is in the Idle Controller state, and configures itself to be the System Controller.
  • Page 122 Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to go offline. This means that the GPIB-SCSI-A ignores all GPIB activity, just as if the GPIB cable were removed from the GPIB-SCSI-A. Build SCSI Command Descriptor Block (CDB)
  • Page 123: Pct - Pass Control

    Reserved Reserved Reserved Remarks: If you call pct and the GPIB-SCSI-A is not Controller-In- Charge (CIC), the GPIB-SCSI-A records the ECIC error, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR. If Mode is 0 and there is anything in the GPIB Secondary...
  • Page 124 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to send TCT to the GPIB device with primary address 3, secondary address 0. Build SCSI Command Descriptor Block (CDB)
  • Page 125: Ppc - Parallel Poll Configure

    It can be used to configure the GPIB-SCSI-A as well as other devices. When the Me bit is 0, the GPIB-SCSI-A configures another device. When the Me bit is 1, the GPIB-SCSI-A configures itself.
  • Page 126 Message In phases. The following paragraphs apply when configuring the GPIB-SCSI-A (Me bit is 1): In order for the GPIB-SCSI-A to configure itself for parallel polls, it must be configured to accept local parallel poll configurations. Thus, the GPIB-SCSI-A must be using IEEE 488 Parallel Poll (PP) interface function subset PP2.
  • Page 127 CDB, only the place where the CDB is created is repeated. Example 3 contains the entire program sequence. 1. Request the GPIB-SCSI-A to configure the device at primary address 24 to respond on GPIB data line 7 when its individual status (ist) bit is set.
  • Page 128 (continued) Byte 3 = 0x00 Byte 4 = 0x6E Byte 5 = 0x00 2. Request the GPIB-SCSI-A to disable the device at primary address 1 from responding to parallel polls. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xCD...
  • Page 129: Ppu - Parallel Poll Unconfigure

    If you passed control to some other GPIB device, control must be passed back to you or you must send IFC to make yourself CIC before making this call. Otherwise, the GPIB-SCSI-A aborts the command, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR.
  • Page 130 SCSI through after selection are the Command, Status, and Message In phases. See Also: ist, ppc, rpp, and Appendix E, Parallel Polling. Example: Request the GPIB-SCSI-A unconfigure the devices from responding to parallel polls. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xCE Byte 1 = 0x00...
  • Page 131: Rd - Read Data

    Count can represent a number between 0 and 2,097,152. All data received is passed to the SCSI Initiator. If an error occurs with the GPIB, or the GPIB-SCSI-A receives an END condition, the GPIB-SCSI-A stops attempting to transfer data from the GPIB to the SCSI. Instead, the GPIB-SCSI-A finalizes processing of the command according to Switch 5 of configuration switch SW2.
  • Page 132 Chapter 5 S Mode Functions (continued) analyze the GPIB-SCSI-A status that contains a count equal to the exact number of bytes read from the GPIB. This number represents the number of valid data bytes received. The rd operation terminates when: •...
  • Page 133 IFC* to make yourself CIC before making this call), or EBUS (if the command bytes used for addressing cannot be sent out). If an error occurs, the GPIB-SCSI-A aborts the command, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR.
  • Page 134 Byte 0 = 0xCF Byte 1 = 0x20 Byte 2 = 0x00 Byte 3 = 0x05 Byte 4 = 0x46 Byte 5 = 0x00 SCSIArbitrate SCSISelect(GPIB-SCSI-A id) SCSICmd(CDB) SCSIRead(databuffer, 1350) SCSIStatus(Sbyte) SCSIMesgIn(Mbyte) ErrorCheck © National Instruments Corp. 5-67 GPIB-SCSI-A User Manual...
  • Page 135 If Mbyte = SAVE DATA POINTER Set up necessary conditions and wait to be reconnected by the GPIB-SCSI-A. Upon reconnection, the GPIB-SCSI-A enters the Message In phase and sends an IDENTIFY message of 0x80. Data In phase should resume. GPIB-SCSI-A User Manual 5-68 ©...
  • Page 136 * from the SCSI or, after reconnection, is * sending the IDENTIFY message. As long as * the phase is the Data In phase, the * GPIB-SCSI-A has data bytes from the GPIB to * send to the Initiator. ErrorCheck © National Instruments Corp.
  • Page 137: Rpp - Request (Conduct) A Parallel Poll

    Reserved Reserved Remarks: rpp causes the GPIB-SCSI-A to conduct a parallel poll of previously configured devices by sending the IDY message (ATN* and EOI* both asserted) and reading the response from the GPIB data lines. The GPIB-SCSI-A pulses the IDY message for greater than or equal to 2 µsec and expects valid...
  • Page 138 See Also: ist, ppc, ppu, and Appendix E, Parallel Polling. Examples: Request the GPIB-SCSI-A to execute a Parallel Poll on the GPIB. The response is returned during the Data In phase as one unsigned byte. Build SCSI Command Descriptor Block (CDB)
  • Page 139: Rqsns - Request Sense

    S Mode Functions Chapter 5 rqsns - Request Sense Type: General Use function Purpose: Use rqsns when you want the GPIB-SCSI-A to report its sense data to detail problems that have occurred. Format: Byte Opcode = 03 H Reserved Reserved...
  • Page 140 Chapter 5 S Mode Functions rqsns (continued) Table 5-4 contains the format for the Sense data of the GPIB-SCSI-A along with a description about each byte. Table 5-4. Sense Data Format for the GPIB-SCSI-A Byte Value Description Error class 7, code 0...
  • Page 141 Indicates that the GPIB-SCSI-A aborted the command. You may be able to recover by trying the command again. The information transfer phases that the GPIB-SCSI-A drives the SCSI through after selection are the Command, Data In, Status, and Message In phases.
  • Page 142 Chapter 5 S Mode Functions rqsns (continued) Example: Request the GPIB-SCSI-A to return to the Initiator 16 bytes of sense data during the Data In phase. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0x03 Byte 1 = 0x00...
  • Page 143: Rsc - Request/Release System Control

    Mode Reserved Reserved Remarks: If Mode is 1, the GPIB-SCSI-A configures itself to be the GPIB System Controller. If Mode is 0, the GPIB-SCSI-A does not configure itself as System Controller. As System Controller, the GPIB-SCSI-A can send the Interface Clear (IFC*) and Remote Enable (REN*) messages to GPIB devices.
  • Page 144 Chapter 5 S Mode Functions (continued) The information transfer phases that the GPIB-SCSI-A drives the SCSI through after selection are the Command, Status, and Message In phases. See Also: sic and sre. Examples: Note: Because the only difference between Examples 1 and 2 is the CDB, only the place where the CDB is created is repeated.
  • Page 145 S Mode Functions Chapter 5 (continued) 2. Request the GPIB-SCSI-A to configure itself as System Controller. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xD1 Byte 1 = 0x00 Byte 2 = 0x00 Byte 3 = 0x01 Byte 4 = 0x00...
  • Page 146: Rsp - Request (Conduct) A Serial Poll

    Consult your device documentation for interpretation of the response byte. If a device does not respond in the timeout period, the GPIB-SCSI-A returns -1 (FF hex) and records the EABO error. The time limit is set to 1/10 sec. © National Instruments Corp.
  • Page 147 S Mode Functions Chapter 5 (continued) The GPIB-SCSI-A returns the serial poll response following the poll in the form of a 1 byte binary number during the Data In phase. If this is the first function you call that requires GPIB...
  • Page 148 S Mode Functions (continued) Example: Request the GPIB-SCSI-A to execute a serial poll of the device with primary GPIB address of 3. The response is returned during the Data In phase as one byte. Build SCSI Command Descriptor Block (CDB)
  • Page 149: Rsv - Request Service/Set Or Change Serial Poll Status Byte

    Type: Serial Poll function Purpose: Use rsv if the GPIB-SCSI-A is not the GPIB Controller and you want to request service from the Controller using the Service Request (SRQ) signal. The GPIB-SCSI-A provides the user defined status byte indicated by this command when the Controller serial polls it.
  • Page 150 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to set its serial poll response byte to 6 and assert the GPIB SRQ* signal. Build SCSI Command Descriptor Block (CDB)
  • Page 151: Sic - Send Interface Clear

    GPIB and makes the GPIB-SCSI-A CIC. When needed, sic is generally used at the beginning of a program to make the GPIB-SCSI-A CIC and is used when a bus fault condition is suspected. The IFC* signal resets only the GPIB interface functions of bus devices and not the internal device functions.
  • Page 152 Message In phases. See Also: clr and Appendix C, Operation of the GPIB. Examples: Request the GPIB-SCSI-A to become CIC by asserting the GPIB IFC* signal. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xD5 Byte 1 = 0x00...
  • Page 153: Sre - Set/Clear Remote Enable

    Mode Reserved Reserved Remarks: If Mode is 1, the GPIB-SCSI-A asserts the Remote Enable (REN*) signal. If Mode is 0, the GPIB-SCSI-A unasserts REN*. Many GPIB devices have a remote program mode and a local program mode. It is usually necessary to place devices in remote mode before programming them from the GPIB.
  • Page 154 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to turn off the REN* signal on the GPIB. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xD6...
  • Page 155 S Mode Functions Chapter 5 (continued) 2. Request the GPIB-SCSI-A to assert the GPIB REN* signal. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xD6 Byte 1 = 0x00 Byte 2 = 0x00 Byte 3 = 0x01 Byte 4 = 0x00...
  • Page 156: Stat - Return Gpib-Scsi-A Status

    Type: General Use function Purpose: Use stat to obtain the status of the GPIB-SCSI-A to see if certain conditions are currently present. stat is used most often to see if the previous operation resulted in an error. stat is also used to configure the GPIB-SCSI-A for continuous status reporting.
  • Page 157 The highest order bit of status, also called the sign bit, is set when the GPIB-SCSI-A detects either a GPIB error or a SCSI port error. Consequently, if the status is negative, an error condition exists.
  • Page 158 Byte 7: High byte of low word of Count of bytes transferred during a rd, wrt, brd, bwrt, or cmd. • Byte 8: Low byte of low word of Count of bytes transferred during a rd, wrt, brd, bwrt, or cmd. © National Instruments Corp. 5-91 GPIB-SCSI-A User Manual...
  • Page 159 S Mode Functions Chapter 5 stat (continued) Table 5-6 contains a list of the GPIB-SCSI-A status conditions along with each condition's numeric value, bit, and a brief description. Table 5-6. GPIB-SCSI-A Status Conditions Numeric Value (n) Status Description -32768 Error detected...
  • Page 160 Chapter 5 S Mode Functions stat (continued) Table 5-6. GPIB-SCSI-A Status Conditions (continued) Numeric Value (n) Status Description TACS Talker active LACS Listener active DTAS Device trigger state DCAS Device clear state Tables 5-7 and 5-8 contain lists of possible error conditions for the GPIB and SCSI, respectively, along with a numeric value and a brief description of each condition.
  • Page 161 No SCSI error condition to report Reserved EPAR SCSI parity error occurred. No steps were taken by the GPIB-SCSI-A, but the data read from the SCSI and given to the GPIB may be corrupt. A detailed description of the conditions under which each bit...
  • Page 162 S Mode Functions stat (continued) In general, the GPIB-SCSI-A updates the first three status variables at the end of each programming message. It updates the fourth status variable, count, after a cmd, rd, brd, bwrt, or wrt function. Errors reported correspond to the previous programming message.
  • Page 163 S Mode Functions Chapter 5 stat (continued) Examples: 1. Request the GPIB-SCSI-A to return to the Initiator all eight bytes of the internal status recorded by the GPIB-SCSI-A. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xD7 Byte 1 = 0x00...
  • Page 164 Byte 3 = 0x00 Byte 4 = 0x00 Byte 5 = 0x00 SCSIArbitrate SCSISelect(GPIB-SCSI-A id) SCSICmd(CDB) /* Call a routine that will read in the eleven * Message In bytes. SCSIExtMesgIn(statusinf, 11) SCSIStatus(Sbyte) SCSIMesgIn(Mbyte) ErrorCheck © National Instruments Corp. 5-97 GPIB-SCSI-A User Manual...
  • Page 165: Tmo - Change Or Disable Time Limit

    Type: Initialization function Purpose: Use tmo at the beginning of your program to change the time limits in effect on the GPIB-SCSI-A. The time limits prevent the GPIB-SCSI-A from hanging indefinitely when waiting for critical events to occur. Format: Byte...
  • Page 166 T300 msec 300 msec T1 sec 1 sec T3 sec 3 sec T10 sec 10 sec T30 sec 30 sec T100 sec 100 sec T300 sec 300 sec T1000 sec 1000 sec © National Instruments Corp. 5-99 GPIB-SCSI-A User Manual...
  • Page 167 The assignment made by this function remains in effect until you call tmo again, call onl, or turn off the GPIB-SCSI-A. If you call tmo with Mode greater than decimal 17, the GPIB-SCSI-A aborts the command, issues a CHECK CONDITION status response, and sets the Sense Key to ILLEGAL REQUEST.
  • Page 168 Chapter 5 S Mode Functions (continued) Example: Request the GPIB-SCSI-A to change its I/O time limit to 30 sec. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xD8 Byte 1 = 0x00 Byte 2 = 0x00 Byte 3 = 0x0E...
  • Page 169: Trg - Trigger Specified Device

    The argument GPIB Primary Address along with GPIB Secondary Address indicates the address of the device that the GPIB-SCSI-A will trigger. To indicate that GPIB Secondary Address contains a valid device address, Mode must be set to If this is the first function you call that requires GPIB...
  • Page 170 CDB, only the place where the CDB is created is repeated. Example 2 contains the entire program sequence. 1. Request the GPIB-SCSI-A to send the Group Execute Trigger (GET) message to the GPIB device with primary address 2, secondary address...
  • Page 171 S Mode Functions Chapter 5 (continued) 2. Request the GPIB-SCSI-A to send GET to the GPIB device with primary address 20 with no secondary address. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xC2 Byte 1 = 0xA0 Byte 2 = 0x00...
  • Page 172: Wait - Wait For Selected Event

    - Wait for Selected Event Type: General Use function Purpose: Use wait to monitor selected GPIB events and to delay any further GPIB-SCSI-A activity until any of them occur. Format: Byte Opcode = DA H High Byte of Wait Mask...
  • Page 173 SRQI bit is set in the returned status indicators. To prevent the GPIB-SCSI-A from waiting indefinitely for SRQ* to be asserted, set the SRQI and TIMO bits by setting mask to 4096 + 16384 (5000 hex). This causes the wait to terminate either on SRQI or TIMO, whichever occurs first.
  • Page 174 If any bits listed in Table 5-10 as Reserved are set in the Wait Mask, the GPIB-SCSI-A aborts the command, issues a CHECK CONDITION status response, and sets the Sense Key to ILLEGAL REQUEST.
  • Page 175 While Waiting for GPIB Events section in Chapter 4, Programming in S Mode. Examples: 1. Use wait without the SCSI disconnection/reconnection capability to wait indefinitely for the GPIB-SCSI-A to become either GPIB listen or talk addressed before continuing. Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xDA...
  • Page 176 (continued) 2. Use wait with the SCSI disconnection/reconnection capability to wait for the GPIB-SCSI-A to either timeout or detect the END message along the GPIB (either EOS sent or EOI* signaled). Build SCSI Command Descriptor Block (CDB) Byte 0 = 0xDA...
  • Page 177: Wrt - Write Data

    Switch 5 of configuration switch SW2. If Switch 5 is OFF, the GPIB-SCSI-A reads all the data from the SCSI Initiator until the count requested is exhausted. If Switch 5 is ON, the GPIB-SCSI-A immediately changes to the Status phase without transferring additional data.
  • Page 178 If the GPIB-SCSI-A is CIC, wrt causes the GPIB-SCSI-A to address itself to talk if it is not already addressed. The GPIB-SCSI-A also addresses the device indicated by the Address values in the CDB to listen.
  • Page 179 EBUS (if the command bytes used for addressing cannot be sent out), or ENOL (if there are no addressed Listeners when the GPIB-SCSI-A begins to write data). If an error occurs, the GPIB-SCSI-A aborts the command, issues a CHECK CONDITION status response, and sets the Sense Key to ERROR.
  • Page 180 Byte 0 = 0xDB Byte 1 = 0x48 Byte 2 = 0x0C Byte 3 = 0x00 Byte 4 = 0x32 Byte 5 = 0x00 SCSIArbitrate SCSISelect(GPIB-SCSI-A id) SCSICmd(CDB) SCSIWrite(databuffer, 50) SCSIStatus(Sbyte) SCSIMesgIn(Mbyte) ErrorCheck © National Instruments Corp. 5-113 GPIB-SCSI-A User Manual...
  • Page 181 If Mbyte = SAVE DATA POINTER Set up necessary conditions and wait to be reconnected by the GPIB-SCSI-A. Upon reconnection, the GPIB-SCSI-A enters the Message In phase and sends an IDENTIFY message of 0x80. Data Out phase should resume. GPIB-SCSI-A User Manual 5-114 ©...
  • Page 182 SCSIStatus(Sbyte) SCSIMesgIn(Mbyte) Done In the outer While loop, wait until you are sure that the GPIB-SCSI-A has finished the command. The only time you can be sure about this is after the final Status and Message In phases–that is why Done is set in the Status phase condition.
  • Page 183: Programming In G Mode

    (<LF><CR>). Example of a Programming Message In the following lines of code, the GPIB-SCSI-A is commanded to return its system identification to the Command and Status Channel's buffer. The code then retrieves this information and displays it on the computer.
  • Page 184 Programming in G Mode Chapter 6 Note: This example uses the National Instruments NI-488 functions for an Apple Macintosh computer using THINK C. char *wrtbuf, *rdbuf; int gpibscsia; if (gpibscsia = ibfind("gpibscsia")) /* Open GPIB communications with the * Command and Status Channel printf("gpibscsia not found.\n");...
  • Page 185: How Messages Are Processed

    %s\n", rdbuf) /* Because calloc clears the memory we allocated, * and the GPIB-SCSI-A does not have a null byte * in the system identification, we can use the * C printing of a string until a null character * to print the response.
  • Page 186: Function Argument Delimiters

    Unless otherwise indicated, when you are asked for a numerical value, you can supply the value in any of the above mentioned ways. Although the GPIB-SCSI-A accepts numerical values in any of the previous four formats, all the responses generated by the GPIB-SCSI-A are in decimal.
  • Page 187: Status And Error Information

    C flag in the stat command. In the event of an error, the GPIB-SCSI-A may or may not complete the command to its fullest extent, depending on the error.
  • Page 188: Addressing Terminology

    For example, if you have a SCSI disk drive that responds to a SCSI Target ID of 4 connected to the GPIB-SCSI-A and you want to send data from your computer over the GPIB to be stored on the disk drive, you must complete the following steps: 1.
  • Page 189: The Gpib-Scsi-A And Scsi System As Talker

    3. The information bytes received from the Status and Message In phases are stored in a buffer in the GPIB-SCSI-A and can be retrieved by reading GPIB data from the Command and Status Channel. The LISTEN LED on the GPIB-SCSI-A front panel is lit when the GPIB-SCSI-A is addressed to listen.
  • Page 190 For example, if you have a SCSI disk drive that responds to a SCSI Target ID of 4 connected to the GPIB-SCSI-A and you want to receive data from the disk drive into your computer through the GPIB, you must complete the following steps: 1.
  • Page 191: Gpib Read And Write Termination (End And Eos)

    GPIB-SCSI-A asserts EOI* with the last byte of its response. When the GPIB-SCSI-A receives the Data Channel talk address, the GPIB-SCSI-A automatically asserts EOI* on the last byte of data to be transferred from the SCSI to the GPIB. When the GPIB-SCSI-A receives...
  • Page 192: Scsi Data Transmission

    SCSI Data Transmission The GPIB-SCSI-A optionally checks the data received from the SCSI system for parity errors. If a SCSI port error occurs, the GPIB-SCSI-A records the appropriate error code in its status area. To determine if a SCSI error has occurred, use stat to request GPIB-SCSI-A status information.
  • Page 193: Commands That Do Not Require A Data Phase

    Selection: 1. The Message Out phase if the Target responds to the SCSI ATN* signal. The message that the GPIB-SCSI-A sends to the Target is an IDENTIFY message. This IDENTIFY contains the Logical Unit Number set with the lun command. IDENTIFY also contains the bit that indicates that the GPIB-SCSI-A supports the disconnection/reconnection feature of the SCSI.
  • Page 194: Commands That Require A Data Out Phase

    If the Target attempts a disconnection/reconnection, the Target completes the following phase sequence: 1. The Message In phase (to alert the GPIB-SCSI-A that the Target is about to disconnect from the SCSI by releasing BSY*). All messages received are placed into the Command and Status Channel buffer.
  • Page 195: G Mode Default Settings

    SCSI Configuration functions, GPIB Configuration functions, and General Use functions. The following G mode function tables contain the programming messages that are sent to the GPIB-SCSI-A from a GPIB Talker to configure the GPIB-SCSI-A. Note: Boldface letters contained within each function indicate the abbreviated form that you can use for that function.
  • Page 196: Scsi Function Group

    Performs a the low-level operation to finish the SCSI command by getting the Status and Message In bytes from the SCSI device. dtin Low-level command to set up the GPIB-SCSI-A to accept SCSI data. dtout Low-level command to set up the GPIB-SCSI-A to send data. format Issue the high-level FORMAT command to the specified Target.
  • Page 197 Issue the high-level MODE SENSE command to the specified Target. msgin Performs the low-level command to get Message In data to the GPIB-SCSI-A from the selected SCSI Target. msgout Performs the low-level command to send message bytes to the selected Target during the Message Out phase.
  • Page 198 Target. rsrvu Issue the high-level RESERVE UNIT command to reserve operations in the specified Target for the GPIB-SCSI-A. Asserts the SCSI RST* line for approximately 100 µsec. The assertion of this line for 25 µsec should indicate a valid reset condition.
  • Page 199 Issue the high-level Group 1 WRITE EXTENDED command to the specified Target. write Issue the high-level Group 0 WRITE command to the specified Target. wrtbuf Issue the high-level WRITE BUFFER command to the specified Target. © National Instruments Corp. 6-17 GPIB-SCSI-A User Manual...
  • Page 200: Scsi Configuration Function Group

    Descriptor Block. Specify a padding byte that the GPIB-SCSI-A will append to any data going from the GPIB-SCSI-A to a SCSI device after the GPIB-SCSI-A has received END or an error has occurred. Specify a SCSI Target ID that will be used during high-level calls for selection purposes.
  • Page 201: Gpib Configuration Function Group

    Table 6-4. General Use Functions Function Description config Read or change GPIB-SCSI-A configuration. Identify the GPIB-SCSI-A. stat Select the type of status reporting desired from the GPIB-SCSI-A, or request the status. © National Instruments Corp. 6-19 GPIB-SCSI-A User Manual...
  • Page 202: List Of G Mode Functions In Alphabetical Order

    Programming in G Mode Chapter 6 List of G Mode Functions in Alphabetical Order Table 6-5 is an alphabetical list of all G mode functions. Table 6-5. GPIB-SCSI-A G Mode Functions Function Description autotst Configure the GPIB-SCSI-A to automatically test a list of Targets when it is idle.
  • Page 203 Chapter 6 Programming in G Mode Table 6-5. GPIB-SCSI-A G Mode Functions (continued) Function Description getscsi Perform the low-level command to arbitrate for the SCSI bus. hcmd Issue a high-level command to the specified Target using the command bytes following hcmd.
  • Page 204 Programming in G Mode Chapter 6 Table 6-5. GPIB-SCSI-A G Mode Functions (continued) Function Description rblks Issue the high-level REASSIGN BLOCKS command to the specified Target. rcdia Issue the high-level RECEIVE DIAGNOSTICS command to the specified Target. rcnct Routine to set up the GPIB-SCSI-A for reconnection to a disconnected Target.
  • Page 205 Chapter 6 Programming in G Mode Table 6-5. GPIB-SCSI-A G Mode Functions (continued) Function Description rqsns Issue the high-level REQUEST SENSE command to the specified Target. rsrvu Issue the high-level RESERVE UNIT command to reserve operations in the specified Target for the GPIB-SCSI-A.
  • Page 206: Operation Of The Gpib-Scsi-A As A Gpib Device

    Target. Operation of the GPIB-SCSI-A as a GPIB Device In G Mode, a GPIB-SCSI-A device operates like other GPIB devices. As a result, GPIB-SCSI-A device is configured to respond in a variety of ways to GPIB commands. The following are methods by which GPIB-SCSI-A responds to GPIB commands.
  • Page 207: Serial Poll

    Chapter 6 Programming in G Mode Serial Poll The GPIB-SCSI-A can return status information to the GPIB Controller through the serial poll response byte. The GPIB-SCSI-A maintains this response byte throughout operation, regardless of the srqen configuration. The GPIB-SCSI-A can provide certain status information when it is serial polled.
  • Page 208: Rdy Bit

    RDY. ERR Bit ERR indicates that an error occurred in the GPIB-SCSI-A. The same events that set the ERR bit in the status word also set the ERR bit in the serial poll status byte. For information about the events that cause the ERR to be set in the status word, refer to stat in Chapter 7, G Mode Functions.
  • Page 209: Parallel Poll

    This has no effect on the GPIB-SCSI-A. Take Control (TCT) This has no effect on the GPIB-SCSI-A. It does not make sense for the GPIB-SCSI-A to be passed control, since all programming instructions must be sent to it from another GPIB device.
  • Page 210: Chapter 7 G Mode Functions

    SCSI device, no matter how complex, as long as you are aware of how the SCSI device handles phase changes and information transfer. High- level functions allow the GPIB-SCSI-A to handle all the required phases as well as all information transfers without user intervention.
  • Page 211: Points To Remember In The Function Examples

    (<LF>): ibwrt (gpibscsia, "id\n", 3); If you are not using the National Instruments NI-488 software, be sure your program properly addresses the Command and Status Channel as well as the Data Channel when writing to and reading from the GPIB-SCSI-A.
  • Page 212: G Mode Function Descriptions

    The devices used as the first argument of the National Instruments GPIB calls are gpibscsia and scsidev. gpibscsia represents the Command and Status Channel on the GPIB-SCSI-A and is the device that must be used to command the GPIB-SCSI-A and receive status and other information.
  • Page 213: Autotst - Enable/Disable Automatic Testing Of Scsi Targets

    This is also the default behavior for the autotst function. If one or more target ids are specified, the GPIB-SCSI-A configures itself to automatically test those Targets. Thereafter, approximately once every three seconds, the GPIB-SCSI-A issues the Test Unit Ready command to every Target that is configured for automatic testing.
  • Page 214 Command and Status Channel buffer after the error is indicated. If you enter autotst? the GPIB-SCSI-A places the Target ids that are currently configured for automatic testing into the Command and Status Channel buffer followed by a <CR><LF>.
  • Page 215 /* Now wait for SRQ. Once SRQ is detected, * read the status back into a buffer until * END is received from the GPIB-SCSI-A. ibrd (gpibscsia, stbuf, 100); /* Read status information until END. */ printf ("status is: %s", stbuf);...
  • Page 216: Blksz - Set Blocksize

    This is the total count of bytes the GPIB-SCSI-A plans to transfer between the SCSI and GPIB during the command. The default value for this command is 512.
  • Page 217 (continued) Examples: 1. ibwrt (gpibscsia, "blksz?\n", 7); /* Ask for the current blocksize setting. */ ibrd (gpibscsia, infobuf, 10); /* Get the response from the GPIB-SCSI-A. */ printf ("response: %s", infobuf); /* Display the data. */ response: 512<CR><LF> 2. ibwrt (gpibscsia, "blksz 532\n", 10);...
  • Page 218: Cmd - Build Scsi Command Descriptor Block And Execute Scsi Command Phase

    Use this command in your low-level command sequence to tell the selected Target what to do if the high-level commands offered by the GPIB-SCSI-A do not work with your SCSI device. This command performs the Command phase for the SCSI bus.
  • Page 219 * ATN* signal. ibwrt (gpibscsia, "cmd #h1b, #h0, #h0, #h0, #h0, #h0\n", 34); /* Create and send to the selected Target the * Command Descriptor Block containing the * Group 0 command Start/Stop Unit. GPIB-SCSI-A User Manual 7-10 © National Instruments Corp.
  • Page 220: Cmp - Complete The Scsi Command Sequence By Processing The Status And Message In Phases

    GPIB-SCSI-A status bytes. The reason for this is that most all byte values can be used for message bytes and no arbitrary value can be chosen as a marker.
  • Page 221 Chapter 7 (continued) If, at any time during the operation of cmp, the selected SCSI Target is not in the phase that the GPIB-SCSI-A expects that it should be, cmp aborts the operation with an EPHS indication. See Also: Appendix D, Operation of the SCSI.
  • Page 222: Config - Read/Change Gpib-Scsi-A Configuration

    Syntax: config mask [, size]<CR> config?<CR> Purpose: Use config when you want the GPIB-SCSI-A to change or report its current operating configuration. Remarks: Use this command when you want to find out the current configuration of the GPIB-SCSI-A. You can also use this command to change some of the configuration parameters within the box.
  • Page 223 If you do not indicate size as a parameter, no change is made to the current buffer size. If you enter config?, the GPIB-SCSI-A places the last used values of mask and the current buffer size into the Command and Status Channel's buffer followed by a <CR><LF>.
  • Page 224 (continued) If an invalid number is entered for either value, or if there is no question mark and no value following the command, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: Buffering Methods in Chapter 3, Technical Information.
  • Page 225: Dtin - Transfer Data In Information From Selected Scsi Target

    GPIB-SCSI-A uses the GPIB END condition to prevent locking up the system. When the GPIB-SCSI-A detects that it is about to send the last data byte from the SCSI, the GPIB-SCSI-A asserts the EOI* signal to indicate that the next byte will be the last GPIB byte.
  • Page 226 /* Request the GPIB-SCSI-A to communicate * with SCSI Target with an ID of 6. ibwrt (gpibscsia, "blksz 256\n", 10); /* Tell the GPIB-SCSI-A that the drive has * a blocksize of 256 bytes. This information * can be found either in the documentation of...
  • Page 227 G Mode Functions Chapter 7 dtin (continued) ibwrt (gpibscsia, "getscsi\n", 8); /* Tell the GPIB-SCSI-A to arbitrate for the * SCSI bus. ibrd (gpibscsia, infobuf, 100); /* Get the response from the GPIB-SCSI-A. */ get_stat(&ibstat,&gpiberr,&scsierr,infobuf); /* Call a routine to convert the character * strings representing numerical values to * binary data.
  • Page 228 * analyze the serial poll response byte of the * GPIB-SCSI-A to do this. ibwrt (gpibscsia, "dtin\n", 5); /* This alerts the GPIB-SCSI-A that you want to * receive data into your GPIB port from the * selected SCSI device.
  • Page 229 (continued) /* After transferring the data and ensuring * that the Target is in the Status phase, * a call to cmp allows the GPIB-SCSI-A to * process the Status and Message In phases. else /* state == RDY */ ibwrt (gpibscsia, "cmp\n", 4);...
  • Page 230: Dtout - Transfer Data Out Information To Selected Scsi Target

    Because this command is used to transfer GPIB data (which is not grouped in blocks) to the SCSI (which is usually grouped in blocks), the GPIB-SCSI-A uses the GPIB END message to prevent locking up the system. You must assert the GPIB EOI* signal on the last byte of data transferred to the Data Channel.
  • Page 231 /* Request the GPIB-SCSI-A to communicate with * SCSI Target with an ID of 5. ibwrt (gpibscsia, "blksz 532\n", 10); /* Tell to the GPIB-SCSI-A that the drive has * a blocksize of 532 bytes. This information * can be found either in the documentation of...
  • Page 232 G Mode Functions dtout (continued) ibwrt (gpibscsia, "pad 13\n", 7); /* Request the GPIB-SCSI-A to pad data transfers * to the SCSI with the carriage return * character ibwrt (gpibscsia, "getscsi\n", 8); /* Tell the GPIB-SCSI-A to arbitrate for the * SCSI bus.
  • Page 233 * GPIB-SCSI-A or by analyzing the serial poll * response byte of the GPIB-SCSI-A. ibwrt (gpibscsia, "dtout\n", 6); /* This alerts the GPIB-SCSI-A that you want to * send data from your GPIB port to the selected * SCSI Target.
  • Page 234 (gpibscsia, "cmp\n",4); /* After transferring the data and ensuring * that the Target is in the Status phase, a * call to cmp allows the GPIB-SCSI-A to process * the Status and Message In phases. else /* state == RDY */ ibwrt (gpibscsia, "cmp\n",4);...
  • Page 235: Format - Format Unit

    Syntax: format vendor unique byte[, interleave] <CR> Purpose: Use format to command the GPIB-SCSI-A to process the Group 0 SCSI FORMAT UNIT command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process format. Notice how the parameters to the format command are used in the creation of the Command Descriptor Block.
  • Page 236 GPIB-SCSI-A aborts the command with an EARG error indication. Examples: 1. ibwrt (gpibscsia, "format 0, 1\n", 12); /* Tell the GPIB-SCSI-A to do a SCSI FORMAT UNIT * command. The vendor unique byte is 0 and * the interleave factor is one.
  • Page 237: Getscsi - Arbitrate For The Scsi Bus

    This is the first command that you need to use in your low level command pattern if the high-level commands offered by the GPIB-SCSI-A do not work with your SCSI device. This command performs the Arbitration phase for the SCSI bus.
  • Page 238: Hcmd - Execute A High-Level Scsi Command

    32-bit unsigned number. It is the number of bytes that the user expects the GPIB-SCSI-A to transfer during the Data In or Data Out phases. Correct values range from 1 to 4,294,967,295. During commands that require a...
  • Page 239 Chapter 6, Programming in G Mode. Examples: 1. This example causes the GPIB-SCSI-A to issue a Group 0 SCSI SEEK command to the Target with a SCSI ID of 3. The Logical Unit Number used is 2, and the command seeks to Logical Block Address 100.
  • Page 240 G Mode Functions hcmd (continued) 2. This example causes the GPIB-SCSI-A to read 257 bytes of data from another GPIB-SCSI-A that is executing in S mode. The S mode GPIB-SCSI-A has a SCSI id of 5. ibwrt (gpibscsia, "tid 5\n", 6);...
  • Page 241: Id - Identify System

    The identification is returned in three strings. The first two strings identify the company product model, the software revision level, and a copyright notice. The third string identifies the number of bytes of RAM in the GPIB-SCSI-A that are available for use as buffer space. Example: ibwrt (gpibscsia, "id\n", 3);...
  • Page 242: Inquiry - Inquiry

    Type: SCSI function Syntax: inquiry allocation length<CR> Purpose: Use inquiry to command the GPIB-SCSI-A to process the Group 0 SCSI INQUIRY command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process inquiry. Notice how the parameter to the inquiry command is used in the creation of the Command Descriptor Block.
  • Page 243 Correct values range from 0 to 255. If a number that is too large is entered, there is a syntax error in the number, or there is no number, the GPIB-SCSI-A aborts the command with an EARG error indication. Example: ibwrt (gpibscsia, "inquiry 100\n", 12);...
  • Page 244: Lun - Set Logical Unit Number

    Purpose: Use lun if you want to change the value that the GPIB-SCSI-A uses in the Logical Unit Number portion of any Command Descriptor Block created during a high-level command sequence. Remarks: This command is in effect for any of the high-level GPIB-SCSI-A commands that communicate with the SCSI.
  • Page 245 (continued) Examples: 1. ibwrt (gpibscsia, "lun?\n", 5); /* Ask for the GPIB-SCSI-A's current lun * setting. ibrd (gpibscsia, infobuf, 10); /* Get the response from the GPIB-SCSI-A. */ printf ("response: %s\n", infobuf); /* Display the data. */ response: 0<CR><LF> 2. ibwrt (gpibscsia, "lun 3\n", 6);...
  • Page 246: Mdsct - Mode Select

    SCSI function Syntax: mdsct parameter list length<CR> Purpose: Use mdsct to command the GPIB-SCSI-A to process the Group 0 SCSI MODE SELECT command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process mdsct. Notice how the parameter to the mdsct command is used in the creation of the Command Descriptor Block.
  • Page 247 Correct values range from 0 to 255. If a number that is too large is entered, there is a syntax error in the number, or there is no number, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: mdsns.
  • Page 248: Mdsns - Mode Sense

    SCSI function Syntax: mdsns allocation length<CR> Purpose: Use mdsns to command the GPIB-SCSI-A to process the Group 0 SCSI MODE SENSE command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process mdsns. Notice how the parameter to the mdsns command is used in the creation of the Command Descriptor Block.
  • Page 249 Correct values range from 0 to 255. If a number that is too large is entered, there is a syntax error in the number, or there is no number, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: mdsct.
  • Page 250: Msgin - Transfer Message Bytes From The Target To The

    Command and Status Channel buffer. There is no marker placed after these information bytes to indicate which of the bytes are valid message bytes or which ones are GPIB-SCSI-A status bytes. The reason for this is that most all byte values can be used for message bytes and no arbitrary value can be chosen as a marker.
  • Page 251 (gpibscsia, "msgin\n", 6); /* After determining that the Target is in the * Message In phase, you must specify this * command for the GPIB-SCSI-A to obtain the * message bytes from the Target. ibrd (gpibscsia, msgbuf, 258); /* Get all possible bytes from the Command and * Status Channel buffer.
  • Page 252: Msgout - Transfer Message Bytes From The Gpib-Scsi-A

    This is a low-level command that you only need to use if the high-level commands provided by the GPIB-SCSI-A do not work properly with your device. Remarks: This is the command that you will need to use in your low- level command sequence to send message bytes during the Message Out phase.
  • Page 253 * connection between an initiator and Target * for a particular logical unit. Also, with * bit 6 set, you indicate that you are an * Initiator that can support disconnection and * reconnection. GPIB-SCSI-A User Manual 7-44 © National Instruments Corp.
  • Page 254: Pad - Set Pad Byte

    Purpose: Use pad if you want to change the value that the GPIB-SCSI-A uses to pad data coming in from the GPIB port and going out over the SCSI port. Remarks: This command is in effect for hcmd, write and wrext.
  • Page 255 1. ibwrt (gpibscsia, "pad?\n", 5); /* Ask for the current pad byte setting of the * GPIB-SCSI-A. ibrd (gpibscsia, infobuf, 10); /* Get the response from the GPIB-SCSI-A. */ printf ("response: %s\n", infobuf); /* Display the data. */ response: 0<CR><LF>...
  • Page 256: Rblks - Reassign Blocks

    - Reassign Blocks Type: SCSI function Syntax: rblks<CR> Purpose: Use rblks to command the GPIB-SCSI-A to process the Group 0 SCSI REASSIGN BLOCKS command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rblks. Byte The LUN corresponds to the last value assigned with the lun command.
  • Page 257 Command Descriptor Block, the SCSI phases that the device creates, and the format of the defect list. If anything follows the command, the GPIB-SCSI-A aborts the command with an EARG error indication. Example: ibwrt (gpibscsia, "rblks\n", 6);...
  • Page 258: Rcdia - Receive Diagnostic Results

    Type: SCSI function Syntax: rcdia allocation length<CR> Purpose: Use rcdia to command the GPIB-SCSI-A to process the Group 0 SCSI RECEIVE DIAGNOSTIC RESULTS command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rcdia. Notice how the parameter to the rcdia command is used in the creation of the Command Descriptor Block.
  • Page 259 Correct values range from 0 to 65,535. If a number that is too large is entered, there is a syntax error in the number, or there is no number, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: sndia.
  • Page 260 (continued) Example: ibwrt (gpibscsia, "rcdia 100\n", 10); /* Tell the GPIB-SCSI-A to complete a SCSI * RECEIVE DIAGNOSTIC RESULTS command. * allocation length is 100 bytes. ibrd (scsidev, rcdbuf, 100); /* Get the data coming from the Data Channel processrcd (rcdbuf);...
  • Page 261: Rcnct - Reconnect The Gpib-Scsi-A To The Scsi

    SCSI Function Syntax: rcnct<CR> Purpose: Use rcnct to allow the GPIB-SCSI-A reconnect to the SCSI bus if the high-level commands performed by the GPIB-SCSI-A do not meet your needs and you need to perform low-level commands with your device which may include disconnection from the GPIB-SCSI-A.
  • Page 262 /* Request to the GPIB-SCSI-A to communicate * with SCSI Target with ID of 5. ibwrt (gpibscsia, "blksz 532\n", 10); /* Tell the GPIB-SCSI-A that the drive has * a blocksize of 532 bytes. This information * can be found either in the documentation of...
  • Page 263 G Mode Functions Chapter 7 rcnct (continued) ibwrt (gpibscsia, "getscsi\n", 8); /* Request the GPIB-SCSI-A to arbitrate for the * SCSI bus. ibrd (gpibscsia, miscbuf, 100); /* Get the response from the GPIB-SCSI-A. */ get_stat(&ibstat,&gpiberr,&scsierr,miscbuf); /* Call a routine to connect the character * strings representing numerical values to * binary data.
  • Page 264 * that the Target you have selected is * in the Command phase before you issue this * command by analyzing the status returned * by the GPIB-SCSI-A. ibwrt (gpibscsia, "msgin\n", 6); /* After noticing that the SCSI Target is in * the Message In Phase, you need to get the * message byte(s).
  • Page 265 * call rcnct for the GPIB-SCSI-A to prepare * for reconnection. ibwrt (gpibscsia, "dtout \n", 6); /* This alerts the GPIB-SCSI-A that you want to * send data from your GPIB port to the * selected SCSI Target. Before executing...
  • Page 266 /* After making sure that no errors occurred * on the last transfer and that the Target * is in the Status phase, call the cmp * command to allow the GPIB-SCSI-A to process * the Status and Message In phases. © National Instruments Corp.
  • Page 267: Rdbuf - Read Buffer

    Syntax: rdbuf buffer id, buffer offset, allocation length<CR> Purpose: Use rdbuf to command the GPIB-SCSI-A to process the Group 1 SCSI READ BUFFER command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rdbuf. Notice how the parameters to the rdbuf command are used in the creation of the Command Descriptor Block.
  • Page 268 The Target terminates the Data In phase when Allocation Length bytes have transferred. During the execution of this command, if the GPIB-SCSI-A encounters a phase which it does not expect, an EPHS error indication results. For a list of the expected phases, refer to the section titled Handling of SCSI Phases in G Mode in Chapter 6, Programming in G Mode.
  • Page 269 (continued) Example: ibwrt (gpibscsia, "rdbuf 1, 0, 500\n", 16); /* Tell the GPIB-SCSI-A to complete a SCSI READ * BUFFER command. The rest of the command is * requesting that the Target send 500 bytes of * data from the beginning of its first buffer.
  • Page 270: Rdcap - Read Capacity

    - Read Capacity Type: SCSI function Syntax: rdcap<CR> Purpose: Use rdcap to command the GPIB-SCSI-A to process the Group 1 SCSI READ CAPACITY command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rdcap. Byte The LUN corresponds to the last value assigned with the lun command.
  • Page 271 Chapter 7 rdcap (continued) During the execution of this command, if the GPIB-SCSI-A encounters a phase which it does not expect, an EPHS error indication results. For a list of the expected phases, refer to the section titled Handling of SCSI Phases in G Mode in Chapter 6, Programming in G Mode.
  • Page 272: Rdext - Read Extended

    Purpose: Use rdext to command the GPIB-SCSI-A to process the Group 1 SCSI READ command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target how to process rdext. Notice how the parameters to the rdext command are used in the creation of the Command Descriptor Block.
  • Page 273 Target must transfer during the Data In phase. During the execution of this command, if the GPIB-SCSI-A encounters a phase which it did not expect, an EPHS error indication results. For a list of the expected phases, refer to the section titled Handling of SCSI Phases in G Mode in Chapter 6, Programming in G Mode.
  • Page 274 (continues) Example: This example causes the GPIB-SCSI-A to read eight blocks of data beginning at Logical Block Address 5,000 from the Target with a SCSI ID of 4, and blocksize of 512 bytes. ibwrt (gpibscsia, "stat c n\n", 9);...
  • Page 275 G Mode Functions Chapter 7 rdext (continues) ibrd (scsidev, databuf, 4096); /* Read the data from the SCSI device through * the Data Channel. GPIB-SCSI-A User Manual 7-66 © National Instruments Corp.
  • Page 276: Rdfct - Read Defect Data

    Syntax: rdfct configure byte, allocation length<CR> Purpose: Use rdfct to command the GPIB-SCSI-A to process the Group 1 SCSI command READ DEFECT DATA. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rdfct. Notice how the parameters to the rdfct command are used in the creation of the Command Descriptor Block.
  • Page 277 Initiator, whichever is less. During the execution of this command, if the GPIB-SCSI-A encounters a phase which it does not expect, an EPHS error indication results. For a list of the expected phases, refer to Chapter 6, Handling of SCSI Phases in G Mode, Commands That Require a Data In Phase.
  • Page 278 (continued) Example: ibwrt (gpibscsia, "rdfct #h18, 500\n", 16); /* Tell the GPIB-SCSI-A to complete a SCSI READ * DEFECT DATA command. The configure byte is * set to 18 hex which has a particular meaning * to a device.
  • Page 279: Read - Read

    Purpose: Use read to command the GPIB-SCSI-A to process the Group 0 SCSI READ command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process read. Notice how the parameters to the read command are used in the creation of the Command Descriptor Block.
  • Page 280 SCSI phases that the device creates during the execution of this command. If you enter read?, the GPIB-SCSI-A places the last used values for Logical Block Address and Transfer Length into the Command and Status Channel's buffer followed by a <CR><LF>.
  • Page 281 (continued) Example: This example causes the GPIB-SCSI-A to read 10 blocks of data beginning at Logical Block Address 100 from the Target with a SCSI id of 4 and blocksize of 512 bytes. ibwrt (gpibscsia, "stat c n\n", 9);...
  • Page 282 Chapter 7 G Mode Functions read (continued) ibrd (scsidev, databuf, 5120); /* Read the data from the SCSI device * through Data Channel. © National Instruments Corp. 7-73 GPIB-SCSI-A User Manual...
  • Page 283: Rewind - Rewind

    - Rewind Type: SCSI function Syntax: rewind<CR> Purpose: Use rewind to command the GPIB-SCSI-A to process the Group 0 SCSI REWIND command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rewind. Byte The LUN corresponds to the last value assigned with the lun command.
  • Page 284 Chapter 7 G Mode Functions rewind (continued) Example: ibwrt (gpibscsia, "rewind\n", 7); /* Tell the GPIB-SCSI-A to complete a SCSI * REWIND command. © National Instruments Corp. 7-75 GPIB-SCSI-A User Manual...
  • Page 285: Rlseu - Release Logical Unit

    - Release Logical Unit Type: SCSI function Syntax: rlseu<CR> Purpose: Use rlseu to command the GPIB-SCSI-A to process the Group 0 SCSI RELEASE UNIT command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rlseu. Byte The LUN corresponds to the last value assigned with the lun command.
  • Page 286 (continued) Example: ibwrt (gpibscsia, "rlseu\n", 6); /* Tell the GPIB-SCSI-A to complete a SCSI * RELEASE UNIT command. This causes the Target * to terminate all logical unit and extent * reservations that are active from the * GPIB-SCSI-A.
  • Page 287: Rqsns - Request Sense

    SCSI function Syntax: rqsns allocation length<CR> Purpose: Use rqsns to command the GPIB-SCSI-A to process the Group 0 SCSI REQUEST SENSE command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rqsns. Notice how the parameter to the rqsns command is used in the creation of the Command Descriptor Block.
  • Page 288 Correct values range from 0 to 255. If a number that is too large is entered, there is a syntax error in the number, or there is no number, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: Appendix D, Operation of the SCSI.
  • Page 289: Rsrvu - Reserve Logical Unit

    - Reserve Logical Unit Type: SCSI function Syntax: rsrvu<CR> Purpose: Use rsrvu to command the GPIB-SCSI-A to process the Group 0 SCSI RESERVE UNIT command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process rsrvu. Byte The LUN corresponds to the last value assigned with the lun command.
  • Page 290 Chapter 7 G Mode Functions rsrvu (continued) If there is anything following the command, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: rlseu. Example: ibwrt (gpibscsia, "rsrvu\n", 6); /* Tell the GPIB-SCSI-A to complete a SCSI * RESERVE UNIT command.
  • Page 291: Rst - Reset Scsi Bus

    SCSI activity from occurring. Remarks: This command causes the GPIB-SCSI-A to assert the SCSI RST* signal for approximately 100 µsec. The assertion of RST* for 25 µsec causes all devices on the SCSI to go to a known, reset state.
  • Page 292: Selwa - Select A Scsi Target With Scsi Atn* Asserted

    SCSI bus. Because the SCSI ATN* line is asserted during the Selection phase, this signals to the Target that the GPIB-SCSI-A as an Initiator has some message to send to the Target. The Target may then go into the Message Out phase and any information transferred across the SCSI is treated as a message.
  • Page 293 If there is not a SCSI device whose ID is equal to that indicated with the tid command, this command fails to select a Target. In this event, the GPIB-SCSI-A aborts the command and returns the ESEL error indication. If there is anything following selwa, the command aborts and returns an EARG indication.
  • Page 294: Selwo - Select A Scsi Target Without Scsi Atn* Asserted

    Remarks: This is the second command that you must use in your low-level command sequence if the high-level commands offered by the GPIB-SCSI-A do not work with your SCSI device. This command performs the Selection phase for the SCSI bus.
  • Page 295: Sndia - Send Diagnostic

    SCSI function Syntax: sndia value[, parameter list length]<CR> Purpose: Use sndia to command the GPIB-SCSI-A to process the Group 0 SCSI SEND DIAGNOSTIC command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process sndia. Notice how the parameters to the sndia command are used in the creation of the Command Descriptor Block.
  • Page 296 GPIB-SCSI-A aborts the command with an EARG indication. If value is non-zero, the GPIB-SCSI-A commands the SCSI Target to perform its internal self-test. In this case, the parameter list length should not be specified, and if it is, the GPIB-SCSI-A aborts the command with an EARG indication.
  • Page 297 Chapter 7 sndia (continued) 2. ibwrt (gpibscsia, "sndia 0, #h1\n", 13); /* Tell the GPIB-SCSI-A to complete a SCSI SEND * DIAGNOSTIC command. Due to the parameters * specified, the GPIB-SCSI-A expects the * Target to go into a Data Out phase at a * proper point to send a parameter list.
  • Page 298: Space - Space

    Type: SCSI function Syntax: space code, count Purpose: Use space to command the GPIB-SCSI-A to process the Group 0 SCSI SPACE command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process space. Notice how the parameters to the space command are used in the creation of the Command Descriptor Block.
  • Page 299 Correct values range from -8,388,608 to +8,388,607. If numbers that are too large are entered, there is a syntax error in a number, or there are no numbers, the GPIB-SCSI-A aborts the command with an EARG error indication. See Also: wfmks.
  • Page 300: Srqen - Enable/Disable Setting Of Srq

    Syntax: srqen mask<CR> srqen?<CR> Purpose: Use srqen to allow the GPIB-SCSI-A to assert SRQ under the conditions described in Table 7-2. Remarks: When the argument mask is 0, the GPIB-SCSI-A never asserts SRQ. When the argument mask is > 0, the GPIB- SCSI-A asserts SRQ under the conditions represented by each bit in the mask.
  • Page 301 <CR><LF>. If mask that you have entered is not a valid mask, or if there is no question mark and no value, the GPIB-SCSI-A aborts the command with an EARG error indication. The assignment made by this function remains in effect until you call srqen again or turn off the GPIB-SCSI-A.
  • Page 302 (continued) Examples: 1. ibwrt (gpibscsia, "srqen?\n", 7); /* Ask for current srqen mask setting. */ ibrd (gpibscsia, infobuf, 10); /* Get the response from the GPIB-SCSI-A. */ printf ("response: %s\n", infobuf); /* Display the data. */ response: 0<CR><LF> 2. ibwrt (gpibscsia, "srqen #h80\n", 11);...
  • Page 303: Stat - Return Gpib-Scsi-A Status

    [c] b<CR> stat [c] n s b<CR> Purpose: Use stat to obtain the status of the GPIB-SCSI-A to see if certain conditions are currently present. You use stat most often to see if the previous operation resulted in an error.
  • Page 304 (continued) Status represents a combination of GPIB-SCSI-A conditions. Status is stored as a 16-bit integer in the GPIB-SCSI-A. Each bit in the integer represents a single condition. A bit value of 1 indicates that the corresponding condition is in effect. A bit value of 0 indicates that the condition is not in effect.
  • Page 305 G Mode Functions Chapter 7 stat (continued) Table 7-3. GPIB-SCSI-A Status Conditions (continued) Numeric Value (n) Status Description Reserved CMPL Operation completed MGIN Message In phase MOUT Message Out phase BSFR Bus Free phase (BSY* not asserted) SLCT Selection phase...
  • Page 306 Symbolic Value (n) Value (s) Description NGER No GPIB error condition to report Reserved ENOL Write detected no listeners Reserved EARG Invalid argument or arguments Reserved Reserved 7-16 Reserved ECMD Unrecognized command © National Instruments Corp. 7-97 GPIB-SCSI-A User Manual...
  • Page 307 BSY* signal without first notifying the GPIB-SCSI-A of its intention to disconnect. EPAR SCSI parity error occurred. No steps were taken by the GPIB-SCSI-A, but the data read from the SCSI device into the GPIB may be corrupt. 128 - 135 TST0 - TST7...
  • Page 308 (continued) or SCSI error can be found in Appendix B, Status and Message Information. The GPIB-SCSI-A updates status at the end of each programming message. It updates GPIB error and SCSI error whenever a new error occurs. If you call stat with all modes (n, s, and b) specified, the numeric status is always returned first followed by the symbolic status, followed by the binary status.
  • Page 309 (ibstat) /* If error, go and process it. */ 2. ibwrt (gpibscsia, "stat c n\n", 9); /* Request GPIB-SCSI-A to send numeric status. * You are also enabling continuous reporting. ibrd (gpibscsia, stbuf, 100); /* Read status information. */ printf ("status is %s", stbuf);...
  • Page 310: Tid - Set Scsi Id Of Target Device

    GPIB-SCSI-A commands that communicate with the SCSI and when using the low-level selwo or selwa commands. When the GPIB-SCSI-A is issued one of the high-level SCSI commands, the SCSI Target that is to carry out the operation must first be selected by the GPIB-SCSI-A. By using this command, the GPIB-SCSI-A communicates with any SCSI device with a unique identification.
  • Page 311 Chapter 7 (continued) Examples: 1. ibwrt (gpibscsia, "tid?\n", 5); /* Ask for the current tid setting. */ ibrd (gpibscsia, infobuf, 10); /* Get the response from the GPIB-SCSI-A. */ printf ("response: %s\n", infobuf); /* Display the data. */ response: 0<CR><LF>...
  • Page 312: Tstur - Test Unit Ready

    - Test Unit Ready Type: SCSI function Syntax: tstur<CR> Purpose: Use tstur to command the GPIB-SCSI-A to process the Group 0 SCSI TEST UNIT READY command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process tstur. Byte The LUN corresponds to the last value assigned with the lun command.
  • Page 313 Chapter 7 tstur (continued) Example: ibwrt (gpibscsia, "tstur\n", 6); /* Tell the GPIB-SCSI-A to complete a SCSI TEST * UNIT READY command. This is useful if you * want to see if the device is ready to * operate. This is not, however, a request * for a self test.
  • Page 314: Vcb - Set Vendor Unique Control Byte Bits

    SCSI Configuration function Syntax: vcb value<CR> vcb?<CR> Purpose: Use vcb to change the value that the GPIB-SCSI-A uses in the upper two bits of the Control Byte portion of any Command Descriptor Block created for communication with any SCSI device. Remarks: This command is in effect for any of the high level GPIB-SCSI-A commands that communicate with the SCSI.
  • Page 315 Chapter 7 (continued) Examples: 1. ibwrt (gpibscsia, "vcb?\n", 5); /* Ask for the current vcb setting.*/ ibrd (gpibscsia, infobuf, 1000); /* Get the response from the GPIB-SCSI-A. */ printf ("response: %s\n", infobuf); /* Display the data. */ response: 0<CR><LF> 2. ibwrt (gpibscsia, "vcb 3\n", 6);...
  • Page 316: Wfmks - Write Filemarks

    Type: SCSI function Syntax: wfmks filemarks<CR> Purpose: Use wfmks to command the GPIB-SCSI-A to process the Group 0 SCSI WRITE FILEMARKS command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process wfmks. Notice how the parameter to the wfmks command is used in the creation of the Command Descriptor Block.
  • Page 317 0 to 16, 777, 216. If a number that is too large is entered, there is a syntax error in the number, or there is no number, the GPIB-SCSI-A aborts the command with an EARG error indication.
  • Page 318: Wrext - Write Extended

    Purpose: Use wrext to command the GPIB-SCSI-A to process the Group 1 SCSI WRITE command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process wrext. Notice how the parameters to the wrext command are used in the creation of the Command Descriptor Block.
  • Page 319 Command Descriptor Block and the SCSI phases that the device creates during the execution of this command. If you enter wrext?, the GPIB-SCSI-A places the last used values for logical block address and transfer length into the Command and Status Channel buffer followed by a <CR><LF>.
  • Page 320 (continued) Example: This example causes the GPIB-SCSI-A to write one block of data at Logical Block Address 5000 to the Target with a SCSI ID of 4 and a blocksize of 512 bytes. After the GPIB-SCSI-A detects END on a byte...
  • Page 321 * transfer length, 1 * 512) transferred from * the GPIB Talker to the SCSI. If the * GPIB-SCSI-A detects END from the GPIB, the * SCSI device still receives 512 bytes, but * the last bytes will be pad bytes.
  • Page 322: Write - Write

    Purpose: Use write to command the GPIB-SCSI-A to process the Group 0 SCSI WRITE command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process write. Notice how the parameters to the write command are used in the creation of the Command Descriptor Block.
  • Page 323 (stored in databuf) beginning at Logical Block Address 100 from the Target with a SCSI ID of 4 and a blocksize of 512 bytes. The byte that the GPIB-SCSI-A uses as a filler byte will be the line feed character. GPIB-SCSI-A User Manual 7-114 ©...
  • Page 324 * level mdsns command provided by the * GPIB-SCSI-A. ibwrt (gpibscsia, "write 100, 10\n", 14); /* Tell the GPIB-SCSI-A that you want to write * data to the SCSI Target at ID 4. This * command also tells the GPIB-SCSI-A that...
  • Page 325 (continued) * exact count available. However, the * GPIB-SCSI-A will pad the data so that the SCSI device gets a known number of bytes to * prevent locking up the GPIB-SCSI-A and the * SCSI. ibwrt (scsidev, databuf, 4981);...
  • Page 326: Wrtbuf - Write Buffer

    Syntax: wrtbuf buffer id, buffer offset, allocation length<CR> Purpose: Use wrtbuf to command the GPIB-SCSI-A to process the Group 1 SCSI WRITE BUFFER command. Remarks: The GPIB-SCSI-A uses the following Command Descriptor Block to command the Target to process wrtbuf. Notice how the parameters to the wrtbuf command are used in the creation of the Command Descriptor Block.
  • Page 327 The Target terminates the Data Out phase when Allocation Length bytes have been transferred. During the execution of this command, if the GPIB-SCSI-A encounters a phase which it does not expect, an EPHS error indication results. For a list of the expected phases, refer to the section titled Handling of SCSI Phases in G Mode in Chapter 6, Programming in G Mode.
  • Page 328 (continued) Example: ibwrt (gpibscsia, "wrtbuf 1, 0, 10\n", 16); /* Tell the GPIB-SCSI-A to complete a SCSI * WRITE Buffer command. The rest of the * command is requesting that the Target write * 10 bytes of data to the beginning of its * first buffer.
  • Page 329: Multiline Interface Messages

    These multiline interface messages are sent and received with ATN TRUE. For more information on these messages, refer to the ANSI/IEEE Std. 488.1-1987, IEEE Standard Digital Interface for Programmable Instrumentation. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 330 MLA27 < MLA28 MLA29 > MLA30 Message Definitions Device Clear My Secondary Address Group Execute Trigger My Talk Address Go To Local Parallel Poll Configure Local Lockout Parallel Poll Disable My Listen Address GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 331 MTA24 MSA24,PPD MTA25 MSA25,PPD MTA26 MSA26,PPD MTA27 MSA27,PPD MTA28 MSA28,PPD MTA29 MSA29,PPD MTA30 MSA30,PPD Parallel Poll Enable Serial Poll Enable Parallel Poll Unconfigure Take Control Selected Device Clear Unlisten Serial Poll Disable Untalk © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 332: Status And Message Information

    This appendix describes the status and error information that the GPIB-SCSI-A records as it executes each programming message. Also described are the SCSI message bytes that the GPIB-SCSI-A responds to or generates while operating, as well as the Extended Sense keys that the GPIB-SCSI-A uses.
  • Page 333 END or EOS message was detected during the read. While the GPIB-SCSI-A is performing a shadow handshake as a result of the gts function, any other function call may return a status word with the END bit set if the END or EOS message occurred before or during that call.
  • Page 334 Appendix B Status and Message Information The LOK bit indicates if the GPIB-SCSI-A is in a lockout state. The LOK bit is set whenever the GPIB-SCSI-A detects that the Local Lockout (LLO) message has been sent either by the GPIB-SCSI-A or by another Controller.
  • Page 335 Status and Message Information Appendix B TACS The TACS bit indicates if the GPIB-SCSI-A has been addressed as a Talker. The TACS bit is set whenever the GPIB-SCSI-A detects that its talk address (and secondary address, if enabled) has been sent either by the GPIB-SCSI-A itself or by another Controller.
  • Page 336: G Mode

    CMPL The CMPL bit indicates if the operation relating to this status information is complete. This bit is always set, and is useful in identifying the status word from other responses. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 337 MGIN The MGIN bit indicates that the SCSI bus that the GPIB-SCSI-A is attached to is currently in the Message In phase. This indication is useful if you are performing low-level SCSI calls and you need to know that the selected Target is expecting to send the Initiator, usually the GPIB-SCSI-A, a message byte.
  • Page 338: Gpib Error Codes

    DTIN The DTIN bit indicates that the SCSI bus to which the GPIB-SCSI-A is attached is currently in the Data In phase. This indication is useful if you are performing low-level SCSI calls and you need to know that the selected Target is expecting to send to the Initiator, usually the GPIB-SCSI-A, data bytes.
  • Page 339 GPIB-SCSI-A. ENOL The ENOL error occurs most frequently when the GPIB-SCSI-A attempts to write to the GPIB and there are no Listeners addressed. In S mode, the remedy is to be sure that the proper listen...
  • Page 340 The GPIB-SCSI-A records this error when it is not addressed to listen or talk before a call to brd or bwrt when it is CIC. Be sure that the GPIB-SCSI-A is properly addressed before attempting the brd or bwrt. The GPIB-SCSI-A also records this error during the function gts when the shadow-handshake feature is requested and the GPIB ATN* line is already unasserted.
  • Page 341 Status and Message Information Appendix B ESAC The GPIB-SCSI-A records this error if sic or sre is called when the GPIB-SCSI-A does not have System Controller capability. The remedy is to give the GPIB-SCSI-A that capability by calling rsc. (At power on, the GPIB-SCSI-A assumes itself to be the System Controller.)
  • Page 342: Scsi Error Codes

    Status and Message Information ECMD The GPIB-SCSI-A records this error if the programming message received by the GPIB-SCSI-A does not contain a recognizable function name. This can happen if the function name is misspelled or if a function is requested that does not exist.
  • Page 343 ECER The GPIB-SCSI-A records this error if the Target that is communicating with the GPIB-SCSI-A unexpectedly releases the SCSI BSY* signal without either notifying the GPIB-SCSI-A of its intention to disconnect or finishing the command normally by going through the Status and Message In phases.
  • Page 344: Status Bytes

    V bits are assigned a meaning by the specific SCSI Target. In S mode, the GPIB-SCSI-A clears bits 7, 6, and 5. Bit 0 is set to 1 after a RD or BRD command and subsequent STAT commands if END occurred during the read.
  • Page 345: Message Bytes

    Command and Status Channel. EXTENDED MESSAGE In S mode, this message is sent by the GPIB-SCSI-A as the first byte of a multiple-byte message. The only multiple byte message sent by the GPIB-SCSI-A is that sent during continuous status reporting. See the S mode stat command for details.
  • Page 346 Appendix B Status and Message Information In G mode, the GPIB-SCSI-A receives the message from the Target and places it in the Command and Status Channel buffer. DISCONNECT 4 The GPIB-SCSI-A sends this message to the Initiator while operating in S mode to indicate its intention to disconnect from the SCSI.
  • Page 347 It is just placed into the buffer of the Command and Status Channel. While operating in S mode, the GPIB-SCSI-A does not deliver any message other than the ones described above. If the GPIB-SCSI-A receives a message that is inappropriate or has not been implemented, it returns the MESSAGE REJECT message.
  • Page 348: Sense Keys

    Sense Keys The following paragraphs describe the possible Sense keys that the GPIB-SCSI-A can issue while operating in S mode. The Sense key is returned in byte 2 of the sense data. In G mode, the GPIB-SCSI-A does not generate Sense data. Instead, the Sense data is generated by the individual SCSI device.
  • Page 349: Appendix C Operation Of The Gpib

    The GPIB is a bus like an ordinary computer bus, except that the computer has its circuit cards interconnected via a backplane bus, whereas the GPIB has stand-alone devices interconnected via a cable bus. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 350: The Controller-In-Charge And System Controller

    A Controller is necessary when the active or addressed Talker or Listener must be changed. The Controller function is usually handled by a computer. If the GPIB-SCSI-A is in S mode, your SCSI host plays all three roles. • Controller–to manage the GPIB •...
  • Page 351: Gpib Signals And Lines

    NRFD* (not ready for data) NRFD* indicates when a device is ready or not ready to receive a message byte. The line is driven by all devices when receiving commands and by Listeners when receiving data messages. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 352: Ndac* (Not Data Accepted

    The System Controller drives the REN* line, which is used to place devices in remote or local program mode. SRQ* (service request) Any device can drive the SRQ* line to asynchronously request service from the Controller. GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 353: Eoi* (End Or Identify

    The GPIB uses negative logic with standard TTL logic levels. When DAV* is true, for example, it is a TTL low level ( ≤ 0.8 V), and when DAV* is false, it is a TTL high level ( ≥ 2.0 V). © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 354: Figure C-1. The Gpib Connector And Signal Assignments

    GND (TW PAIR W/NRFD*) NRFD* GND (TW PAIR W/NDAC*) NDAC* GND (TW PAIR W/IFC*) IFC* GND (TW PAIR W/SRQ*) SRQ* GND (TW PAIR W/ATN*) ATN* SIGNAL GROUND SHIELD Figure C-1. The GPIB Connector and Signal Assignments GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 355: Figure C-2. Linear Configuration

    Appendix C Operation of the GPIB Figure C-2. Linear Configuration © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 356: Figure C-3. Star Configuration

    Operation of the GPIB Appendix C Figure C-3. Star Configuration GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 357: Configuration Requirements

    • No more than 15 devices connected to each bus, with at least two-thirds powered on. Bus extenders are available from National Instruments and other manufacturers for use when these limits must be exceeded. Related Documentation For more information on topics covered in this section, consult IEEE Standard Digital Interface for Programmable Instrumentation, ANSI/IEEE Standard 488.1-1987.
  • Page 358: Appendix D Operation Of The Scsi

    Target to perform an operation. After receiving and accepting the command, the Target is responsible for controlling all the information transfer phases. Within physical constraints, the SCSI can have multiple Initiators and Targets on the bus at the same time. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 359 Reselection This phase is optional and allows a Target to reconnect to an Initiator for the purpose of continuing some operation that was previously started by the Initiator but was GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 360 Similarly, ACK* is unasserted after REQ* becomes inactive. Command In this phase, the Target requests command information from the Initiator. The Target asserts the C/D* signal and negates the I/O* and MSG* signals during the REQ*/ACK* handshakes for this phase. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 361 ATN* signal. The Target asserts the C/D* and MSG* signals and negates the I/O* signal during the REQ*/ACK* handshakes for this phase. The Target handshakes bytes in this phase until the Initiator negates the ATN* signal. GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 362: Communication On The Scsi

    Target with three logical units. For the Initiator to direct to which logical unit the command pertains, many of the Command Descriptor Blocks contain a field to specify the logical unit. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 363: Scsi Signals

    Command phase. SCSI Signals There are two types of signal assignments for the SCSI–either single-ended or differential signal assignments. Because the GPIB-SCSI-A uses only the single-ended signal assignments, the following paragraphs only discuss single-ended signal assignments. A SCSI single-ended bus consists of 18 signal lines, a line for terminator resistor power, with the remaining lines assigned to ground.
  • Page 364: Figure D-1. Standard 50-Pin Scsi Connector

    Appendix D Operation of the SCSI Figure D-1 shows the arrangement of these signals on a standard 50-pin SCSI connector. This is the SCSI connector used on the GPIB-SCSI-A. ground SDB0* ground SDB1* ground SDB2* ground SDB3* ground SDB4* ground...
  • Page 365: Data Bus Signals

    A SCSI ID of 7 is the highest priority device, a SCSI ID of 0 is the lowest priority device. During Arbitration, if two devices are arbitrating for the SCSI at the same time, the device with the highest priority wins Arbitration. GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 366: Control Signals

    ATN* is asserted by the Initiator to send a message to the Target. The assertion of ATN* creates the SCSI ATTENTION condition. The Target may respond to the ATN* signal by changing into the Message Out phase at its convenience. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 367: The Termpwr Pin

    TERMPWR signal have enough power to work correctly and the SCSI bus is not held inactive. The GPIB-SCSI-A provides and uses TERMPWR when powered on and uses TERMPWR provided from another source on the GPIB-SCSI-A if powered off.
  • Page 368: Physical And Electrical Characteristics

    SCSI system exceeds approximately 3 ft or there are multiple devices attached to the SCSI. In this case, two sets of termination resistors may be required–one set at both ends of the SCSI configuration. © National Instruments Corp. D-11 GPIB-SCSI-A User Manual...
  • Page 369: Appendix E Parallel Polling

    There are two steps to conducting a parallel poll–the configuration step, which sets up the devices to participate in the poll, and the poll itself, which reads the data lines and reports the result. The following paragraphs describe these two steps. © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 370: Configuration

    GPIB-SCSI-A uses PP subset PP1. This causes the GPIB-SCSI-A to accept only those configurations that come over the GPIB from an external controller. When the PP2 bit is set, the GPIB-SCSI-A uses PP subset PP2. This causes the GPIB-SCSI-A to allow local configurations, and to ignore configurations that come over the GPIB from an external controller.
  • Page 371: Issuing Remote Configurations In S Mode

    Command Descriptor Block should have a 5 for the device address. The Me bit should be set to 0, indicating that you want to remotely configure another device. Additionally, the GPIB-SCSI-A also expects the parallel poll message byte to be in the Command Descriptor Block. This message is...
  • Page 372: Issuing Local Configurations In S Mode

    Command Descriptor Block to 1. For example, if you want to configure the GPIB-SCSI-A to respond on DIO line 5 when its ist bit is 0, the Me bit should be set to 1, and the parallel poll message should be set to hex 64 (binary 0110 0100).
  • Page 373: The Parallel Poll

    ORing of all the responses on that line. In G Mode, the GPIB-SCSI-A sets its ist bit whenever it asserts SRQ*, and clears it whenever it unasserts SRQ*. Refer to the srqen function description in Chapter 7 for the conditions under which the GPIB-SCSI-A asserts SRQ*.
  • Page 374 (configuration byte = 011000000), then if any device is free, it will drive the DIO line to 1. Thus, the controller can use S-bit/ist bit correspondence for different types of information. GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 375: Customer Communication

    Filling out a copy of the Technical Support Form before contacting National Instruments helps us help you better and faster. National Instruments provides comprehensive technical assistance around the world.
  • Page 376 National Instruments for technical support helps our applications engineers answer your questions more efficiently. If you are using any National Instruments hardware or software products related to this problem, include the configuration forms from their user manuals. Include additional pages if necessary.
  • Page 377 National Instruments software product Version Configuration The problem is List any error messages The following steps will reproduce the problem...
  • Page 378 GPIB-SCSI-A Hardware and Software Configuration Form Record the settings and revisions of your hardware and software on the line to the right of each item. Update this form each time you revise your software or hardware configuration, and use this form as a reference for your current configuration.
  • Page 379 Documentation Comment Form National Instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: GPIB-SCSI-A User Manual Edition Date: July 1994 Part Number: 320427-01 Please comment on the completeness, clarity, and organization of the manual.
  • Page 380 Thank you for your help. Name Title Company Address Phone Mail to: Technical Publications National Instruments Corporation 6504 Bridge Point Parkway, MS 53-02 Austin, TX 78730-5039 Fax to: Technical Publications National Instruments Corporation MS 53-02 (512) 794-5678...
  • Page 381: Glossary

    General Purpose Interface Bus hexadecimal hertz IEEE Institute of Electrical and Electronic Engineers inches pounds light-emitting diode megabytes of memory meters maximum Mbytes 1,000,000 bytes ounces random-access memory Read-only memory SCSI Small Computer System Interface seconds © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 382 Glossary volts volts alternating current volts direct current GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 383: Index

    5-7 to 5-9 format, 5-5 See also eos function; eot function; stat function; tmo function. BSFR status bit, G mode, B-6 buffering methods, 3-1 to 3-2 example, 7-15 G mode methods for high-level commands, 7-14 © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 384 Change/Disable GPIB EOS Termination Mode function. See eos function. Change or Disable Time Limit function. See tmo function. Change the GPIB Address of the GPIB-SCSI-A function. See caddr function. CHECK CONDITION status byte, 4-4, B-13, D-5 Check for the presence of a listening device on the bus function. See ln function.
  • Page 385 7-74 rlseu function, 7-76 rqsns function, G mode, 7-78 rsrvu function, 7-80 sndia function, 7-86 space function, 7-89 tstur function, 7-103 wfmks function, 7-107 wrext function, 7-109 write function, 7-113 wrtbuf function, 7-117 © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 386 E-1 to E-6 issuing local configurations, E-4 issuing remote configurations, E-3 to E-4 S mode as default mode, 2-2 SCSI restrictions, D-11 SCSI terminating resistors, 2-8 to 2-9 SW1 switch settings, 2-2 to 2-4 GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 387 C-1 DISCONNECT message byte, B-15 disconnection/reconnection G mode programming, 6-11 to 6-12 S mode programming during data transfers, 4-5 to 4-8 overview, 4-5 while waiting for GPIB events, 4-8 to 4-9 © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 388 Enable/Disable Setting of SRQ. See srqen function. END message G mode programming, 6-8 to 6-9 S mode programming, 4-3 to 4-4 See also eot function. END status bit, S mode, B-2 ENOL error code, GPIB, B-8 environmental characteristics, 1-5 GPIB-SCSI-A User Manual © National Instruments Corp.
  • Page 389 EADR, B-8 EARG, B-9 EBUS, B-10 ECAP, B-10 ECIC, B-7 ECMD, B-10 ENOL, B-8 ESAC, B-9 NGER, B-7 SCSI EARB, B-11 ECER, B-11 EPAR, B-11 to B-12 EPHS, B-11 ESEL, B-11 NSER, B-11 © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 390 F-1 format function, 7-26 to 7-27 Command Descriptor Block, 7-26 example, 7-27 syntax and description, 7-26 to 7-27 front panel of GPIB-SCSI-A, 1-7 functions, G mode abbreviating function names, 6-3 alphabetical list, 6-19 to 6-23 argument delimiters, 6-3...
  • Page 391 5-5 to 5-9 bus management functions, 4-11 bwrt, 5-10 to 5-14 cac, 5-15 to 5-16 caddr, 5-17 to 5-19 clr, 5-20 to 5-22 cmd, 5-23 to 5-25 config, 5-26 to 5-29 eos, 5-30 to 5-33 © National Instruments Corp. GPIB-SCSI-A User Manual...
  • Page 392 5-98 to 5-101 trg, 5-102 to 5-104 wait, 5-105 to 5-109 wrt, 5-110 to 5-115 G mode choosing between S mode and G mode, 1-10 to 1-12 configuration. See configuration, G mode. GPIB-SCSI-A User Manual I-10 © National Instruments Corp.
  • Page 393 GPIB initialization functions, S mode caddr, 5-17 to 5-19 chart, 4-12 eos, 5-30 to 5-33 eot, 5-34 to 5-35 onl, 5-54 to 5-55 rsc, 5-76 to 5-78 tmo, 5-98 to 5-101 GPIB mode. See G mode © National Instruments Corp. I-11 GPIB-SCSI-A User Manual...
  • Page 394 3-1 to 3-2 equipment, optional, 1-3 front panel, 1-7 illustration of, 1-1 inspecting before installation, 1-4 kit contents, 1-2 operation as GPIB device. See GPIB operation. overview, 1-1 to 1-2 rear panel, 1-8 GPIB-SCSI-A User Manual I-12 © National Instruments Corp.
  • Page 395 4-11 rd, 5-64 to 5-69 wrt, 5-110 to 5-115 id function G mode, 7-32 example, 7-32 syntax and description, 7-32 S mode, 5-39 to 5-40 description, 5-39 example, 5-40 format, 5-39 © National Instruments Corp. I-13 GPIB-SCSI-A User Manual...
  • Page 396 7-34 syntax and description, 7-33 to 7-34 installation connecting cables, 2-10 to 2-11 inspecting the GPIB-SCSI-A before installation, 1-4 powering on the GPIB-SCSI-A, 2-11 verifying voltage requirement, 2-1 See also configuration, G mode; configuration, S mode. interface management lines...
  • Page 397 GPIB read and write termination (END and EOS), 6-8 to 6-9 G mode, 6-8 to 6-9 S mode, 4-3 to 4-4 listening function of GPIB-SCSI-A and SCSI, 6-5 to 6-6 See also ln function. ln function, 5-49 to 5-50 description, 5-49 to 5-50...
  • Page 398 S mode programming, 4-4 See also status information. MGIN status bit, G mode, B-5 Mode Select function. See mdsct function. Mode Sense function. See mdsns function. MOUT status bit, G mode, B-5 GPIB-SCSI-A User Manual I-16 © National Instruments Corp.
  • Page 399 GPIB. See GPIB operation. operation of SCSI. See SCSI operation. pad function, 7-45 to 7-46 examples, 7-46 syntax and description, 7-45 See also wrext function; write function. Parallel Poll Configure function. See ppc function. © National Instruments Corp. I-17 GPIB-SCSI-A User Manual...
  • Page 400 GPIB operation, C-5 to C-8 SCSI operation, D-11 specifications, 1-4 to 1-6 Place the GPIB-SCSI-A Online/Offline function. See onl function. powering on the GPIB-SCSI-A, 2-11 ppc function, 5-58 to 5-61 description, 5-58 to 5-60 examples, 5-60 to 5-61 format, 5-58 See also config function;...
  • Page 401 6-24 SRQ* bit, 6-25 Take Control (TCT), 6-26 GPIB read and write termination (END and EOS), 6-8 to 6-9 listening function of GPIB-SCSI-A and SCSI, 6-5 to 6-6 numerical input and output, 6-4 processing of, 6-3 programming messages, 6-1...
  • Page 402 7-63 to 7-66 Command Descriptor Block, 7-63 example, 7-65 to 7-66 syntax and description, 7-63 to 7-64 See also blksz function; dtin function; dtout function; read function; wrext function; write function. GPIB-SCSI-A User Manual I-20 © National Instruments Corp.
  • Page 403 GPIB-SCSI-A, 1-8 Reassign Blocks function. See rblks function. Receive Diagnostic Results function. See rcdia function. Reconnect the GPIB-SCSI-A to the SCSI function. See rcnct function. reconnection. See disconnection/reconnection. Release Logical Unit function. See rlseu function. REM status bit, S mode, B-2 to B-3 REN* (remote enable) line, C-4 Request (Conduct) a Parallel Poll function.
  • Page 404 S mode, 5-72 to 5-75 description, 5-72 to 5-74 example, 5-75 format, 5-72 GPIB-SCSI-A sense keys, 5-74 sense data format for GPIB-SCSI-A, 5-73 See also stat function. rsc function, 5-76 to 5-78 description, 5-76 to 5-77 examples, 5-77 to 5-78 format, 5-76 See also sic function;...
  • Page 405 7-43 to 7-44 rblks, 7-47 to 7-48 rcdia, 7-49 to 7-51 rcnct, 7-52 to 7-57 rdbuf, 7-58 to 7-60 rdcap, 7-61 to 7-62 rdext, 7-63 to 7-66 rdfct, 7-67 to 7-69 © National Instruments Corp. I-23 GPIB-SCSI-A User Manual...
  • Page 406 D-11 SCSI bits and GPIB operation, 6-24 signals control signals, D-9 to D-10 data bus signals, D-8 handshake lines, D-9 miscellaneous control lines, D-9 to D-10 overview, D-6 phase control lines, D-9 GPIB-SCSI-A User Manual I-24 © National Instruments Corp.
  • Page 407 S mode chart, 4-12 rsp, 5-79 to 5-81 rsv, 5-82 to 5-83 serial polling asserting EOI* signal with Switch 4, 3-9 GPIB operation, 6-24 serial poll status byte, 6-24 © National Instruments Corp. I-25 GPIB-SCSI-A User Manual...
  • Page 408 SCSI connector and signal designations, 1-9 standard 50-pin connector, D-7 SLCT status bit, G mode, B-6 sndia function, 7-86 to 7-88 Command Descriptor Block, 7-86 examples, 7-87 to 7-88 syntax and description, 7-86 to 7-87 GPIB-SCSI-A User Manual I-26 © National Instruments Corp.
  • Page 409 G mode, 7-94 to 7-100 examples, 7-99 to 7-100 GPIB error conditions, 7-97 GPIB-SCSI-A status conditions, 7-95 to 7-96 SCSI error conditions, 7-98 syntax and description, 7-94 to 7-99 See also rqsns function. S mode, 5-89 to 5-97...
  • Page 410 TACS, B-3 TIMO, B-1 to B-2 status bytes, B-12 to B-13 CHECK CONDITION, 4-4, B-13, D-5 GOOD, B-13 status conditions, GPIB-SCSI-A G mode, 7-95 to 7-96 S mode, 5-92 to 5-93 status information G mode programming, 6-4 to 6-5 S mode programming, 4-3 status bytes, B-12 to B-13 See also message bytes;...
  • Page 411 GPIB operation, C-1 to C-2 GPIB read and write termination (END and EOS) G mode, 6-8 to 6-9 S mode, 4-3 to 4-4 talk function of GPIB-SCSI-A and SCSI, 6-7 to 6-8 Target definition, 3-2 SCSI communication, D-5 SCSI operation, D-1 testing for.
  • Page 412 Transfer Data Out Information to Selected SCSI Target function. See dtout function. Transfer Message Bytes from the GPIB-SCSI-A to the SCSI Target function. See msgout function. Transfer Message Bytes from the Target to the GPIB-SCSI-A function. See msgin function.
  • Page 413 5-113 to 5-115 format, 5-110 See also eos function; eot function; tmo function. wrtbuf function, 7-117 to 7-119 Command Descriptor Block, 7-117 example, 7-119 syntax and description, 7-117 to 7-118 See also rdbuf function. © National Instruments Corp. I-31 GPIB-SCSI-A User Manual...

Table of Contents