background image

Chapter 6

Programming in G Mode

© National Instruments Corp.

6-23

GPIB-SCSI-A User Manual

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.

rst

Asserts the SCSI RST* line for
approximately 100 

µ

sec.  The assertion of

this line for 25 

µ

sec should indicate a valid

reset condition.

selwa

Select the Target specified by the tid
command with SCSI ATN* line asserted.

selwo

Select the Target specified by the tid
command without the SCSI ATN* line
asserted.

sndia

Issue the high-level SEND DIAGNOSTIC
command to the specified Target.

space

Issue the high-level SPACE command to
the specified Target.

srqen

Set conditions for asserting SRQ.

stat

Select the type of status reporting desired
from the GPIB-SCSI-A, or request the
status.

tid

Specify a SCSI Target ID that will be used
during high-level calls for selection
purposes.

(continues)

Summary of Contents for GPIB-SCSI-A

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

Page 2: ...fices 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 Germany 089 741 31 30 Italy 02 48301892 Japan 03 3788 1921 Netherlands 03480 33466 Norway 32 848400 Spain 91 640 0085 Sweden 08 730 49 70 Switzerland 056 20 51 51 U K 0635 523545 ...

Page 3: ... to this document or the information contained in it EXCEPT AS SPECIFIED HEREIN NATIONAL INSTRUMENTS MAKES NO WARRANTIES EXPRESS OR IMPLIED AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE CUSTOMER S RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER...

Page 4: ... use in treatment and diagnosis of humans Applications of National Instruments products involving medical or clinical treatment can create a potential for accidental injury caused by product failure or by errors on the part of the user or application designer Any use or application of National Instruments products for or involving medical or clinical treatment must be performed by properly trained...

Page 5: ...luding interference that may cause undesired operation Canadian Department of Communications This device complies with the limits for radio noise emissions from digital apparatus set out in the Radio Interference Regulations of the Canadian Department of Communications DOC Le présent appareil numérique n émet pas de bruits radioélectriques dépassant les limites applicables aux appareils numériques...

Page 6: ...ay from the receiver with which it is interfering Reorient or relocate the receiver s antenna Be sure that the equipment is plugged into a grounded outlet and that the grounding has not been defeated with a cheater plug Notice to user Changes or modifications not expressly approved by National Instruments could void the user s authority to operate the equipment under the FCC Rules If necessary con...

Page 7: ...8 The SCSI Port 1 9 The GPIB Port 1 10 Choosing Between S Mode and G Mode 1 10 Chapter 2 Installation and Configuration of the GPIB SCSI A 2 1 Installation 2 1 Step 1 Verify the Voltage Requirement 2 1 Step 2 Configure the Operating Characteristics 2 2 Configuration Switch Settings for SW1 2 2 Configuration Switch Settings for SW2 in S Mode 2 5 Configuration Switch Settings for SW2 in G Mode 2 7 S...

Page 8: ...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 4 8 S Mode Default Settings 4 10 S Mode Functions 4 11 GPIB Function Group 4 11 SCSI Function...

Page 9: ...51 onl Place the GPIB SCSI A Online Offline 5 54 pct Pass Control 5 56 ppc Parallel Poll Configure 5 58 ppu Parallel Poll Unconfigure 5 62 rd Read Data 5 64 rpp Request Conduct a Parallel Poll 5 70 rqsns Request Sense 5 72 rsc Request Release System Control 5 76 rsp Request Conduct a Serial Poll 5 79 rsv Request Service Set or Change Serial Poll Status Byte 5 82 sic Send Interface Clear 5 84 sre S...

Page 10: ...nection 6 11 G Mode Default Settings 6 12 G Mode Functions 6 12 SCSI Function Group 6 13 SCSI Configuration Function Group 6 17 GPIB Configuration Function Group 6 18 General Use Function Group 6 18 List of G Mode Functions in Alphabetical Order 6 19 Operation of the GPIB SCSI A as a GPIB Device 6 23 Serial Poll 6 24 SCSI Bits 6 24 DCR Bit 6 24 RDY Bit 6 25 ERR Bit 6 25 SRQ Bit 6 25 Parallel Poll ...

Page 11: ... 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 rcdia Receive Diagnostic Results 7 49 rcnct Reconnect the GPIB SCSI A to the SCSI 7 52 rdbuf Read Buffer 7 58 rdcap Read Capacity 7 61 rdext Read Extended 7 63 rdfct Read Defect Data 7 67 read Read 7 70 rewind Rewind 7 74 rlseu Release Logical Unit 7 76 rqsns Request Sense 7...

Page 12: ...Sense Keys B 16 Appendix C Operation of the GPIB C 1 Types of Messages C 1 Talkers Listeners and Controllers C 1 The Controller In Charge and System Controller C 2 GPIB Signals and Lines C 3 Data Lines C 3 Handshake Lines C 3 NRFD not ready for data C 3 NDAC not data accepted C 4 DAV data valid C 4 Interface Management Lines C 4 ATN attention C 4 IFC interface clear C 4 REN remote enable C 4 SRQ s...

Page 13: ... D 9 Handshake Lines D 9 Phase Control Lines D 9 Miscellaneous Control Lines D 9 The TERMPWR Pin D 10 Physical and Electrical Characteristics D 11 Configuration Restrictions D 11 Appendix E Parallel Polling E 1 Operation E 1 Configuration E 1 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 Communica...

Page 14: ... at End of SCSI Bus 2 10 Figure 4 1 Command Descriptor Block Example 4 2 Figure 6 1 Serial Poll Status Byte 6 24 Figure 7 1 Valid Bits of mask 7 13 Figure C 1 The GPIB Connector and Signal Assignments C 6 Figure C 2 Linear Configuration C 7 Figure C 3 Star Configuration C 8 Figure D 1 Standard 50 Pin SCSI Connector D 7 Figure D 2 Daisy Chain Configuration of the SCSI Bus D 11 Tables Table 1 1 Elec...

Page 15: ... A Sense Keys 5 74 Table 5 6 GPIB SCSI A Status Conditions 5 92 Table 5 7 GPIB Error Conditions 5 93 Table 5 8 SCSI Error Conditions 5 94 Table 5 9 Timeout Limit Values 5 98 Table 5 10 Wait Mask Values 5 106 Table 6 1 SCSI Functions 6 13 Table 6 2 SCSI Configuration Functions 6 17 Table 6 3 GPIB Configuration Function 6 18 Table 6 4 General Use Functions 6 18 Table 6 5 GPIB SCSI A G Mode Functions...

Page 16: ... specifications of the GPIB SCSI A and explains the two modes of operation for the GPIB SCSI A Chapter 2 Installation and Configuration of the GPIB SCSI A contains the steps for installing and configuring the GPIB SCSI A in S mode and G mode Chapter 3 Technical Information contains detailed information for advanced users who want to increase the power of the GPIB SCSI A Chapter 4 Programming in S ...

Page 17: ... the interface functions Appendix B Status and Message Information 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 Appendix C Operation of the GPIB describes the operation...

Page 18: ...ograms subprograms subroutines device names functions variables filenames and extensions and for statements and comments taken from program code IEEE 488 and IEEE 488 and IEEE 488 2 are used throughout IEEE 488 2 this manual to refer to the ANSI IEEE Standard 488 1 1987 and the ANSI IEEE Standard 488 2 1987 respectively which define the GPIB Related Documentation The following documents contain in...

Page 19: ...ments 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 These forms are in Appendix F Customer Communication at the end of this manual ...

Page 20: ......

Page 21: ...nd logic required to implement the physical and electrical specifications of the IEEE 488 2 and the ANSI X3T9 2 standards It is able to interpret and execute commands that you send to it over the GPIB or SCSI ports and perform all necessary GPIB to SCSI protocol conversion What You Need to Get Started One of the following boxes GPIB SCSI A 100 to 120 VAC GPIB SCSI A 220 to 240 VAC One of the follo...

Page 22: ... 50 pin to DEC VAXstation 68 pin 1 m or 2 m Type SCSI J cable SCSI 1 50 pin Champ to SCSI 1 50 pin Champ 1 m or 2 m lengths Type SCSI L cable SCSI 1 50 pin to Sun 3 60 workstation port 68 pin D shell 1 m or 2 m Type SCSI M cable SCSI 1 50 pin to Macintosh Powerbook port 0 5 m Shielded GPIB cables GPIB Type X1 cables 1 m 2 m 4 m or 8 m GPIB Type X2 cables 1 m 2 m 4 m or 8 m To meet FCC emission lim...

Page 23: ...ions If the damage appears to have been caused in shipment file a claim with the carrier GPIB SCSI A Specifications The following tables specify the electrical environmental and physical characteristics of the GPIB SCSI A as well as the maximum transfer rates for the GPIB SCSI A Table 1 1 Electrical Characteristics Characteristic Specification Power Supply Unit 100 to 120 VAC 10 50 to 60 Hz or 220...

Page 24: ... Temperature 0 to 40 C Storage Temperature 20 to 70 C Relative Humidity 10 to 90 noncondensing conditions EMI FCC Class A Verified Table 1 3 Physical Characteristics Characteristic Specification Overall Case Size 2 934 in by 7 489 in by 9 88 in 74 5 mm by 190 2 mm by 250 9 mm Case Material All metal enclosure Rack Mounting Single or dual kits available Weight 4 lb 1 81 kg ...

Page 25: ...mory SCSI Writes from Buffer Memory GPIB Reads to Buffer Memory GPIB Writes from Buffer Memory 1 Mbytes sec 800 kbytes sec 980 kbytes sec 615 kbytes sec Straight Through Transfer Rates GPIB Read SCSI Write GPIB Write SCSI Read 800 kbytes sec 615 kbytes sec Note These numbers are the maximum rates that the hardware can send receive data Software overhead will affect the actual throughput of your sy...

Page 26: ...describes each LED Table 1 5 LED Descriptions LED Indication POWER Indicates that power to the unit has been applied and the ON OFF switch is in the ON position READY Indicates that the power on self test has passed successfully and the unit is ready to operate TALK Indicates that the GPIB SCSI A is configured as a GPIB Talker LISTEN Indicates that the GPIB SCSI A is configured as a GPIB Listener ...

Page 27: ......

Page 28: ...ach of the signal lines refer to Appendix D Operation of the SCSI 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 reserved ground ground ground ground ground ground open ground ground ground ground ground ground ground ground ground ground ground ground ground ground ground ground reserved ground ground gr...

Page 29: ...is active low For a description of each of the signal lines refer to Appendix C Operation of the GPIB DIO1 DIO2 DIO3 DIO4 EOI DA V NRFD NDAC IFC SRQ ATN SHIELD DIO5 DIO6 DIO7 DIO8 REN GND TW PAIR W DA V GND TW PAIR W NRFD GND TW PAIR W NDAC GND TW PAIR W IFC GND TW PAIR W SRQ GND TW PAIR W ATN SIGNAL GROUND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Figure 1 4 The GPIB Connecto...

Page 30: ...ing instructions from the SCSI host and is configured as a SCSI device Therefore set the GPIB SCSI A to operate in S mode If on the other hand you are using the GPIB SCSI A to communicate with SCSI devices from a GPIB host the GPIB SCSI A receives its programming instructions from the GPIB host and is configured as a GPIB device Therefore set the GPIB SCSI A to operate in G mode Figure 1 5 shows t...

Page 31: ...nts Corp 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 Controller SCSI disk drive GPIB cable SCSI cable GPIB printer SCSI scanner GPIB SCSI A Figure 1 6 A SCSI Bus Connected to a GPIB Controller ...

Page 32: ... cables 4 Switch on your GPIB SCSI A and power on your system 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 Cautio...

Page 33: ...o remove it Configuration Switch Settings for SW1 The DIP switch at location SW1 on the rear panel is used to configure the power on primary GPIB address and SCSI ID of the GPIB SCSI A The DIP switch has eight configuration switches The factory default setting is shown in Figure 2 1 In this figure the black side of the switch is the side of the switch you press down SW1 1 2 3 4 5 6 7 8 O N Key sid...

Page 34: ...ght 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 Switches 1 2 3 Indication OFF OFF OFF OFF OFF ON OFF ON OFF OFF ON ON ON OFF OFF ON OFF ON ON ON OFF ON ON ON SCSI ID of 0 SCSI ID of 1 SCSI ID of 2 SCSI ID of 3 SCSI ID of 4 SCSI ID of 5 SCSI ID of 6 SCSI ID of 7 ...

Page 35: ...FF ON ON ON OFF ON OFF ON ON OFF ON ON ON ON ON OFF OFF ON ON ON OFF ON ON ON ON ON OFF ON ON ON ON ON GPIB Primary address 0 GPIB Primary address 1 GPIB Primary address 2 GPIB Primary address 3 GPIB Primary address 4 GPIB Primary address 5 GPIB Primary address 6 GPIB Primary address 7 GPIB Primary address 8 GPIB Primary address 9 GPIB Primary address 10 GPIB Primary address 11 GPIB Primary addres...

Page 36: ...2 SW2 1 2 3 4 5 6 7 8 O N Key side you press down 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 Switch 5 is OFF indicating that the GPIB SCS...

Page 37: ...ble 2 3 Possible Configurations for SW2 in S Mode Switch Position Indication 8 OFF S mode 7 OFF SCSI parity generation checking enabled ON SCSI parity generation checking disabled 6 OFF Buffering disabled ON Buffering enabled 5 OFF Complete SCSI data phases ON Do not complete SCSI data phases 4 OFF If buffering is enabled use single buffering ON If buffering is enabled use double buffering 1 3 OFF...

Page 38: ...e 2 3 SW2 Sample Setting for G Mode Switch 8 is ON indicating that the GPIB SCSI A will be operating in G mode Switch 7 is OFF indicating that the GPIB SCSI A detects and reports SCSI parity errors Switch 6 is ON indicating that the GPIB SCSI A asserts the SCSI RST signal at power on to reset the entire SCSI bus attached to the GPIB SCSI A Switch 5 is OFF indicating that the GPIB SCSI A responds t...

Page 39: ... OFF Do not assert the SCSI RST signal at power on ON Assert the SCSI RST signal at power on 5 OFF Major minor GPIB addressing used ON Secondary addressing used 4 OFF Do not assert EOI with serial poll response ON Assert EOI with serial poll response 1 3 OFF Reserved and should remain OFF SCSI Terminating Resistors Because of its high speed capabilities the SCSI bus is sensitive to the electrical ...

Page 40: ...ystem has multiple devices connected to the host Figure 2 4 shows the GPIB SCSI A located at the end of the system SCSI host GPIB SCSI A SCSI tape drive SCSI disk drive 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 ...

Page 41: ... and the SCSI tape drive as shown in Figure 2 5 do not have terminating resistors installed Also remove the terminating resistor pack from the SCSI port on the rear panel of the GPIB SCSI A Proper termination is absolutely essential to the devices connected on a SCSI bus Read the documentation for each device to find out what kind of termination it provides Step 3 Connect the Cables Caution Never ...

