Chapter 4
Programming in S Mode
© National Instruments Corp.
4-5
GPIB-SCSI-A User Manual
S Mode Error Indication
When operating in S mode, the error indication of the GPIB-SCSI-A takes
the form specified by the SCSI specification. In the event of any error, the
GPIB-SCSI-A may or may not complete the command to its fullest extent,
depending on the error. Eventually, when the GPIB-SCSI-A reaches the
Status phase, the status byte that is sent (if any kind of error occurred) is the
CHECK CONDITION status.
At this point, the GPIB-SCSI-A also sets the Extended Sense key to further
indicate the error that has occurred. To get the Sense data, you need to use
the
rqsns
command to request that sense data be returned from the
GPIB-SCSI-A to the Initiator. You then must analyze the returned sense
data to see what type of error occurred. This is the accepted way of
obtaining and analyzing any error data occurring with the SCSI. For more
information on the Extended Sense keys 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 command (except for
inq
and
rqsns
).
Disconnection/Reconnection
For many operations, the GPIB-SCSI-A can disconnect itself from the SCSI
bus when its SCSI port is not in use. In this way, the SCSI bus does not
remain idle, and can be used by other Targets (such as disk drives). Once
the GPIB-SCSI-A requires use of the SCSI bus again, it reconnects itself to
the Initiator.
In order for disconnection/reconnection to be possible, the Initiator must
indicate to the GPIB-SCSI-A that it supports disconnection/reconnection.
This is done by selecting the GPIB-SCSI-A with ATN* active to indicate
that the Initiator has a message for the GPIB-SCSI-A. The message it sends
must be an IDENTIFY with bit 6 (the hex 0x40 bit) set to indicate that it
can support disconnection/ reconnection.