Page 42: ...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 If the READY indicator does not come on within 10 sec after the unit is powered on recheck all connections...

Page 43: ... generator a programmable timer unit and an interrupt controller All GPIB functionality is provided by a NAT4882 application specific integrated circuit ASIC GPIB Controller chip which is programmed and maintained by the operating system All SCSI functionality is provided by an LSI SCSI controller chip which is also programmed and maintained by the operating system Both the GPIB and SCSI ports use...

Page 44: ... this data out to the destination port If there is more data available it fills the buffer from the source port again and writes it out to the destination port This process continues until all available data has been transferred When using the double buffering method the GPIB SCSI A splits the available DRAM buffer space into two distinct buffers During every data transfer it first fills the first...

Page 45: ...evice that is commanded by the Initiator to perform specific activities Configuration Switches at SW2 This section describes the purpose of each configuration switch located at SW2 on the GPIB SCSI A during S mode operation Switch 7 Switch 7 determines whether or not the GPIB SCSI A notifies users of the error condition created if the SCSI data bus parity is incorrect when the GPIB SCSI A reads da...

Page 46: ...ch phase the error occurred Therefore it is recommended to issue the command again The parity error is very rare if you are using correct SCSI cabling If you are receiving this error often and you are using properly shielded SCSI cabling recheck all SCSI connections within your system to ensure proper connection If this does not solve the problem and you are sure everything else is performing as i...

Page 47: ... to send data to the GPIB and reads in and discards the rest of the SCSI data The default setting of Switch 5 is OFF complete SCSI data transfers to the specified count Switch 5 ON Setting configuration Switch 5 ON causes the GPIB SCSI A to immediately change into the Status phase from a data transfer phase in the event of a short count instead of completing SCSI activity to the specified length S...

Page 48: ...the GPIB system of which the GPIB SCSI A is a part can use the GPIB SCSI A to control a SCSI system attached to the GPIB SCSI A Configuration Switches at SW2 This section describes the purpose of each configuration switch located at SW2 on the GPIB SCSI A during G mode operation Switch 7 Switch 7 determines whether or not the GPIB SCSI A notifies users of the error condition created if the SCSI da...

Page 49: ...e phases in which the parity error can occur there is no way to know in which phase the error occurred Therefore it is recommended to issue the command again The parity error is very rare if you are using correct SCSI cabling If you are receiving this error often and you are using proper shielded SCSI cables recheck all SCSI connections within your system to ensure proper connection If this does n...

Page 50: ...SI bus at power on Switch 5 Switch 5 determines whether the GPIB SCSI A uses Major Minor GPIB addressing or secondary GPIB addressing to differentiate between the Command and Status Channel and the Data Channel For Major Minor GPIB addressing the Command and Status Channel of the GPIB SCSI A is at the address specified by switches 4 through 8 of SW1 and the Data Channel is at the address specified...

Page 51: ... 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 Switches 1 Through 3 Switches 1 through 3 are reserved for future use an...

Page 52: ...ages Note This chapter presumes some basic knowledge of the SCSI operation For basic information about the SCSI refer to Appendix D Operation of the SCSI Programming Messages You program the GPIB SCSI A by sending it programming messages which are SCSI Command Descriptor Blocks by way of its SCSI port The Command Descriptor Blocks and all interaction on the SCSI bus must be handled by you through ...

Page 53: ...ssued to the GPIB SCSI A Additionally you need to process all the SCSI bus phases in the proper order For more information on the proper order of SCSI bus phases refer to the individual command descriptions in Chapter 5 S Mode Functions Function Names and Opcodes The GPIB SCSI A uses operation codes opcodes to determine which command it must execute In the discussion of each command in Chapter 5 S...

Page 54: ... stores that information in its memory so that the status information is available to you when you request it The function descriptions also explain that the GPIB SCSI A returns to you certain information This means that the GPIB SCSI A sends information to you over the SCSI port when requested You then interpret this status in your application GPIB Read and Write Termination Method END and EOS Yo...

Page 55: ... details how an Initiator can at any time notify a Target that it has a message ready for the Target by creating the ATTENTION condition with the assertion of the SCSI ATN signal It is the prerogative of the Target to respond to the ATTENTION condition by entering the Message Out phase The Target does not have to process this ATTENTION condition The GPIB SCSI A processes the ATTENTION condition bu...

Page 56: ...ys and what each key represents see Appendix B Status and Message Information You can also use the GPIB SCSI A stat command to receive the internal status of the GPIB SCSI A You can also use the stat command to configure the GPIB SCSI A for continuous status reporting Continuous status reporting is helpful during program development because status and error information is returned after every comm...

Page 57: ...sage 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 If this bit is not set or the Initiator does not issue an IDENTIFY message the GPIB ...

Page 58: ... Whether you are using single or double buffering the first buffer must be filled from the GPIB port before you can begin the SCSI transfer When the SCSI port is needed the GPIB SCSI A arbitrates gains the SCSI bus and reselects the Initiator to reconnect The Reselection phase is distinguished from the Selection phase by the I O signal which is active during the Reselection phase After successful ...

Page 59: ... SCSI port For example if the buffer size is 224K and you issue a 200K brd the box completes the following steps Step 1 Prepares for disconnection reconnection and receives the command Step 2 Disconnects from the SCSI reads 112K bytes from the GPIB into the first buffer then reconnects Step 3 Begins writing the 112K bytes from the first buffer to the SCSI It also begins reading 88K bytes from the ...

Page 60: ...connect 3 Command Phase After following the Message Out phase the GPIB SCSI A goes into the Command phase to receive the command Once you have completed steps 1 through 3 the GPIB SCSI A performs the following 1 The GPIB SCSI A disconnects from the SCSI by entering the Message In phase and delivering the SAVE DATA POINTER and DISCONNECT messages to the Initiator signalling its intention to disconn...

Page 61: ...ble 4 1 lists power on default characteristics of the GPIB SCSI A and the functions you can use to change those characteristics Table 4 1 GPIB Characteristics Default Characteristic Value Function Primary secondary address pad switches 4 through 8 caddr of SW1 sad none End Of String modes none eos Assert EOI on last byte of writes yes eot ist bit setting0 ist GPIB SCSI A is System Controller yes r...

Page 62: ...th the most frequently used groups listed first Often the I O and bus management functions are the only ones you need Table 4 2 GPIB Function Group Function Opcode Description I O Functions brd 0xDD Low level read GPIB data bwrt 0xDC Low level write GPIB data rd 0xCF High level read GPIB data wrt 0xDB High level write GPIB data Bus Management Functions clr 0xC2 Clear specified device lines 0xC3 Ex...

Page 63: ... the GPIB SCSI A eos 0xC5 Change or disable GPIB EOS termination mode eot 0xC6 Enable or disable END termination message on GPIB write operations onl 0xCB Place the GPIB SCSI A online offline rsc 0xD1 Request System Control tmo 0xD8 Change or disable time limits Serial Poll Functions rsp 0xD3 Conduct request a serial poll of specified device rsv 0xD4 Request service and or set or change the serial...

Page 64: ...488 commands gts 0xC7 Go from Active Controller to Standby ln 0xD2 Check for a listening device pct 0xCC Pass Control sic 0xD5 Assert IFC for 500 µsec to become Controller In Charge sre 0xD6 Set clear remote enable Parallel Poll Functions ist 0xC9 Set or clear individual status bit for use in GPIB SCSI A response to Parallel Polls ppc 0xCD Parallel Poll Configure ppu 0xCE Parallel Poll Unconfigure...

Page 65: ...SI A Table 4 3 lists these SCSI functions Table 4 3 SCSI Functions Function Opcode Description inq 0x12 Request Inquiry data from GPIB SCSI A rqsns 0x03 Request Sense data from GPIB SCSI A General Use Function Group Table 4 4 lists the General Use functions Table 4 4 General Use Functions Function Opcode Description id 0xC8 Identify system config 0xDE Read or change GPIB SCSI A configuration stat ...

Page 66: ... Change the IEEE 488 address of the GPIB SCSI A clr 0xC2 Clear specified device cmd 0xC4 Send IEEE 488 commands config 0xDE Read or change GPIB SCSI A configuration eos 0xC5 Change or disable GPIB End Of String termination mode eot 0xC6 Enable or disable END termination message on GPIB write operations gts 0xC7 Go from Active Controller to Standby id 0xC8 Identify system inq 0x12 Request Inquiry d...

Page 67: ... 0xCE Parallel Poll Unconfigure rd 0xCF High Level read GPIB data rpp 0xD0 Conduct request a Parallel Poll rqsns 0x03 Request Sense data from GPIB SCSI A rsc 0xD1 Request System Control rsp 0xD3 Conduct request a serial poll of device rsv 0xD4 Request service and or set or change the serial poll status byte sic 0xD5 Assert IFC for 500 µsec sre 0xD6 Set clear remote enable stat 0xD7 Return GPIB SCS...

Page 68: ... after selection A description and cause of possible errors Programming examples presented algorithmically in a pseudo code format Points to Remember Consider the following points when reading through the S mode functions The programming examples presented for each command are in an algorithmic format to show you the proper steps required to execute each command You should substitute in each algor...

Page 69: ...on reconnection the GPIB SCSI A does not disconnect with these commands The I O and bus management functions should meet most of your needs for GPIB activity In the descriptions that follow these functions are marked with an asterisk These are the most frequently used functions Any bit field or byte in the Command Descriptor Blocks that is marked Reserved and is not zero when issued to the GPIB SC...

Page 70: ... the GPIB SCSI A with the SCSI ATN signal not asserted SCSISelectATN GPIB SCSI A id 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 ...

Page 71: ... the status of the previous command 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 SCSIWrite databuffer count The GPIB SCSI A is now in the Data Out phase As an Initiator you should send data from the SCSI bus This data goes out to the GPIB Count b...

Page 72: ...ber of bytes to read from the GPIB therefore Count can represent a number between 0 and 4 294 967 295 The GPIB SCSI A reads data from the GPIB until an END condition count is depleted or some type of error occurs 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 ...

Page 73: ...s option is enabled Device Clear DCL or Selected Device Clear SDC command is received from another device that is Controller In Charge CIC After brd terminates the GPIB SCSI A records the number of data bytes it actually read from the GPIB If one of the previous events occurs except for the GPIB SCSI A successfully reading all data the count may be less than expected The only possible errors are a...

Page 74: ...CSI A drives the SCSI through after selection are the Command Data In Status and Message In phases See Also eos eot stat and tmo Examples 1 Use brd without the SCSI disconnection reconnection capability to read 16 bytes from the GPIB Build SCSI Command Descriptor Block CDB Byte 0 0xDD Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x10 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SC...

Page 75: ...5 0x00 SCSIArbitrate SCSISelectATN GPIB SCSI A id SCSIMesgOut 0xC0 SCSICmd CDB While Not Done While SCSI phase Data In SCSIRead buffer 1 Increment buffer pointer If SCSI phase Message In SCSIMesgIn Mbyte 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 ...

Page 76: ...In phases That is why Done is set in the Status phase condition Also the only phase that can normally follow the Status phase is the Message In phase If the Message In phase is not following a Status phase the GPIB SCSI A is notifying the Initiator that it is going to disconnect from the SCSI or after reconnection is sending an IDENTIFY message As long as the phase is the Data In phase the GPIB SC...

Page 77: ...mber of bytes to write to the GPIB Therefore Count can represent a number between 0 and 4 294 967 295 All data received from the SCSI Initiator during the Data Out phase is passed to the GPIB Listeners If an error occurs with the GPIB the GPIB SCSI A stops attempting to transfer data from the SCSI to the GPIB Instead the GPIB SCSI A finalizes processing of the command according to Switch 5 of conf...

Page 78: ...EABO if the I O time limit is exceeded EADR if the GPIB SCSI A has not been addressed by the Controller to talk or ENOL if there are no Listeners on the GPIB If an error occurs the GPIB SCSI A aborts the command issues a Check Condition status response and sets the Sense Key to ERROR This command is referred to as Board Level because it performs none of the necessary GPIB addressing All addressing...

Page 79: ...iptor Block CDB Byte 0 0xDC Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x10 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIWrite databuffer 16 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck 2 Use bwrt with the SCSI disconnection reconnection capability to write 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 B...

Page 80: ...e and sends an IDENTIFY message of 0x80 The Data Out phase should resume If SCSI Phase Status 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 Also the only phase that can n...

Page 81: ... Manual 5 14 National Instruments Corp bwrt 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 ErrorCheck ...

Page 82: ... Mode 4 Reserved 5 Reserved Remarks If Mode is 0 the GPIB SCSI A takes control immediately that is it takes control asynchronously If Mode is 1 the 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 respon...

Page 83: ...e 1 Request the GPIB to become Active Controller of the GPIB immediately Build SCSI Command Descriptor Block CDB Byte 0 0xC0 Byte 1 0x00 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 Byte 2 0x00 Byte 3 0x01 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelec...

Page 84: ...y Addr Opt Mode Reserved 3 Reserved 4 Reserved 5 Reserved Remarks GPIB Primary Address is a device address that indicates the new GPIB address for the GPIB SCSI A GPIB Secondary Address indicates an optional secondary address for the GPIB SCSI A To indicate that secondary addressing is desired and that the GPIB Secondary Address field contains a valid device address Mode should be set to 1 The add...

Page 85: ... the SCSI through after selection are the Command Status and Message In phases Examples Note 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 change its primary GPIB address to 5 with no secondary addressing If secondary addressing were enabled this would d...

Page 86: ...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 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 87: ...IB 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 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 ...

Page 88: ... SCSI through after selection are the Command Status and Message In phases See Also Appendix C Operation of the GPIB for more information on clearing devices Examples Note 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 send SDC to the GPIB device with pri...

Page 89: ...t 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 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 90: ...rved 3 Most Significant Byte of Command Count 4 Least Significant Byte of Command Count 5 Reserved Remarks Command Count is a 16 bit unsigned number representing the number of GPIB command bytes interface messages to send These commands are represented by their ASCII character equivalents For example the GPIB Untalk UNT command is the ASCII character underscore _ The GPIB commands or interface mes...

Page 91: ... above occurs 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 If either error occurs the GPIB SCSI A aborts the command issues a CHECK CONDITION status response and sets th...

Page 92: ...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 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x04 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIWrite cmdbuffer 4 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 93: ...ge some of the configuration parameters within the box The Allocation Length indicates the number of bytes that the Initiator has allocated for returned configuration data An Allocation Length of zero indicates that no bytes of configuration data are transferred Any other value indicates the maximum number of bytes that can be transferred up to 5 The GPIB SCSI A terminates the Data In phase when A...

Page 94: ...o the section titled Buffering Methods in Chapter 3 Technical Information Table 5 1 Buffering Methods for Data Transfer Commands Description BufMode Do not change the buffering method 0 Use the No Buffering method 1 Use the Single Buffering method 2 Use the Double Buffering method 3 The Size argument is used to change the size of the internal buffer used by the GPIB SCSI A This buffer is used by t...

Page 95: ...SW2 configurations bit 0 of the byte corresponds to Switch 1 and bit 7 corresponds to Switch 8 If the bit is 1 the corresponding switch on the DIP switch is On For a description of what each switch indicates refer to the Configure the Operating Characteristics section in Chapter 2 Installation and Configuration of the GPIB SCSI A The buffer size returned in bytes 3 to 5 reflects changes made due t...

Page 96: ...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 Build SCSI Command Descriptor Block CDB Byte 0 0xDE Byte 1 0x02 Byte 2 0x80 Byte 3 0x00 Byte 4 0x05 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead configinfo 5 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 97: ...PIB eos also enables the GPIB SCSI A to tell other devices that it is finished writing information to the GPIB eos defines a specific EOS character to be recognized as a string terminator Format Bit 7 6 5 4 3 2 1 0 Byte 0 Opcode C5H 1 Reserved 2 Reserved 3 EOS Mode 4 ASCII value of EOS Character 5 Reserved Remarks EOS Mode indicates GPIB termination methods See Table 5 2 for proper values of the E...

Page 98: ...f ASCII Value of EOS Character If the first and third methods are chosen a full 8 bit comparison is used The second and third methods listed in Table 5 2 determine when GPIB write operations performed by the GPIB SCSI A send the END message If the second method alone is chosen the END message is sent automatically with the EOS byte when the low seven bits of that byte match the low seven bits of t...

Page 99: ...s that the GPIB SCSI A drives the SCSI through after selection are the Command Status and Message In phases See Also GPIB Read and Write Termination Method in Chapter 4 Programming in S Mode Examples Note Because the only difference among Examples 1 2 and 3 is the 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 ter...

Page 100: ...erminate GPIB reads when CR is detected Build SCSI Command Descriptor Block CDB Byte 0 0xC5 Byte 1 0x00 Byte 2 0x00 Byte 3 0x08 Byte 4 0x0D Byte 5 0x00 3 Command the GPIB SCSI A to disable all EOS modes Build SCSI Command Descriptor Block CDB Byte 0 0xC5 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte...

Page 101: ...ved Mode 4 Reserved 5 Reserved Remarks If Mode is 1 the GPIB SCSI A automatically sends the END message with the last byte of each wrt If Mode is 0 END is not sent The power on default is 1 The assignment made by eot remains in effect until you call eot again call onl or you turn off the GPIB SCSI A The GPIB SCSI A sends the END message by asserting the GPIB EOI signal during the last byte of a da...

Page 102: ...PIB SCSI A to not assert the GPIB EOI signal with the last byte of GPIB writes Build SCSI Command Descriptor Block CDB Byte 0 0xC6 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 2 Request the GPIB SCSI A to assert the GPIB EOI signal with the last byte of GPIB writes Build SCSI Command Descriptor Block CDB Byte 0 0xC6 Byte 1 0x00 Byte 2 0x00 Byte 3 0x01 Byte 4 0x00 Byte 5 0x00 SCSIArb...

Page 103: ... possibly corrupting the transfer Format Bit 7 6 5 4 3 2 1 0 Byte 0 Opcode C7H 1 Reserved 2 Reserved 3 Reserved Mode 4 Reserved 5 Reserved Remarks 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...

Page 104: ... records the ECIC error issues a CHECK CONDITION status response and sets the Sense Key to ERROR 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 cac Examples Note 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...

Page 105: ...quest 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 Byte 3 0x01 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 106: ...cation data are transferred Any other value indicates the maximum number of bytes that are transferred up to 75 The GPIB SCSI A terminates the Data In phase when Allocation Length bytes have transferred or when all available identification data have transferred to the Initiator whichever is less The identification is returned in 75 bytes consisting of three substrings separated by a CR LF pair The...

Page 107: ...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 Byte 3 0x00 Byte 4 0x4B Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead databuffer 75 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 108: ...Allocation Length indicates the number of bytes that the Initiator has allocated for returned inquiry data An Allocation 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 dat...

Page 109: ...2 1 ISO Version 0 ECMA Version 0 ANSI Approved Version 1 3 2 SCSI 2 Inquiry Data Format 4 2CH Additional Inquiry Data Bytes 5 0 Reserved 6 0 Reserved 7 0 Reserved 8 15 Vendor ID in ASCII N I 16 31 Product ID in ASCII GPIB SCSI A 32 35 Revision level in ASCII x y where x represents a major revision letter and y represents a minor revision number 36 37 0 Number of extents 38 0 Bit map of Group 0 com...

Page 110: ...nse 40 0 No commands in this range 41 4 Command 18 Inquiry 42 0 No commands in this range 43 6 Bit map of Group 6 Vendor Unique commands supported 44 FFH Commands 0 7 45 FFH Commands 8 15 46 FFH Commands 16 23 47 FFH Commands 24 31 48 FFH End of list indicator The information transfer phases that the GPIB SCSI A drives the SCSI through after selection are the Command Data In Status and Message In ...

Page 111: ...PIB 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 Byte 3 0x00 Byte 4 0x31 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead databuffer 49 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 112: ...roller Format Bit 7 6 5 4 3 2 1 0 Byte 0 Opcode C9H 1 Reserved 2 Reserved 3 Reserved Mode 4 Reserved 5 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 I...

Page 113: ...program sequence 1 Request the GPIB SCSI A to clear its Individual Status bit Build SCSI Command Descriptor Block CDB Byte 0 0xC9 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 2 Request the GPIB SCSI A to set its Individual Status bit Build SCSI Command Descriptor Block CDB Byte 0 0xC9 Byte 1 0x00 Byte 2 0x00 Byte 3 0x01 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id...

Page 114: ...tate of the eight GPIB control lines is returned in the first byte as follows 7 6 5 4 3 2 1 0 EOI ATN SRQ REN IFC NRFD NDAC DAV The second byte contains mask bits in the same order as above indicating which lines are actually being reported and which are undeterminable If a particular mask bit is 1 then the corresponding bit in the first byte indicates the state of that line If the mask bit is 0 t...

Page 115: ...uest 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 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead linesinfo 2 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 116: ...imary Address and the GPIB Secondary Address arguments To indicate that the GPIB Secondary Address contains a valid device address Mode must be set to 1 This command returns one byte of data If the device at the specified address is listening the byte has a non zero value If there is no listening device at the specified address a zero is returned If Mode is 1 and the GPIB Secondary Address argumen...

Page 117: ...ense Key to ILLEGAL REQUEST 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 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 Byte 0 0xD2 Byte 1 0x08 Byte 2 0xFC Byte 3 0x00...

Page 118: ...ed Me 4 Reserved 5 Reserved 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 The following paragraphs apply when configuring another device Me bit is 0 The argument GPIB Primary...

Page 119: ...ITION status response and sets the Sense Key to ILLEGAL REQUEST The information transfer phases that the GPIB SCSI A drives the SCSI through after selection are the Command Status and Message In phases The following paragraphs apply when configuring the GPIB SCSI A Me bit is 1 The GPIB SCSI A configures itself for local program mode by pulsing its rtl return to local message The arguments GPIB Pri...

Page 120: ...SCSI A to send the Go To Local GTL command to the GPIB device with primary address 1 secondary address 2 Build SCSI Command Descriptor Block CDB Byte 0 0xCA Byte 1 0x08 Byte 2 0x14 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 2 Request the GPIB SCSI A to configure itself for local program mode Build SCSI Command Descriptor Block CDB Byte 0 0xCA Byte 1 0x00 Byte 2 0x00 Byte 3 0x01 Byte 4 0x00 Byte 5 0x00 SC...

Page 121: ...laces 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 Placing the GPIB SCSI A offline can be thought of as disconnecting its GPIB cable from the other GPIB devices Placing the GPIB SCSI A online allows the GPIB SCSI A to communicate over the GPIB and also r...

Page 122: ...B 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 Byte 0 0xCB Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 2 Request the GPIB SCSI A to come back online and reset certain operating characteristics back to their default conditions Build SCSI Command Descriptor Block CDB Byte 0 0xCB Byte 1 0x00 Byte 2...

Page 123: ...served 3 Reserved 4 Reserved 5 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 Address the GPIB SCSI A aborts the command issues a CHECK CONDITION status response and sets the Sense Key to ILLEG...

Page 124: ...to send TCT to the GPIB device with primary address 3 secondary address 0 Build SCSI Command Descriptor Block CDB Byte 0 0xCC Byte 1 0x18 Byte 2 0x04 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 2 Request the GPIB SCSI A to send TCT to the GPIB device with primary address 12 with no secondary address Build SCSI Command Descriptor Block CDB Byte 0 0xCA Byte 1 0x60 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 ...

Page 125: ...0 the GPIB SCSI A configures another device When the Me bit is 1 the GPIB SCSI A configures itself The following paragraphs apply when configuring another device Me bit is 0 In order for the specified device to properly accept the parallel poll configuration issued by the GPIB SCSI A that device must be configured to accept remote parallel poll configurations Thus the specified device must be usin...

Page 126: ...rol 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 If Mode is 0 and there is anything in the GPIB Secondary Address the GPIB SCSI A aborts the command issues a CHECK CONDITION status response and sets t...

Page 127: ...where 60 to 6F hex are Parallel Poll Enable PPE messages and 70 to 7E hex are Parallel Poll Disable PPD messages The GPIB SCSI A does not require GPIB controller capability in order to configure itself for parallel polls 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 config ist ppu rpp and Appendix ...

Page 128: ...ld SCSI Command Descriptor Block CDB Byte 0 0xCD Byte 1 0x08 Byte 2 0x00 Byte 3 0x00 Byte 4 0x70 Byte 5 0x00 3 Request the GPIB SCSI A to configure itself to respond on GPIB data line 1 when its individual status ist bit is cleared Build SCSI Command Descriptor Block CDB Byte 0 0xCD Byte 1 0x00 Byte 2 0x00 Byte 3 0x01 Byte 4 0x60 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSI...

Page 129: ...used only if you want to unconfigure all devices If you want to unconfigure only one device the ppc function should be used to send a parallel poll disable message to that device 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 Interface Clear IFC to make itself Controller In Charge...

Page 130: ... 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 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 131: ...o 1 Count is a 21 bit unsigned count that represents the number of bytes to read Therefore 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 ...

Page 132: ...tes the GPIB SCSI A records the number of data bytes it actually read from the GPIB If one of the events above occurs except if the GPIB SCSI A successfully reads all data the count may be less than expected If the GPIB SCSI A is CIC rd causes the GPIB SCSI A to address itself to listen if it is not already addressed The GPIB SCSI A also addresses the device indicated by the address values in the ...

Page 133: ...e 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 If Mode is 0 and there is anything in the GPIB Secondary Address the GPIB SCSI A will abort the command issue a CHECK CONDITION status response and set the Sense Key to ILLEGAL REQUEST The information transfer phases t...

Page 134: ... reconnection capability to read 1 350 bytes from the GPIB device at primary address 4 and no secondary address Build SCSI Command Descriptor Block CDB 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 ...

Page 135: ...xCF Byte 1 0x10 Byte 2 0x54 Byte 3 0x85 Byte 4 0xFC Byte 5 0x00 SCSIArbitrate SCSISelectATN GPIB SCSI A id SCSIMesgOut 0xc0 SCSICmd CDB While Not Done While SCSI phase Data In SCSIRead buffer 1 Increment buffer pointer If SCSI phase Message In SCSIMesgIn Mbyte 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 ente...

Page 136: ... Message In phases That is why Done is set in the Status phase condition Also the only phase that can normally follow the Status phase is the Message In phase If the Message In phase is not following a Status phase the GPIB SCSI A is notifying the Initiator that it is going to disconnect from the SCSI or after reconnection is sending the IDENTIFY message As long as the phase is the Data In phase t...

Page 137: ...s 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 responses within that time It remains Active Controller afterward The GPIB SCSI A returns the Parallel Poll Response PPR following the poll in the form of a 1 byte binary number during the Data In phase...

Page 138: ...e information transfer phases that the GPIB SCSI A drives the SCSI through after selection are the Command Data In Status and Message In phases 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 Byte 0 0xD0 Byte 1 0...

Page 139: ...Allocation Length 5 Reserved Remarks The Allocation Length indicates the number of bytes that the Initiator has allocated for returned sense data An Allocation Length of zero indicates that no data is transferred This condition should not be considered an error Any other value indicates the maximum number of bytes that are transferred up to 22 The GPIB SCSI A terminates the Data In phase when Allo...

Page 140: ...mat for the GPIB SCSI A Byte Value Description 0 70H Error class 7 code 0 1 0 Segment number 2 x Sense key describes error condition 3 6 0 Information 7 14 Additional Sense Length 8 x GPIB error indicator iberr as in that returned by stat 9 x SCSI error indicator scerr as in that returned by stat 10 11 x GPIB SCSI A status as in that returned by stat 12 17 0 Reserved 18 21 x Count of bytes transfe...

Page 141: ...eter in the Command Descriptor Block 9 Error Indicates that the GPIB SCSI A encountered some error on the last command You may use bytes 8 11 of the returned sense data to discover what problem occurred and what action to take 11 Aborted Command 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 SC...

Page 142: ... 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 Byte 2 0x00 Byte 3 0x00 Byte 4 0x10 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead databuffer 16 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 143: ...m Controller the GPIB SCSI A can send the Interface Clear IFC and Remote Enable REN messages to GPIB devices If some other Controller asserts Interface Clear the GPIB SCSI A cannot respond unless it is not configured as System Controller In most applications the GPIB SCSI A is System Controller In some applications the GPIB SCSI A is never System Controller In either case rsc is used only if the G...

Page 144: ...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 Example 2 contains the entire program sequence 1 Request the GPIB SCSI A to release System Control Build SCSI Command Descriptor Block CDB Byte 0 0xD1 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 ...

Page 145: ... 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 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 146: ... To indicate that GPIB Secondary Address contains a valid device address Mode is set to 1 rsp serial polls the specified device to obtain its status byte If bit 6 hex 40 or RQS bit of a device response is set its status response is positive that is the device is requesting service The interpretation of each device response other than the RQS bit is device specific For example the polled device mig...

Page 147: ...sed 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 If the 1 10 sec serial poll time limit is exceeded before the device responds the GPIB SCSI A aborts the command issues a CHECK CONDITION status response and sets the Sense Key to ERROR If Mode is 0 a...

Page 148: ...erial 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 Byte 0 0xD3 Byte 1 0x18 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead spresp 1 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 149: ...l polls it Format Bit 7 6 5 4 3 2 1 0 Byte 0 Opcode D4H 1 Reserved 2 Reserved 3 Serial Poll Response 4 Reserved 5 Reserved Remarks The Serial Poll Response represents the value of the new GPIB SCSI A serial poll response byte The serial poll response byte is the status byte that the GPIB SCSI A provides when serial polled by another device that is Controller In Charge CIC If bit 6 hex 40 or RQS bi...

Page 150: ...GPIB SCSI A to set its serial poll response byte to 6 and assert the GPIB SRQ signal Build SCSI Command Descriptor Block CDB Byte 0 0xD4 Byte 1 0x00 Byte 2 0x00 Byte 3 0x46 Byte 4 0x00 Byte 5 0x00 2 Request the GPIB SCSI A to clear its serial poll response byte and not assert SRQ Build SCSI Command Descriptor Block CDB Byte 0 0xD4 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArb...

Page 151: ...d 3 Reserved 4 Reserved 5 Reserved Remarks Interface Clear IFC is sent for 500 µsec The action of asserting the IFC line for at least 100 µsec initializes the 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...

Page 152: ...ion are the Command Status and 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 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 153: ...erved 2 Reserved 3 Reserved Mode 4 Reserved 5 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 A device enters the remote mode when the REN line is asserted an...

Page 154: ...Status and Message In phases See Also rsc cmd and loc Examples Note 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 turn off the REN signal on the GPIB Build SCSI Command Descriptor Block CDB Byte 0 0xD6 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte...

Page 155: ...rp sre 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 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 156: ...erved 3 Reserved Mode 4 Allocation Length 5 Reserved Remarks The Allocation Length indicates the number of bytes that the Initiator allocates for returned status information An Allocation Length of zero indicates that no bytes of status information are transferred Any other value indicates the maximum number of bytes that are transferred up to eight The GPIB SCSI A terminates the Data In phase whe...

Page 157: ... can exist at a time more than one bit may be set in status 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 If the status is positive no error condition exists GPIB error represents a single GPIB error condition present SCSI error represents a singl...

Page 158: ... Count of bytes transferred during a rd wrt brd bwrt or cmd Byte 6 Low byte of high word of Count of bytes transferred during a rd wrt brd bwrt or cmd 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 ...

Page 159: ... a brief description Table 5 6 GPIB SCSI A Status Conditions Numeric Value n Status Description Bit 32768 ERR Error detected 15 16384 TIMO Timeout 14 8192 END EOI or EOS detected 13 4096 SRQI SRQ detected while CIC 12 2048 Reserved 11 1024 Reserved 10 512 Reserved 9 256 CMPL Operation completed 8 128 LOK Lockout state 7 64 REM Remote state 6 32 CIC Controller In Charge 5 16 ATN Attention asserted ...

Page 160: ...state 0 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 Table 5 7 GPIB Error Conditions Numeric Value n Error Description 0 NGER No GPIB error condition to report 1 ECIC Command requires GPIB SCSI A to be CIC 2 ENOL Write detected no listeners 3 EADR GPIB SCSI A not addressed corre...

Page 161: ...BUS Could not send command bytes Table 5 8 SCSI Error Conditions Numeric Value n Error Description 0 NSER No SCSI error condition to report 1 5 Reserved 6 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 in status is set or cleared and the conditi...

Page 162: ... phases Mode indicates whether or not we want to enable or disable continuous status reporting When Mode is 1 the status information is sent to the Initiator after every command except for inq and rqsns The continuous status information is sent during the Message In phase as an extended message This message is sent just before the Status byte is sent The bytes of the extended message consist of th...

Page 163: ... 0 0xD7 Byte 1 0x00 Byte 2 0x00 Byte 3 0x00 Byte 4 0x08 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIRead statusinf 8 SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck 2 Configure the GPIB SCSI A for continuous status reporting Send the sic command then read the continuous status information returned after its execution Build SCSI Command Descriptor Block CDB for the stat command...

Page 164: ...tatusinf 8 SCSIStatus Sbyte SCSIMesgIn Mbyte Build SCSI Command Descriptor Block CDB for the sic command Byte 0 0xD5 Byte 1 0x00 Byte 2 0x00 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 ...

Page 165: ...ime limits prevent the GPIB SCSI A from hanging indefinitely when waiting for critical events to occur Format Bit 7 6 5 4 3 2 1 0 Byte 0 Opcode D8H 1 Reserved 2 Reserved 3 Mode 4 Reserved 5 Reserved Remarks The Mode specifies the I O time limits in effect for the cmd bwrt brd rd and wrt according to Table 5 9 Table 5 9 Timeout Limit Values Mnemonic Value Minimum Timeout TNONE 0 disabled T10µsec 1 ...

Page 166: ...mit Values continued Mnemonic Value Minimum Timeout T300 µsec 4 300 µsec T1 msec 5 1 msec T3 msec 6 3 msec T10 msec 7 10 msec T30 msec 8 30 msec T100 msec 9 100 msec T300 msec 10 300 msec T1 sec 11 1 sec T3 sec 12 3 sec T10 sec 13 10 sec T30 sec 14 30 sec T100 sec 15 100 sec T300 sec 16 300 sec T1000 sec 17 1000 sec ...

Page 167: ...unt of time the wait function waits when you call it with the TIMO bit set in the wait mask 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 The information transfe...

Page 168: ...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 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 169: ...long 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 1 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 Interface Clear IFC to make itself Co...

Page 170: ... GPIB SCSI A drives the SCSI through after selection are the Command Status and Message In phases Examples Note 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 send the Group Execute Trigger GET message to the GPIB device with primary address 2 secondary a...

Page 171: ...t 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 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelect GPIB SCSI A id SCSICmd CDB SCSIStatus Sbyte SCSIMesgIn Mbyte ErrorCheck ...

Page 172: ...ignments as the status word described in the stat function Each bit is set or cleared to wait or not to wait respectively for the corresponding event to occur The GPIB SCSI A supports the SCSI disconnection reconnection scheme with this command if the steps detailed in the section Disconnection Reconnection while Waiting for GPIB Events in Chapter 4 Programming in S Mode are followed After receivi...

Page 173: ...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 Table 5 10 lists possible Wait Mask Values Table 5 10 Wait Mask Values Decimal Hex Value Mnemonic Description Value Bit Reserved 15 1...

Page 174: ...r state 2 1 1 DCAS Device clear state 1 0 If mask is 0 the function completes immediately after updating the status If the TIMO bit is 0 or the time limit is disabled by using tmo with 0 as Mode timeouts for this function are disabled You should disable timeouts only when you are certain the selected event will occur Otherwise the GPIB SCSI A waits indefinitely for the event to occur If any bits l...

Page 175: ... Reconnection 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 Byte 1 0x00 Byte 2 0x0C Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISe...

Page 176: ...aled Build SCSI Command Descriptor Block CDB Byte 0 0xDA Byte 1 0x60 Byte 2 0x00 Byte 3 0x00 Byte 4 0x00 Byte 5 0x00 SCSIArbitrate SCSISelectATN GPIB SCSI A id SCSIMesgOut 0xc0 SCSICmd CDB If SCSI phase Message In SCSIMesgIn Mbyte 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 se...

Page 177: ...data To indicate that GPIB Secondary Address contains a valid device address set Mode to 1 Count is a 21 bit unsigned count that represents the number of bytes to write Therefore Count can represent a number between 0 and 2 097 152 All data received from the SCSI Initiator during the Data Out phase is passed to the GPIB Listeners If an error occurs with the GPIB the GPIB SCSI A stops attempting to...

Page 178: ...B 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 The GPIB SCSI A then places itself in Standby Controller state with ATN off and remains there after the write operation is complete The GPIB SCSI A must be CIC to perform the addressing If this is the firs...

Page 179: ...SCSI A aborts the command 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 Address the GPIB SCSI A aborts the command issues a CHECK CONDITION status response and sets the Sense Key to ILLEGAL REQUEST The information transfer phases that the GPIB SCSI A drives the SCSI through after selection are the Command Data Out ...

Page 180: ... reconnection capability to write 50 bytes of data to the GPIB device at primary address 9 and secondary address 1 Build SCSI Command Descriptor Block CDB 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 ...

Page 181: ... 0 0xDB Byte 1 0x10 Byte 2 0x00 Byte 3 0x05 Byte 4 0xDC Byte 5 0x00 SCSIArbitrate SCSISelectATN GPIB SCSI A id SCSIMesgOut 0xc0 SCSICmd CDB While Not Done While SCSI phase Data Out SCSIWrite buffer 1 Increment buffer pointer If SCSI phase Message In SCSIMesgIn Mbyte If Mbyte SAVE DATA POINTER Set up necessary conditions and wait to be reconnected by the GPIB SCSI A Upon reconnection the GPIB SCSI ...

Page 182: ...n phases that is why Done is set in the Status phase condition Also the only phase that can normally follow the Status phase is the Message In phase If the phase is Message In not following a Status phase the GPIB SCSI A is either notifying the Initiator that it is going to disconnect from the SCSI or after reconnection is sending the IDENTIFY message As long as the phase is the Data Out phase the...

Page 183: ...For basic information about the SCSI refer to Appendix D Operation of the SCSI Programming Messages You program the GPIB SCSI A by sending it programming messages which are ASCII strings by way of its GPIB port Programming Message Format The programming message format consists of a function name one or more arguments which may or may not be optional followed by a carriage return CR a linefeed LF o...

Page 184: ...nd and Status Channel printf gpibscsia not found n ExitToShell rdbuf calloc 200 1 wrtbuf calloc 15 1 Allocate memory for the buffers This call also clears the memory to nulls if rdbuf NULL wrtbuf NULL Make sure that the buffers were allocated printf Out of memory n ExitToShell strcpy wrtbuf id n Assign a programming message to the string buffer The n will put an LF at the end of the command ibwrt ...

Page 185: ...ing messages to the GPIB SCSI A in any combination of uppercase and lowercase letters How Messages are Processed The GPIB SCSI A processes each programming message separately on a line by line basis The GPIB SCSI A buffers the entire message interprets the function name and arguments then executes the message Function Names The function names have been selected to indicate the purpose of each func...

Page 186: ...hexadecimal base 16 To indicate one of these bases you must attach one of the following prefixes to the number decimal To indicate decimal numbers just enter the number without a prefix binary To indicate a binary number precede the number with a b or B prefix For example b11011001 represents the byte value of D9 hex or 217 decimal octal To indicate an octal number precede the number with a q or Q...

Page 187: ...ag 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 For more information about G mode error indications refer to the description of stat in Chapter 7 G Mode Functions as well as Appendix B Status and Message Information Communicating with the GPIB SCSI A and SCSI Peripherals The GPIB SCSI A uses two channe...

Page 188: ...ithout examining the data Because the GPIB SCSI A can communicate with any SCSI device in the SCSI system of which the GPIB SCSI A is a part one of the first requirements is that you indicate to the GPIB SCSI A the SCSI ID of the Target device with which you want to communicate by using tid After using tid any other request made to the GPIB SCSI A that causes communication with the SCSI system is ...

Page 189: ...ront panel is lit when the GPIB SCSI A is addressed to listen The GPIB SCSI A and SCSI System as Talker When the GPIB SCSI A receives the Command and Status Channel talk address it sends out status information that has been buffered This can be either the SCSI Status phase and Message In phase information or if you have enabled status reporting with the stat command the internal status of the GPIB...

Page 190: ...forms the following 1 The GPIB SCSI A automatically handles the arbitration for the SCSI bus the selection of the disk drive at Target ID 4 and waits for the Data Channel to become talk addressed by the GPIB Controller before passing data from the disk drive to the GPIB 2 When all of the data has been sent the GPIB SCSI A automatically handles the final Status and Message In phases that the disk d...

Page 191: ...when it detects the EOS character Either a 7 bit ASCII character or a full 8 bit binary byte can be used You can use the two methods individually or in combination It is important that the Listener be configured to detect the end of a transmission When the GPIB SCSI A receives the Command and Status Channel talk or listen address no EOS modes are in effect When talking the GPIB SCSI A asserts EOI ...

Page 192: ...ration Any other message sent during a G mode operation must be specified within a low level command sequence using the msgout command which is detailed in Chapter 7 G Mode Functions Messages coming from the Target to the GPIB SCSI A are buffered into the buffer of the Command and Status Channel The only time the GPIB SCSI A automatically receives Message bytes from the Target is during disconnect...

Page 193: ...connection is not possible 2 The Command phase 3 The Status phase Disconnection reconnection is possible before this phase occurs 4 The Message In phase Commands That Require a Data In Phase If the command requires a Data In phase the Target completes the following phase sequence after Selection 1 The Message Out phase if the Target responds to the SCSI ATN signal The message that the GPIB SCSI A ...

Page 194: ...Out phase The Target may disconnect reconnect 4 The Status phase 5 The Message In phase Disconnection Reconnection The Target can disconnect from the SCSI bus between the Command and Status phases to complete a time consuming task When finished the Target reconnects However this is only possible if the GPIB SCSI A is able to send the IDENTIFY message to the Target during the Message Out phase If t...

Page 195: ...mand to configure the GPIB SCSI A to assert SRQ under certain conditions Refer to srqen in Chapter 7 G Mode Functions for an explanation of these conditions G Mode Functions The GPIB SCSI A G mode functions are divided into four groups SCSI functions SCSI Configuration functions GPIB Configuration functions and General Use functions The following G mode function tables contain the programming mess...

Page 196: ...y 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 getscsi Perform the low level command to arbitrate for the SCSI bus hcmd Issue a high level command to the specified Target using the comm...

Page 197: ...the selected Target during the Message Out phase 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 rdbuf Issue the high level READ BUFFER command to the specified Target rdcap Issue the high level READ CAPACITY com...

Page 198: ...ted by RESERVE UNIT 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 rst Asserts the SCSI RST line for approximately 100 µsec The assertion of this line for 25 µsec should indicate a valid reset condition selwa Select the Target specified by the tid command with...

Page 199: ...pecified Target tstur Issue the high level TEST UNIT READY command to the specified Target wfmks Issue the high level WRITE FILEMARKS command to the specified Target wrext 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 ...

Page 200: ...e Target This value is used internally to give the GPIB SCSI A some knowledge of data amounts lun Select the Logical Unit Number that will be placed in the high level calls Command Descriptor Block pad 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 tid Specify a SCSI Tar...

Page 201: ...IB Configuration Function Function Description srqen Set conditions for asserting SRQ General Use Function Group Table 6 4 lists the General Use functions along with a short description of each Table 6 4 General Use Functions Function Description config Read or change GPIB SCSI A configuration id Identify the GPIB SCSI A stat Select the type of status reporting desired from the GPIB SCSI A or requ...

Page 202: ...ck Size of the Target that will be used internally to the GPIB SCSI A during data transfers cmd Create a Command Descriptor Block containing command bytes specified following cmd cmp Performs the low level operation to finish the SCSI command by getting the Status and Message In bytes from the SCSI device config Read or change GPIB SCSI A configuration dtin Low level command to set up the GPIB SCS...

Page 203: ... Logical Unit Number that will be placed in the high level calls Command Descriptor Block mdsct Issue the high level MODE SELECT command to the specified Target mdsns 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 ...

Page 204: ...nected Target rdbuf Issue the high level READ BUFFER command to the specified Target rdcap Issue the high level READ CAPACITY command to the specified Target rdext Issue high level Group 1 READ EXTENDED command to the specified Target rdfct Issue the high level READ DEFECT command to the specified Target read Issue the high level Group 0 READ command to the specified Target rewind Issue the high l...

Page 205: ...ion of this line for 25 µsec should indicate a valid reset condition selwa Select the Target specified by the tid command with SCSI ATN line asserted selwo Select the Target specified by the tid command without the SCSI ATN line asserted sndia Issue the high level SEND DIAGNOSTIC command to the specified Target space Issue the high level SPACE command to the specified Target srqen Set conditions f...

Page 206: ... high level WRITE FILEMARKS command to the specified Target wrext 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 Operation of the GPIB SCSI A as a GPIB Device In G Mode a GPIB SCSI A device operates like other GPIB devices As...

Page 207: ...ata Out Data In Command Status Message Out Message In Figure 6 1 Serial Poll Status Byte SCSI Bits BSY MSG C D and I O are SCSI signal indicators MSG C D and I O indicate the current information transfer phase for the SCSI bus BSY indicates that the SCSI bus is currently in use MSG C D and I O are valid only if BSY is active For more information on the purpose of these SCSI signals refer to Append...

Page 208: ...ase sequence described in the section titled Handling of SCSI Phases in G Mode discussed earlier in this chapter Anytime you are relying on DCR to proceed with your application you should also monitor 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 t...

Page 209: ...SI 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 Device Clear A device clear occurs when the GPIB SCSI A receives the universal Device Clear DCL command or when it receives its listen address and the Selected Device Clear SDC command If a G mode function is currently executing it is aborted The Comma...

Page 210: ...o distinguish it from other functions These characters are shown in boldface in the syntax portion of the function descriptions Functions listed as low level give you the ability to work with most any 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 ...

Page 211: ...need a review of what you know see Appendix D Operation of the SCSI Points to Remember in the Function Examples Consider the following points when reading through the G mode function examples The program examples are written in THINK C using the NI 488 functions The following NI 488 function call automatically sends to the GPIB SCSI A its Command and Status Channel talk address and the programming...

Page 212: ...SI A and receive status and other information scsidev represents the Data Channel on the GPIB SCSI A and must be used when communicating with a SCSI device attached to the SCSI port on the GPIB SCSI A Variables ending in buf refer to character buffers created with the calloc memory allocation function Assume that the size of the buffer is sufficient to process the example G Mode Function Descripti...

Page 213: ... automatic testing is done 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 The Test Unit Ready command is issued in the s...

Page 214: ...ing into the Command and Status Channel buffer followed by a CR LF If the autotst function is currently disabled a CR LF alone is placed into the buffer If more than one Target id is configured for automatic testing they are separated by commas target ids represents a list of one or more 3 bit unsigned numbers Correct values range from 0 to 7 If a number is entered that is too large or if more tha...

Page 215: ...s 2 and 3 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 Print the information status is ERR CMPL BSFR CR LF NGER CR LF TST3 CR LF An error occurred on the Test Unit Ready that was issued to SCSI Target id 3 ...

Page 216: ...and multiplies this by the number assigned with blksz 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 If you enter blksz the GPIB SCSI A places the current value of blksz into the Command and Status Channel buffer followed by a CR LF value represents a 16 bit unsigned number Correct values ran...

Page 217: ...orp blksz 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 Set the blocksize to 532 ...

Page 218: ... Descriptor Block The command byte s go into the Command Descriptor Block in the order that you enter them that is if you enter h3 as the first command byte the first byte in the Command Descriptor Block will be a 3 You must enter at least one command byte Any more are optional The maximum number of command bytes that can be entered are 25 This limit does not impose problems as the SCSI specificat...

Page 219: ...s the operation with an error indication of EARG See Also Appendix D Operation of the SCSI Example ibwrt gpibscsia getscsi n 8 Arbitrate for the SCSI ibwrt gpibscsia tid 3 n 6 Indicate that you want to communicate with the SCSI device with SCSI id 3 ibwrt gpibscsia selwo n 6 Select the device at SCSI ID 3 without SCSI ATN signal ibwrt gpibscsia cmd h1b h0 h0 h0 h0 h0 n 34 Create and send to the se...

Page 220: ...uffer of the Command and Status Channel There is no marker placed after these information bytes to indicate which of these bytes are valid status and message bytes and 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 Therefore the one sure method of analyzing this data if necessar...

Page 221: ... with an EPHS indication See Also Appendix D Operation of the SCSI Example This example continues with the example started previously in cmd 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 ibwrt gpibscsia cmp n 4 Because the Start Stop Unit command does not transfer any data you can now g...

Page 222: ...s that allow you to change some of the configuration parameters of the GPIB SCSI A The valid bits of mask are shown in Figure 7 1 Bits marked as Reserved are reserved for future use and must be zero Bit 7 6 5 4 3 2 1 0 Reserved BufMode Rsvd NoDisc Reserved Figure 7 1 Valid Bits of mask Use the NoDisc bit of mask in order to disable the disconnection reconnection feature during high level commands ...

Page 223: ... Use the Straight Through Buffering method 1 Use the Single Buffering method 2 Use the Double Buffering method 3 Use the size parameter to change the size of the internal buffer used by the GPIB SCSI A hcmd rdext read wrext and write use this buffer when Single or Double Buffering is enabled The actual buffer size is set to the lower of the size parameter and the amount of DRAM available for use I...

Page 224: ...rror indication See Also Buffering Methods in Chapter 3 Technical Information Example ibwrt gpibscsia config h20 307200 n 21 Configure the GPIB SCSI A to use Single buffering and a buffer size of 300K ibwrt gpibscsia config n 8 Ask for the current configuration ibrd gpibscsia infobuf 20 Get the response from the GPIB SCSI A printf response s infobuf Display the data response 32 229376 CR LF Single...

Page 225: ...ause this command is used to transfer SCSI data which is usually grouped in blocks to the GPIB which does not group data in blocks the 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 This sto...

Page 226: ...nstruct the GPIB SCSI A to report numerical status continuously ibwrt gpibscsia tid 6 n 6 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 the SCSI disk drive or by executing the SCSI MODE SENSE command either through a ...

Page 227: ...tine to convert the character strings representing numerical values to binary data if ibstat 0 The status would be negative if any error occurred with the GPIB or SCSI ports processerr ibstat If error go and process it else ibwrt gpibscsia selwo n 6 Continue with the operation After each step check the status as you did after getscsi above Because this does not show anything new it is not done fur...

Page 228: ...r 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 state wt_rdy Wait for the GPIB SCSI A to request service State then contains a value of either DCR which indicates that the Target is in the Data In phase or RDY which indicates that the Target due...

Page 229: ... to process the Status and Message In phases else state RDY ibwrt gpibscsia cmp n 4 Because you have a box ready indication from the GPIB SCSI A the Target went into the Status phase instead of a Data In phase The call to cmp allows the GPIB SCSI A to process the Status and Message In phases unexpected_abort Because there was no data transferred some sort of error occurred Perform desired type of ...

Page 230: ...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 At this time the GPIB SCSI A transfers the pad byte specified by pad until the selected SCSI device changes from the Data Out phase If the Target enters the Status phase before entering the Data Out phase dtout aborts the operation with an error ...

Page 231: ... 9 Instruct the GPIB SCSI A to report numerical status continuously ibwrt gpibscsia tid 5 n 6 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 the SCSI disk drive or by executing the SCSI MODE SENSE command either thr...

Page 232: ...rt 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 if ibstat 0 The status would be negative if any form of error occurred with the GPIB or SCSI ports processerr ibstat If error ...

Page 233: ...and Descriptor Block to execute the Group 0 WRITE command Verify that the Target you select is in the Command Phase before you issue this command by analyzing the status returned by the 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 state wt...

Page 234: ...arget 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 Because you have a box ready indication from the GPIB SCSI A the Target went into the Status phase instead of a Data Out phase The call to cmp allows the GPIB SCSI A to process the Status and Message In phases unexpected_abort Because there was no dat...

Page 235: ... Interleave Most Significant Byte 4 Interleave Lease Significant Byte 5 VCB 00 The Vendor Unique Byte and Interleave values in the Command Descriptor block above are given as parameters to the format command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command The interleave field requests that the logical blocks on...

Page 236: ...and Descriptor Block as well as the SCSI phases that the device creates vendor unique byte represents an 8 bit unsigned number Correct values range from 0 to 255 interleave is a 16 bit unsigned number Correct values range from 0 to 65 535 If a number that is too large is entered for either value there are no numbers or there is a syntax error in a number the GPIB SCSI A aborts the command with an ...

Page 237: ...d 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 If the SCSI bus is currently being used by another Initiator this command aborts with an EARB error indication If there is anything following getscsi the command aborts and returns an EARG indication If this command completes and there is no...

Page 238: ...phase If a Data In phase is required the command bytes should be followed by i count If a Data Out phase is required the command bytes should be followed by o count count represents a 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 Dat...

Page 239: ...scriptor Block lengths greater than 12 bytes If you use more than 25 command bytes you do not use at least one command byte or the value of count is invalid hcmd aborts the operation with an error indication of EARG See Also pad and 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 ...

Page 240: ...5 n 6 Request the GPIB SCSI A that you want to communicate with the SCSI Target with an ID of 5 ibwrt gpibscsia hcmd hdd 0 0 0 1 1 i 257 n 33 Tell the GPIB SCSI A that you want to read 257 bytes of data from the S mode GPIB SCSI A at ID 5 Issue an S mode brd command with a count of 257 Specify i 257 so that the G mode GPIB SCSI A expects to transfer 257 bytes during the Data In phase ibrd scsidev ...

Page 241: ...d 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 Ask for GPIB SCSI A system identification ibrd gpibscsia idbuf 75 Get the system identification printf response s idbuf Displ...

Page 242: ...ength 5 VCB 00 The Allocation Length in the Command Descriptor block above is given as a parameter to the inquiry command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command The Allocation Length is the number of bytes that the Initiator has allocated for returned Inquiry data An Allocation Length of 0 indicates th...

Page 243: ...ach byte of the Command Descriptor Block the SCSI phases that the device creates and the format and meaning of the returned Inquiry data allocation length represents an 8 bit unsigned number 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 ...

Page 244: ... more information on the Logical Unit Number or the command descriptor blocks refer to Appendix D Operation of the SCSI The default value for lun is 0 If you enter lun the GPIB SCSI A places the current value of lun into the Command and Status Channel buffer followed by a CR LF value represents a 3 bit unsigned number Correct values range from 0 to 7 If a number that is too large is entered or if ...

Page 245: ... Corp lun 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 Set the lun value to 3 ...

Page 246: ...mmand Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 15 1 LUN 00 2 00 3 00 4 Parameter List Length 5 VCB 00 The Parameter List Length in the Command Descriptor Block above is given as a parameter to the mdsct command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command The Parameter List Length is the number of bytes t...

Page 247: ...mand Descriptor Block the SCSI phases that the device creates and the format and meaning of the parameter list data Allocation Length represents an 8 bit unsigned number 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 Example ibwrt ...

Page 248: ...Length 5 VCB 00 The Allocation Length in the Command Descriptor block above is given as a parameter to the mdsns command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command The Allocation Length is the number of bytes that the Initiator has allocated for returned mdsns data An Allocation Length of 0 indicates that ...

Page 249: ...byte of the Command Descriptor Block the SCSI phases that the device creates and the format and meaning of the returned MODE SENSE data allocation length represents an 8 bit unsigned number 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 ...

Page 250: ... bytes received into 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 Therefore the one sure method of analyzing this data if nec...

Page 251: ...ter 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 If there were not 258 bytes in the buffer END would have been asserted on the last transfer ...

Page 252: ...se More than one message byte can be sent during one of these phases message byte s indicates the bytes to be sent as message bytes The message bytes are sent in the order that you enter them in the command that is if you enter h3 as the first message byte the first byte sent is a 3 You must enter at least one message byte Any more are optional The maximum number of message bytes that can be enter...

Page 253: ...mation and Appendix D Operation of the SCSI Example ibwrt gpibscsia msgout hC0 n 12 Send the Identify message byte to the SCSI device to establish the physical path 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 ...

Page 254: ...some sort of error the GPIB SCSI A sends the remainder of the transfer length to the SCSI device but the data consists of the byte specified by value All data received prior to END or an error is properly transferred to the SCSI The default value for this command is NULL or 0 If you enter pad the GPIB SCSI A places the current value of pad into the Command and Status Channel buffer followed by a C...

Page 255: ...mples 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 2 ibwrt gpibscsia pad 13 n 7 Set the pad byte to ASCII 13 the carriage return character ...

Page 256: ...e LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command During the Data Out phase the Initiator transfers a defect list that contains the logical block addresses to be reassigned The Target reassigns the physical medium used for each logical block address in the list During the execution of this command if the GPIB SCSI ...

Page 257: ...scriptor 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 Tell the GPIB SCSI A to complete a SCSI REASSIGN BLOCKS command ibwrt scsidev 000 000 000 001 000 000 000 001 8 Send the defect list to the SCSI device over the Data Channel ...

Page 258: ...n the creation of the Command Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 1C 1 LUN 00 2 00 3 Allocation Length Most Significant Byte 4 Allocation Length Least Significant Byte 5 VCB 00 The Allocation Length in the Command Descriptor block above is given as a parameter to the rcdia command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assi...

Page 259: ...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 Refer to your SCSI device documentation for the expected values in each byte of the Command Descriptor Block the SCSI phases that the device creates and the format and meaning of the returned diagnostic data allocation length rep...

Page 260: ... Manual rcdia continued Example ibwrt gpibscsia rcdia 100 n 10 Tell the GPIB SCSI A to complete a SCSI RECEIVE DIAGNOSTIC RESULTS command The allocation length is 100 bytes ibrd scsidev rcdbuf 100 Get the data coming from the Data Channel processrcd rcdbuf Process the buffer ...

Page 261: ...sued a command has disconnected After this command has been given to the GPIB SCSI A you are not able to communicate with the GPIB SCSI A until the SCSI Target has reconnected because the GPIB SCSI A goes into a state waiting for the reconnection This command automatically processes the Message In phase that normally follows a reconnection Any message bytes that are received after the reconnection...

Page 262: ...stat c n n 9 Request the GPIB SCSI A to report numerical status continuously ibwrt gpibscsia tid 5 n 6 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 the SCSI disk drive or by executing the SCSI MODE SENSE command eith...

Page 263: ...connect the character strings representing numerical values to binary data if ibstat 0 The status would be negative if any form of error occurred with the GPIB or SCSI ports processerr ibstat If error go and process it else ibwrt gpibscsia selwa n 6 Continue with the operation At each step in the process check the status as you did after getscsi above Because this does not show anything new it is ...

Page 264: ...ence ibwrt gpibscsia cmd ha h0 h0 h0 h1 h0 n 33 Build the SCSI Command Descriptor Block to execute the Group 0 WRITE command Verify 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 The ...

Page 265: ...ion 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 this command verify that the Target is now in the Data Out phase by analyzing the status returned by the GPIB SCSI A ibwrt scsidev Data to be stored 18 This line puts the data in quotes to the Data Channel With the last byte sent the NI function call...

Page 266: ...GPIB SCSI A User Manual rcnct continued ibwrt gpibscsia cmp n 4 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 ...

Page 267: ...are used in the creation of the Command Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 3C 1 LUN 02 2 Buffer Id 3 Buffer Offset Most Significant Byte 4 Buffer Offset Middle Significant Byte 5 Buffer Offset Least Significant Byte 6 Allocation Length Most Significant Byte 7 Allocation Length Middle Significant Byte 8 Allocation Length Least Significant Byte 9 VCB 00 The Buffer Id Buffer Offset and Alloc...

Page 268: ...ave 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 Refer to the documentation of your SCSI device to see what values are expected in each byte of the Command Descriptor Bl...

Page 269: ... 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 ibrd scsidev rdbbuf 500 Get the data from the Data Channel processrdb rdbbuf Process the buffer ...

Page 270: ...I 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 Bit 7 6 5 4 3 2 1 0 Byte 0 25 1 LUN 00 2 00 3 00 4 00 5 00 6 00 7 00 8 00 9 VCB 00 The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command ...

Page 271: ...logical block address and block length in bytes of the last logical block of the specified logical unit Refer to your SCSI device documentation for the expected values in each byte of the Command Descriptor Block the SCSI phases that the device creates and the format and meaning of the returned READ CAPACITY data If there is anything following the rdcap command the GPIB SCSI A aborts the operation...

Page 272: ...in the creation of the Command Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 28 1 LUN 00 2 Logical Block Address Most Significant Byte 3 Logical Block Address Up Middle Significant Byte 4 Logical Block Address Low Middle Significant Byte 5 Logical Block Address Least Significant Byte 6 00 7 Transfer Length Most Significant Byte 8 Transfer Length Least Significant Byte 9 VCB 00 The Logical Block Addr...

Page 273: ...to your SCSI device documentation for expected values in each byte of the Command Descriptor Block and the SCSI phases that the device creates during the execution of this command If you enter rdext the GPIB SCSI A places the most recent values for Logical Block Address and Transfer Length into the buffer of the Command and Status Channel followed by a CR LF logical block address represents a 32 b...

Page 274: ...ommunicate with SCSI Target with id of 4 ibwrt gpibscsia blksz 512 n 10 Tell the GPIB SCSI A that the drive has a blocksize of 512 bytes This information can be found either in the documentation of the SCSI disk drive or by executing the SCSI MODE SENSE command either through a low level command sequence or with the high level mdsns command provided by the GPIB SCSI A ibwrt gpibscsia rdext 5000 8 ...

Page 275: ...G Mode Functions Chapter 7 GPIB SCSI A User Manual 7 66 National Instruments Corp rdext continues ibrd scsidev databuf 4096 Read the data from the SCSI device through the Data Channel ...

Page 276: ...arget to process rdfct Notice how the parameters to the rdfct command are used in the creation of the Command Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 37 1 LUN 00 2 Configure Byte 3 00 4 00 5 00 6 00 7 Allocation Length Most Significant Byte 8 Allocation Length Least Significant Byte 9 VCB 00 The Configure Byte and Allocation Length in the Command Descriptor block above are given as parameters ...

Page 277: ...e 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 Refer to your SCSI device documentation for the expected values in each byte of the Command Descriptor Block the...

Page 278: ...bwrt 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 The allocation length is 500 bytes ibrd scsidev rdfbuf 500 Get the data from the Data Channel processdfct rdfbuf Process the buffer ...

Page 279: ...Bit 7 6 5 4 3 2 1 0 Byte 0 08 1 LUN Logical Block Upper 5 bits 2 Logical Block Address Middle Significant Byte 3 Logical Block Address Least Significant Byte 4 Transfer Length 5 VCB 00 The Logical Block Address and Transfer Length in the Command Descriptor block above are given as parameters to the read command The LUN corresponds to the last value assigned with the lun command The VCB corresponds...

Page 280: ...r Block and the 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 logical block address represents a 21 bit unsigned number Correct values range from 0 to 2 097 152 transfer length represents an 8 bit uns...

Page 281: ...wrt gpibscsia blksz 512 n 10 Tell the GPIB SCSI A that the drive has a blocksize of 512 bytes This information can be found either in the documentation of the SCSI disk drive or by executing the SCSI MODE SENSE command either through a low level command sequence or with the high level mdsns command provided by the GPIB SCSI A ibwrt gpibscsia read 100 10 n 13 Request the GPIB SCSI A to read data fr...

Page 282: ...Chapter 7 G Mode Functions National Instruments Corp 7 73 GPIB SCSI A User Manual read continued ibrd scsidev databuf 5120 Read the data from the SCSI device through Data Channel ...

Page 283: ...value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command 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 Refer to your SCSI device docume...

Page 284: ...Chapter 7 G Mode Functions National Instruments Corp 7 75 GPIB SCSI A User Manual rewind continued Example ibwrt gpibscsia rewind n 7 Tell the GPIB SCSI A to complete a SCSI REWIND command ...

Page 285: ...value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command 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 Refer to your SCSI device docume...

Page 286: ... 7 77 GPIB SCSI A User Manual rlseu 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: ...Length 5 VCB 00 The Allocation Length in the Command Descriptor Block above is given as a parameter to the rqsns command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command The Allocation Length is the number of bytes that the Initiator has allocated for returned rqsns data An Allocation Length of 0 indicates that ...

Page 288: ...d Descriptor Block as well as the SCSI phases the device creates and the format and meaning of the returned sense data allocation length represents an 8 bit unsigned number 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 Operat...

Page 289: ...UN 00 2 00 3 00 4 00 5 VCB 00 The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command 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 Ch...

Page 290: ... 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 This causes the Target to reserve the entire logical unit for the exclusive use of the GPIB SCSI A ...

Page 291: ...emarks 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 If there is anything following rst the command aborts and returns an EARG indication See Also Appendix D Operation of the SCSI Example ibwrt gpibscsia rst n 6 The GPIB SCSI A asserts the SCSI RST signal for ...

Page 292: ... 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 If the Target cannot respond to the ATN signal that is the Target does not support the Message Out phase the Target ignores the ATN sig...

Page 293: ...the command and returns the ESEL error indication If there is anything following selwa the command aborts and returns an EARG indication If this command completes and there is no error indicated you can proceed with the low level command sequence as the GPIB SCSI A now has selected the proper Target See Also selwo and Appendix D Operation of the SCSI Example ibwrt gpibscsia selwa n 6 Select a desi...

Page 294: ...tion phase for the SCSI bus Because the GPIB SCSI A does not assert the ATN line when selecting a Target the Initiator indicates that it has no message to send to the Target 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 an...

Page 295: ... Bit 7 6 5 4 3 2 1 0 Byte 0 1D 1 LUN 04 or 00 2 00 3 00 or Parameter List Length Most Significant Byte 4 00 or Parameter List Length Least Significant Byte 5 VCB 00 The values in the above Command Descriptor Block that are in brackets are optional and are placed into the Command Descriptor Block only if the value parameter is zero The LUN corresponds to the last value assigned with the lun command...

Page 296: ...ication 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 See Also rcdia Examples 1 ibwrt gpibscsia sndia 1 n 8 Tell the GPIB SCSI A to complete a SCSI SEND DIAGNOSTIC command This causes the Target to perform its self ...

Page 297: ... 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 ibwrt scsidev 001 1 Send out the parameter list to the Target This is device specific The byte in the above statement is arbitrary and is included for example purposes only ...

Page 298: ...t Middle Significant Byte 4 Count Least Significant Byte 5 VCB 00 The Count and Code in the Command Descriptor Block are given as parameters to the space command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command During the execution of this command if the GPIB SCSI A encounters a phase which it does not expect an...

Page 299: ...re 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 Examples 1 ibwrt gpibscsia space 1 10 n 12 Tell the GPIB SCSI A to complete a SCSI SPACE command The rest of the command further defines that the Target should space forward 10 file marks 2 ibwrt gpibscsia space 0 20 n 13 Tell the GPIB SCSI A to complete a SCSI S...

Page 300: ...SCSI A asserts SRQ under the conditions represented by each bit in the mask The SRQ mask bits are listed in Table 7 2 Table 7 2 SRQ Mask Bits Hex Decimal Bit Value Value Mnemonic Description 0 1 1 Not used 1 2 2 Not used 2 4 4 Not used 3 8 8 DCR Indicates that the data channel is ready to transfer data to or from the SCSI Essentially this bit indicates whether or not the selected SCSI Target has e...

Page 301: ... on which you want SRQ to be asserted The default mask for srqen is zero that is SRQ never asserts If you enter srqen the GPIB SCSI A places the current value of srqen into the Command and Status Channel buffer followed by a 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 assig...

Page 302: ...pibscsia 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 Indicate that you want a mask of hex 80 which allows the GPIB SCSI A to assert SRQ when any error occurs ...

Page 303: ...s that the status information is returned as numeric strings s indicates that the status information is returned in symbolic format that is as mnemonic strings b indicates that the status information is returned as four bytes of binary data c indicates that the status is returned after each programming message eliminating the need to call stat repetitively Normally you use s the symbolic format on...

Page 304: ...tus 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 error Consequently when status is negative an error condition exists When status is positive no error condition exists GPIB error represents a single GPIB error condition present SCSI error represents a single SCSI error condition present Table 7 3 contains a list of the G...

Page 305: ...us Conditions continued Numeric Value n Status Description Bit 512 Reserved 9 256 CMPL Operation completed 8 128 MGIN Message In phase 7 64 MOUT Message Out phase 6 32 BSFR Bus Free phase BSY not asserted 5 16 SLCT Selection phase 4 8 STAT Status phase 3 4 COMD Command phase 2 2 DTIN Data In phase 1 1 DOUT Data Out phase 0 ...

Page 306: ...itions along with their numeric value and a short description of each Table 7 4 GPIB Error Conditions Numeric Symbolic Value n Value s Description 0 NGER No GPIB error condition to report 1 Reserved 2 ENOL Write detected no listeners 3 Reserved 4 EARG Invalid argument or arguments 5 Reserved 6 Reserved 7 16 Reserved 17 ECMD Unrecognized command ...

Page 307: ...Reserved 4 EPHS SCSI Phase mismatch occurred 5 ECER Catastrophic Error Condition Caused by the SCSI Target releasing the SCSI BSY signal without first notifying the GPIB SCSI A of its intention to disconnect 6 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 Error detected on a Test Unit Rea...

Page 308: ...ys returned first followed by the symbolic status followed by the binary status If you call stat without an argument continuous status reporting is disabled See Also rqsns and Appendix B Status and Message Information Examples 1 ibwrt gpibscsia stat n n 7 Request the GPIB SCSI A to send us numeric status ibrd gpibscsia stbuf 100 Read the status back into a buffer until you receive END from the GPI...

Page 309: ...ic status You are also enabling continuous reporting ibrd gpibscsia stbuf 100 Read status information printf status is s stbuf Print the information 3 ibwrt gpibscsia stat c s n 9 Request GPIB SCSI A to send symbolic status You are also enabling continuous reporting ibrd gpibscsia stbuf 100 Read status information until END printf status is s stbuf Print the information status is CMPL BSFR CR LF N...

Page 310: ...mmands 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 The default value for tid is 2 If you enter tid the GPIB SCSI A places the current value of tid into the Command and Status Channel buffer followed by a CR LF value represents a 3 bit unsigned number...

Page 311: ...truments Corp tid 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 2 ibwrt gpibscsia tid 3 n 6 Set the tid value to 3 ...

Page 312: ... last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command 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 Refer to your SCSI device ...

Page 313: ...04 National Instruments Corp 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: ...device expects some value in the two bits in the Control Byte of the command descriptor block of each command For more information on the Control Byte or the command descriptor blocks refer to Appendix D Operation of the SCSI The default value for vcb is 0 If you enter vcb the GPIB SCSI A places the current value of vcb into the Command and Status Channel buffer followed by a CR LF value represent...

Page 315: ...ruments Corp vcb 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 Set the vcb value to 3 ...

Page 316: ...nt Byte 3 Number of Filemarks Middle Significant Byte 4 Number of Filemarks Least Significant Byte 5 VCB 00 The Number of Filemarks in the above Command Descriptor Block is given as a parameter to the wfmks command The LUN corresponds to the last value assigned with the lun command The VCB corresponds to the last value assigned with the vcb command During the execution of this command if the GPIB ...

Page 317: ...command filemarks represents a 24 bit unsigned number Correct values range from 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 Example ibwrt gpibscsia wfmks 1 n 8 Tell the GPIB SCSI A to complete a SCSI WRITE FILEMARKS command ...

Page 318: ...n the creation of the Command Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 2A 1 LUN 00 2 Logical Block Address Most Significant Byte 3 Logical Block Address Up Middle Significant Byte 4 Logical Block Address Low Middle Significant Byte 5 Logical Block Address Least Significant Byte 6 00 7 Transfer Length Most Significant Byte 8 Transfer Length Least Significant Byte 9 VCB 00 The Logical Block Addre...

Page 319: ... your SCSI device documentation for expected values in each byte of the 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 logical block address represents a 32 bit unsigned...

Page 320: ...PIB SCSI A and SCSI from hanging ibwrt gpibscsia stat c n n 9 Request the GPIB SCSI A to report numerical status continuously ibwrt gpibscsia tid 4 n 6 Request to the GPIB SCSI A to communicate with SCSI Target with ID of 4 ibwrt gpibscsia pad 13 n 7 Tell the GPIB SCSI A that you want the pad byte to be a carriage return symbol ibwrt gpibscsia blksz 512 n 10 Tell the GPIB SCSI A that the drive has...

Page 321: ... 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 ibwrt scsidev Put this data on the disk 25 Write the string to the disk drive across the Data Channel The NI GPIB call asserts the GPIB EOI signal on the last byte of the string notifies the GPIB SCSI A that all the GP...

Page 322: ... Bit 7 6 5 4 3 2 1 0 Byte 0 0A 1 LUN Logical Block Upper 5 bits 2 Logical Block Address Middle Significant Byte 3 Logical Block Address Least Significant Byte 4 Transfer Length 5 VCB 00 The Logical Block Address and Transfer Length in the Command Descriptor block above are given as parameters to the write command The LUN corresponds to the last value assigned with the lun command The VCB correspon...

Page 323: ...ogical block address and transfer length into the Command and Status Channel buffer followed by a CR LF logical block address represents a 21 bit unsigned number Correct values range from 0 to 2 097 152 transfer length represents an 8 bit unsigned number Correct values range from 0 to 255 If numbers that are too large are entered there is a syntax error in a number or there are no numbers the GPIB...

Page 324: ...bscsia blksz 512 n 10 Tell the GPIB SCSI A that the drive has a blocksize of 512 bytes This information can be found either in the documentation of the SCSI disk drive or by executing the SCSI MODE SENSE command either through a low level command sequence or with the high 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 d...

Page 325: ... up the GPIB SCSI A and the SCSI ibwrt scsidev databuf 4981 Write 4 981 bytes of data from a memory buffer to the GPIB SCSI A which in turn puts the data onto the SCSI Target When the NI function call sends the last byte of data the EOI GPIB signal is driven active to indicate the last byte The GPIB SCSI A detects this and stops attempting to get GPIB data but sends out 139 5120 4981 linefeed char...

Page 326: ...are used in the creation of the Command Descriptor Block Bit 7 6 5 4 3 2 1 0 Byte 0 3B 1 LUN 02 2 Buffer Id 3 Buffer Offset Most Significant Byte 4 Buffer Offset Middle Significant Byte 5 Buffer Offset Least Significant Byte 6 Allocation Length Most Significant Byte 7 Allocation Length Middle Significant Byte 8 Allocation Length Least Significant Byte 9 VCB 00 The Buffer Id Buffer Offset and Alloc...

Page 327: ... 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 Refer to your SCSI device documentation for expected values in each byte of the Command Descriptor Block the SCSI phases that the device creates during the executio...

Page 328: ...e 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 ibwrt scsidev 5555555555 10 Send the data to store in the memory buffer across the Data Channel ...

Page 329: ...rface message reference list which describes the mnemonics and messages that correspond to the interface functions 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 ...

Page 330: ...E 016 14 SO 2E 056 46 MLA14 0F 017 15 SI 2F 057 47 MLA15 10 020 16 DLE 30 060 48 0 MLA16 11 021 17 DC1 LLO 31 061 49 1 MLA17 12 022 18 DC2 32 062 50 2 MLA18 13 023 19 DC3 33 063 51 3 MLA19 14 024 20 DC4 DCL 34 064 52 4 MLA20 15 025 21 NAK PPU 35 065 53 5 MLA21 16 026 22 SYN 36 066 54 6 MLA22 17 027 23 ETB 37 067 55 7 MLA23 18 030 24 CAN SPE 38 070 56 8 MLA24 19 031 25 EM SPD 39 071 57 9 MLA25 1A 0...

Page 331: ... 109 m MSA13 PPE 4E 116 78 N MTA14 6E 156 110 n MSA14 PPE 4F 117 79 O MTA15 6F 157 111 o MSA15 PPE 50 120 80 P MTA16 70 160 112 p MSA16 PPD 51 121 81 Q MTA17 71 161 113 q MSA17 PPD 52 122 82 R MTA18 72 162 114 r MSA18 PPD 53 123 83 S MTA19 73 163 115 s MSA19 PPD 54 124 84 T MTA20 74 164 116 t MSA20 PPD 55 125 85 U MTA21 75 165 117 u MSA21 PPD 56 126 86 V MTA22 76 166 118 v MSA22 PPD 57 127 87 W MT...

Page 332: ...the numeric value in decimal of that bit or code Status Bits S Mode The following paragraphs describe the conditions represented by the bits in status for S Mode ERR 32768 The ERR bit is set following any call that results in an error The particular error can be determined by examining the GPIB error and SCSI error values The ERR bit is cleared following any call that does not result in an error N...

Page 333: ...d The END bit is set in the status word following a rd or brd function if the 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 The END bit is cleared in the status word at the start ...

Page 334: ...PIB SCSI A or by another Controller The REM bit is cleared whenever REN becomes unasserted or when the GPIB SCSI A as a Listener detects the Go to Local GTL command sent either by the GPIB SCSI A or by another Controller or when the loc function is called while the LOK bit is cleared in status CIC 32 The CIC bit indicates if the GPIB SCSI A is the Controller In Charge The CIC bit is set whenever s...

Page 335: ...bit is also set whenever the GPIB SCSI A shadow handshakes as a result of the gts function The LACS bit is cleared whenever the GPIB SCSI A detects that the Unlisten UNL command its own talk address IFC or gts is called without shadow handshake DTAS 2 The DTAS bit indicates if the GPIB SCSI A has detected a device trigger command The DTAS bit is set whenever the GPIB SCSI A as a Listener detects t...

Page 336: ...in status for G Mode ERR 32768 The ERR bit is set following any call that results in an error The particular error can be determined by examining the GPIB error and SCSI error values The ERR bit is cleared following any call that does not result in an error Note By examining this bit you can check for an error condition after each call An error made early in your application program may not become...

Page 337: ...is expecting a message byte from the Initiator usually the GPIB SCSI A BSFR 32 The BSFR bit indicates that the SCSI bus to which the GPIB SCSI A is attached is currently in the Bus Free phase This means that the SCSI BSY signal is not asserted and that a SCSI sequence can be initiated SLCT 16 The SLCT bit indicates that the SCSI bus to which the GPIB SCSI A is attached is currently in the Selectio...

Page 338: ...ou 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 DOUT 1 The DOUT bit indicates that the SCSI bus to which the GPIB SCSI A is attached is currently in the Data Out phase This indication is useful if you are performing low level SCSI calls and you need to know that the selected Target is expe...

Page 339: ...Clear In multiple CIC situations you can call wait CIC to delay further processing until control is passed to the GPIB SCSI A ENOL S G 2 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 address is in the Command Descriptor Block to use cmd to properly address the L...

Page 340: ...recorded to notify you of that fact gts should almost never be called except immediately after a cmd call cmd causes ATN to be asserted EARG G 4 The GPIB SCSI A records this error when you pass an invalid argument to a function call The following are some examples read called with only one parameter write called with the second parameter larger than 256 tid called with no parameter and no If your ...

Page 341: ...is stuck the Listener is not continuing to handshake or the Talker has stopped talking or the byte count in the call that timed out is not what the other device was expecting Be sure that both parties to the transfer understand what byte count is expected or if possible have the Talker use the END message to assist in early termination ECAP S 11 This error results when a particular capability has ...

Page 342: ...n below If the error is valid for S mode only S is indicated If the error is valid for G mode only G is indicated If the error is valid for S mode and G mode S G is indicated Only one SCSI error can exist at any time The following paragraphs describe the SCSI errors in detail NSER S G 0 The GPIB SCSI A reports this value if no SCSI errors were detected as a result of the last operation EARB G 1 Th...

Page 343: ... or finishing the command normally by going through the Status and Message In phases EPAR S G 6 The GPIB SCSI A records this error if it is configured to detect and report SCSI parity errors and the GPIB SCSI A detects a parity error on any read of data from the SCSI bus This is configurable with Switch 7 of configuration switch SW2 TST0 TST7 G 128 135 80 87 hex The GPIB SCSI A records this error ...

Page 344: ...as listed later in this appendix For this section only the status is displayed as a binary number with R signifying reserved and V signifying vendor unique R should always be zero and the 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 O...

Page 345: ...nd sequence with this message The GPIB SCSI A does not respond in any way to this message it simply stores the message in the buffer of the Command and Status Channel EXTENDED MESSAGE 1 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 s...

Page 346: ...ntly to the user however all the Message In bytes required for this command are placed in the Command and Status Channel buffer Typically there are two extra bytes preceding the Status and Message In bytes normally found in the Command and Status Channel buffer after a command in which disconnection was performed These two extra bytes are 0x04 for the DISCONNECT message and 0x80 for the IDENTIFY m...

Page 347: ...e the GPIB SCSI A sends this message to the Initiator immediately after reconnection to re establish the data path to the Initiator The GPIB SCSI A also recognizes this message when the Initiator uses it to indicate that it can support disconnection and reconnection While operating in G mode the GPIB SCSI A sends this message to the Target to determine whether or not the GPIB SCSI A can support di...

Page 348: ...r specific information about the Sense keys issued by the SCSI devices see the instructions in your device documentation NO SENSE 0 This sense key indicates that there is no specific sense key available One way to receive this sense key is if the previous command completes correctly ILLEGAL REQUEST 5 This sense key indicates that there was an illegal opcode or parameter in the Command Descriptor B...

Page 349: ...itializing the bus addressing and unaddressing devices and setting device modes for remote or local programming The term command as used here should not be confused with some device instructions which can also be called commands Such device specific instructions are actually data messages Talkers Listeners and Controllers A Talker sends data messages to one or more Listeners The Controller manages...

Page 350: ...ce may always be a Talker called a talk only device and there may be one or more listen only devices 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 Talker to send data to an attached GPIB device Listen...

Page 351: ...management lines Data Lines The eight data lines DIO1 through DIO8 carry both data and command messages All commands and most data use the 7 bit ASCII or ISO code set in which case the eighth bit DIO8 is unused or used for parity Handshake Lines Three lines asynchronously control the transfer of message bytes among devices The process is called a three wire interlocked handshake and it guarantees ...

Page 352: ...and the Talker drives it when sending data messages Interface Management Lines Five lines are used to manage the flow of information across the interface ATN attention The Controller drives ATN true when it uses the data lines to send commands and false when it allows a Talker to send data messages IFC interface clear The System Controller drives the IFC line to initialize the bus and become Contr...

Page 353: ...ting of a shielded 24 conductor cable with both a plug and receptacle connector at each end This design allows devices to be linked in either a linear or a star configuration or a combination of the two See Figures C 1 C 2 and C 3 The standard connector is the Amphenol or Cinch Series 57 Microribbon or Amp Champ type An adapter cable using a non standard cable and or connector is used for special ...

Page 354: ...O4 EOI DA V NRFD NDAC IFC SRQ ATN SHIELD DIO5 DIO6 DIO7 DIO8 REN GND TW PAIR W DA V GND TW PAIR W NRFD GND TW PAIR W NDAC GND TW PAIR W IFC GND TW PAIR W SRQ GND TW PAIR W ATN SIGNAL GROUND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Figure C 1 The GPIB Connector and Signal Assignments ...

Page 355: ...Appendix C Operation of the GPIB National Instruments Corp C 7 GPIB SCSI A User Manual Figure C 2 Linear Configuration ...

Page 356: ...Operation of the GPIB Appendix C GPIB SCSI A User Manual C 8 National Instruments Corp Figure C 3 Star Configuration ...

Page 357: ...mum separation of 4 m between any two devices and an average separation of 2 m over the entire bus A maximum total cable length of 20 m 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 ...

Page 358: ...s on microcomputer systems with typically one host and one drive Many manufacturers designed their disk drives and controller boards to work with SASI so it quickly became an industry standard In 1982 The American National Standards Institute ANSI created a committee to develop a formal document that would define the SASI based standard After extensive input and review the committee concluded that...

Page 359: ...he bus is available for subsequent users Arbitration In this phase one SCSI device can gain control of the SCSI bus so that it can assume the role of an Initiator or Target This phase is optional If it is not implemented there can be only one Initiator This phase must be implemented in systems that allow for Reselection Selection Reselection The difference between the Selection and Reselection pha...

Page 360: ...formation transfer phases During the information transfer phases the C D I O and MSG SCSI signals are used to distinguish the type of data being sent along the SCSI The Target is responsible for driving these signals and therefore controls all changes from one phase to another Additionally the Target controls the direction of the information transfer by means of the I O signal If the signal is act...

Page 361: ...e Initiator The Target asserts the C D and I O signals and negates the MSG signal during the REQ ACK handshakes for this phase Message In Message Out This phase is comprised of two component phases depending on the SCSI I O signal Message In In this phase the Target requests that messages be sent from the Target to the Initiator The Target asserts the C D I O and MSG signals during the REQ ACK han...

Page 362: ...cesses the command Upon command completion the Target always returns a single status byte to the Initiator during the Status phase A status code CHECK CONDITION indicates that something did not go as expected with the command and that there is additional information available possibly indicating what went wrong with the previous command To receive this additional information most devices implement...

Page 363: ...condition with the Message Out phase after going through the Selection phase The first message sent by the Initiator after the Selection phase should be the IDENTIFY message which could indicate characteristics about the command to process The IDENTIFY message is used to indicate that the Initiator can support disconnection reconnection by processing the Reselection phase as well as prescribing a ...

Page 364: ...5 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 reserved ground ground ground ground ground ground open ground ground ground ground ground ground ground ground ground ground ground ground ground ground ground ground reserved ground ground ground I O SDB0 SDB1 SDB2 SDB3 SDB4 SDB5 SDB6 SDB7 SDBP ground reserved TERMPWR reserved ATN BSY ACK R...

Page 365: ...ID of the device to select Table D 1 contains the data bus signals and what they represent during the Arbitration and Selection Reselection phases Note The SDBP is not valid during Arbitration but is valid and represents odd parity during the Selection Reselection phases Table D 1 Data Bus Signals Signal Meaning SDB7 SCSI ID 7 SDB6 SCSI ID 6 SDB5 SCSI ID 5 SDB4 SCSI ID 4 SDB3 SCSI ID 3 SDB2 SCSI I...

Page 366: ... asserted MSG indicates a Message phase When C D is asserted it indicates Control Command or Status information is on the SCSI data bus Data is specified when C D is unasserted Finally I O indicates the direction of information transfer When I O is asserted the direction of transfer is to the Initiator When I O is unasserted the direction of transfer is from the Initiator I O is also asserted by t...

Page 367: ...evice in the chain must be terminated However if the SCSI system has multiple devices or has more than approximately 3 ft of total cable length two sets of termination resistors may be required one set at both ends of the SCSI configuration If a device with termination resistors is attached to the SCSI bus and the termination resistors are not given power the unpowered resistors can tie up the SCS...

Page 368: ...e of cabling is the shielded cable This 50 conductor connector consists of two rows of ribbon contacts Configuration Restrictions To achieve the high data transfer rate that the SCSI is designed for there are limitations placed on SCSI bus configurations The SCSI bus can have a maximum of eight devices connected in a daisy chained configuration and the total cable length in a SCSI system cannot ex...

Page 369: ...for parallel polls responds at this time by driving an assigned data line either TRUE or FALSE depending on the value of its individual status ist bit When a parallel poll is conducted the device determines the value of its ist bit and drives the line to the appropriate value Whether this line is TRUE or FALSE depends on how the device is configured for the poll The circumstances under which a dev...

Page 370: ...he config function When the PP2 bit is cleared the 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 In G...

Page 371: ...O line 3 Because the U bit is set in all of the PPD messages they all have the same effect All of the PPD messages disable the device from responding to parallel polls Issuing Remote Configurations in S Mode In S Mode the ppc function can be used to remotely configure devices for parallel polls Remote configuration is indicated by setting the Me bit in the Command Descriptor Block to 0 For example...

Page 372: ...Unconfigure PPU message to be sent This message has the same effect as using the ppc function to send PPD messages to every device on the GPIB Like the ppc function ppu will only affect devices that are using PP subset PP1 Issuing Local Configurations in S Mode In S Mode the ppc function can also be used to locally configure the GPIB SCSI A itself Local configuration is indicated by setting the Me...

Page 373: ...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 If the controller has sent it the Parallel Poll Configure byte hex 6D binary 0110 1101 and parallel polls it while its ist bit is set it responds by asserting DIO line 6 If the controller sent it the parallel poll configure byte hex ...

Page 374: ...S bit the device asserts DIO line 4 The controller configures all of the line printers to respond positively on DIO line 1 when busy In this case the configuration byte for each of them is 01101000 hex 68 When a parallel poll is conducted the controller can immediately find out if all line printers are free because the bit 0 of the parallel poll response will be 0 If any line printer is busy bit 0...

Page 375: ...e Monday through Friday from 8 00 a m to 6 00 p m central time In other countries contact the nearest branch office You may fax questions to us at any time Corporate Headquarters 512 795 8248 Technical support fax 800 328 2203 512 794 5678 Branch Offices Phone Number Fax Number Australia 03 879 9422 03 879 9179 Austria 0662 435986 0662 437010 19 Belgium 02 757 00 20 02 757 03 11 Denmark 45 76 26 0...

Page 376: ...ns 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 Name Company Address Fax Phone Computer brand Model Processor Operating system Speed MHz RAM MB Display adapter Mouse yes no Other adapters installed Hard dis...

Page 377: ...National Instruments software product Version Configuration The problem is List any error messages The following steps will reproduce the problem ...

Page 378: ...dware configuration and use this form as a reference for your current configuration National Instruments Products GPIB SCSI A EPROM Revision______________________________ Application Programming Language___________________________ SW1 Switch Setting________________________________________ SW2 Switch Setting________________________________________ Termination Resistor Pack Installed yes or no _____...

Page 379: ...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 continues ...

Page 380: ...be the errors 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: ...e DIP dual inline package DMA direct memory access DRAM dynamic random access memory EOI end or identify EOS end of string ft feet GPIB General Purpose Interface Bus hex hexadecimal Hz hertz IEEE Institute of Electrical and Electronic Engineers in inches lb pounds LED light emitting diode M megabytes of memory m meters max maximum Mbytes 1 000 000 bytes oz ounces RAM random access memory ROM Read ...

Page 382: ...Glossary GPIB SCSI A User Manual G 2 National Instruments Corp V volts VAC volts alternating current VDC volts direct current ...

Page 383: ...tion stat function tstur function B Become Active Controller function See cac function binary numbers indicating 6 4 bits See status bits G mode status bits S mode blksz function 7 7 to 7 8 examples 7 8 syntax and description 7 7 See also rdext function read function wrext function write function Board Level Read Data function See brd function Board Level Write Data function See bwrt function brd ...

Page 384: ...2 11 cac function 5 15 to 5 16 description 5 15 examples 5 16 format 5 15 See also gts function sic function caddr function 5 17 to 5 19 description 5 17 to 5 18 examples 5 18 format 5 17 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 sta...

Page 385: ...ge byte B 14 D 6 Command Descriptor Block example illustration 4 2 format 4 1 to 4 2 format function 7 26 inquiry function 7 33 mdsct function 7 37 mdsns function 7 39 programming messages 4 1 rblks function 7 47 rcdia function 7 49 rdbuf function 7 58 rdcap function 7 61 rdext function 7 63 rdfct function 7 67 read function 7 70 rewind function 7 74 rlseu function 7 76 rqsns function G mode 7 78 ...

Page 386: ...also ppc function configuration G mode default switch settings 2 3 to 2 4 GPIB Configuration function srqen 6 18 GPIB requirements C 9 parallel polling E 1 to E 6 SW2 switch settings 2 7 to 2 8 possible configurations 2 8 sample setting 2 7 Switch 4 3 9 Switch 5 3 8 Switch 6 3 7 to 3 8 Switch 7 3 6 to 3 7 Switches 1 through 3 3 9 See also installation SCSI Configuration functions configuration S m...

Page 387: ...6 5 determining with Switch 5 3 8 data in function See dtin function data lines GPIB C 3 data messages C 1 data out function See dtout function data phases SCSI See SCSI phase handling data transfers controlling with Switch 5 3 4 to 3 5 disconnection reconnection 4 5 to 4 8 DAV data valid line C 4 DCAS status bit S mode B 4 DCR bit 6 24 to 6 25 decimal numbers indicating 6 4 device clear commands ...

Page 388: ...r code GPIB B 9 to B 10 EADR error code GPIB B 8 EARB error code SCSI B 11 EARG error code GPIB B 9 EBUS error code GPIB B 10 ECAP error code GPIB B 10 ECER error code SCSI B 11 ECIC error code GPIB B 7 ECMD error code GPIB B 10 electrical characteristics GPIB operation C 5 to C 8 SCSI operation D 11 specifications 1 4 Enable Disable Automatic Testing of SCSI Targets See autotst function Enable Di...

Page 389: ...30 to 5 32 examples 5 32 to 5 33 format 5 30 eot function 5 34 to 5 35 description 5 34 examples 5 35 format 5 34 EPAR error code SCSI B 11 to B 12 EPHS error code SCSI B 11 equipment optional 1 3 ERR status bit G mode B 5 S mode B 1 serial polling 6 25 error codes GPIB EABO B 9 to B 10 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 EPA...

Page 390: ...and See hcmd function EXTENDED MESSAGE message byte B 14 F fax technical support 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 autotst 7 4 to 7 6 blksz 7 7 to 7 8 cmd 7 9 to 7 10 cmp 7 11 to 7 12 dti...

Page 391: ...79 rsrvu 7 80 to 7 81 rst 7 82 SCSI Configuration functions 6 17 SCSI functions 6 13 to 6 16 selwa 7 83 to 7 84 selwo 7 85 sndia 7 86 to 7 88 space 7 89 to 7 90 srqen 7 91 to 7 93 stat 7 94 to 7 100 tid 7 101 to 7 102 tstur 7 103 to 7 104 vcb 7 105 to 7 106 wfmks 7 107 to 7 108 wrext 7 109 to 7 112 write 7 113 to 7 116 wrtbuf 7 117 to 7 119 functions S mode alphabetical list 4 15 to 4 16 brd 5 5 t...

Page 392: ...50 loc 5 51 to 5 53 low level controller functions 4 13 onl 5 54 to 5 55 parallel poll functions 4 13 pct 5 56 to 5 57 ppc 5 58 to 5 61 ppu 5 62 to 5 63 rd 5 64 to 5 69 rpp 5 70 to 5 71 rqsns 5 72 to 5 75 rsc 5 76 to 5 78 rsp 5 79 to 5 81 rsv 5 82 to 5 83 SCSI function groups 4 14 SCSI functions 4 14 serial poll functions 4 12 sic 5 84 to 5 85 sre 5 86 to 5 88 stat 5 89 to 5 97 tmo 5 98 to 5 101 t...

Page 393: ...8 Go from Active Controller to Standby function See gts function Go to Local function See loc function Go To Local GTL 6 26 GOOD status byte B 13 GPIB address G mode addressing terminology 6 5 communicating with peripherals 6 5 setting with Switch 5 3 8 Primary address 3 8 4 2 S mode programming 4 2 to 4 3 Secondary address 3 8 4 2 See also caddr function GPIB Configuration function 6 18 7 91 to 7...

Page 394: ...24 signals and lines ATN C 4 data lines C 3 DAV C 4 EOI C 5 handshake lines C 3 to C 4 interface management lines C 4 to C 5 NDAC C 4 NRFD C 3 overview C 3 REN C 4 SRQ C 4 SRQ bit 6 25 Take Control TCT 6 26 Talkers Listeners and Controllers C 1 to C 2 types of messages C 1 GPIB port 1 10 GPIB read and write termination methods See read and write termination methods END and EOS GPIB SCSI A bufferin...

Page 395: ...C 4 NRFD C 3 overview C 3 hcmd function 7 29 to 7 31 examples 7 30 to 7 31 syntax and description 7 29 to 7 30 See also pad function hexadecimal numbers indicating 6 4 high level I O functions See I O functions S mode high level SCSI command executing See hcmd function I I O functions S mode brd 5 5 to 5 9 bwrt 5 10 to 5 14 chart 4 11 rd 5 64 to 5 69 wrt 5 110 to 5 115 id function G mode 7 32 exam...

Page 396: ...quiry data formats 5 42 to 5 43 inquiry function G mode 7 33 to 7 34 Command Descriptor Block 7 33 example 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 ATN C 4 EOI ...

Page 397: ...f 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 example 5 50 format 5 49 loc function 5 51 to 5 53 description 5 51 to 5 52 examples 5 53 format 5 51 LOK status bit S mode B 2 low level controller functions S mode cac 5 15 to 5 16 chart 4 13 cmd 5 23 to 5 25 gts 5 36 to 5 38 ln 5 49 to 5 50 pct 5 56 to 5 57 sic 5 84 to 5 85 sre 5 86 to 5 88 ...

Page 398: ...PLETE B 14 D 6 DISCONNECT B 15 EXTENDED MESSAGE B 14 IDENTIFY B 16 D 6 MESSAGE REJECT B 15 to B 16 SAVE DATA POINTER B 14 MESSAGE REJECT message byte B 15 to B 16 messages command messages C 1 data messages C 1 device dependent messages C 1 interface messages C 1 multiline interface messages A 1 to A 3 programming messages G mode programming 6 1 to 6 3 S mode programming 4 1 to 4 2 SCSI message sy...

Page 399: ...B B 7 NO SENSE sense key B 17 NRFD not ready for data line C 3 NSER error code SCSI B 11 numerical input and output G mode programming 6 4 O octal numbers indicating 6 4 onl function 5 54 to 5 55 description 5 54 examples 5 55 format 5 54 opcodes S mode programming 4 2 operation of GPIB See GPIB operation operation of SCSI See SCSI operation P pad function 7 45 to 7 46 examples 7 46 syntax and des...

Page 400: ...g 6 9 S mode 3 3 Pass Control function See pct function pct function 5 56 to 5 57 description 5 56 examples 5 57 format 5 56 phases SCSI See SCSI phase handling physical characteristics 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 ...

Page 401: ...to 6 3 format of 6 1 SCSI data transmission 6 9 SCSI message system 6 9 SCSI phase handling 6 9 commands not requiring data phase 6 10 commands requiring data in phase 6 10 commands requiring data out phase 6 11 disconnection reconnection 6 11 to 6 12 status and error information 6 4 to 6 5 talk function of GPIB SCSI A and SCSI 6 7 to 6 8 See also functions G mode programming in S mode Command Des...

Page 402: ...unction rcnct function 7 52 to 7 57 example 7 53 to 7 57 syntax and description 7 52 rd function 5 64 to 5 69 description 5 64 to 5 66 examples 5 67 to 5 69 format 5 64 See also eos function eot function stat function tmo function rdbuf function 7 58 to 7 60 Command Descriptor Block 7 58 example 7 60 syntax and description 7 58 to 7 59 See also wrtbuf function rdcap function 7 61 to 7 62 Command D...

Page 403: ...ction rdext function wrext function write function rear panel of 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 R...

Page 404: ...mode 7 78 to 7 79 Command Descriptor Block 7 78 example 7 79 syntax and description 7 78 to 7 79 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 sre function rsp function 5 79 to 5 ...

Page 405: ...sage byte B 14 SCSI Configuration functions autotst 7 4 to 7 6 blksz 7 7 to 7 8 chart 6 17 lun 7 35 to 7 36 pad 7 45 to 7 46 tid 7 101 to 7 102 vcb 7 105 to 7 106 SCSI functions G mode chart 6 13 to 6 16 cmd 7 9 to 7 10 dtin 7 16 to 7 20 dtout 7 21 to 7 25 format 7 26 to 7 27 getscsi 7 28 hcmd 7 29 to 7 31 inquiry 7 33 to 7 34 mdsct 7 37 to 7 38 mdsns 7 39 to 7 40 msgin 7 41 to 7 42 msgout 7 43 to...

Page 406: ... SCSI message system G mode programming 6 9 S mode programming 4 4 SCSI mode See S mode SCSI operation communication D 5 to D 6 configuration restrictions D 11 history of SCSI D 1 Initiator and Target operation D 1 to D 2 phases D 2 to D 4 Bus Free D 2 Command D 3 Data In Data Out D 4 Message In Message Out D 4 Selection Reselection D 2 to D 3 Status D 4 physical and electrical characteristics D 1...

Page 407: ...unction See selwa function Select a SCSI Target Without SCSI ATN Asserted function See selwo function selwa function 7 83 to 7 84 example 7 84 syntax and description 7 83 to 7 84 See also selwo function selwo function 7 85 example 7 85 syntax and description 7 85 See also selwa function Send Diagnostic function See sndia function Send GPIB Commands function See cmd function Send Interface Clear fu...

Page 408: ... also clr function signals and lines GPIB data lines C 3 GPIB connector and signal assignments 1 10 C 6 handshake lines DAV C 4 NDAC C 4 NRFD C 3 overview C 3 interface management lines ATN C 4 EOI C 5 IFC C 4 REN C 4 SRQ C 4 overview C 3 signals and lines SCSI control signals D 9 to D 10 handshake lines D 9 miscellaneous control lines D 9 to D 10 phase control lines D 9 data bus signals D 8 funct...

Page 409: ...on D 11 sre function 5 86 to 5 88 description 5 86 to 5 87 examples 5 87 to 5 88 format 5 86 See also cmd function loc function rsc function SRQ bit 6 25 SRQ service request line C 4 srqen function 7 91 to 7 93 examples 7 93 SRQ mask bits 7 91 to 7 92 syntax and description 7 91 to 7 92 SRQI status bit S mode B 2 stat function G mode 7 94 to 7 100 examples 7 99 to 7 100 GPIB error conditions 7 97 ...

Page 410: ...CIC B 3 CMPL B 2 DCAS B 4 DTAS B 4 END B 2 ERR B 1 LACS B 3 to B 4 LOK B 2 REM B 2 to B 3 SRQI B 2 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 sense keys switch se...

Page 411: ...m Controller C 2 to C 3 T TACS status bit S mode B 3 Take Control TCT 6 26 Talkers 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 See autotst function Target Device Id setting See tid function technical support F 1 t...

Page 412: ... 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 transfer rates maximum chart 1 6 trg function 5 102 to 5 104 description 5 102 to 5 103 examples 5 103 to 5 104 format 5 102 Trigger Specified Device function See trg function tstur function 7 103 to 7 ...

Page 413: ...function pad function read function write function Write Buffer function See wrtbuf function Write Data function See wrt function Write Extended function See wrext function Write Filemarks function See wfmks function write function 7 113 to 7 116 Command Descriptor Block 7 113 example 7 114 to 7 116 See also blksz function dtin function dtout function pad function rdext function read function wrex...

Reviews: