Chapter 5
S Mode Functions
© National Instruments Corp.
5-13
GPIB-SCSI-A User Manual
bwrt
(continued)
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-A enters the
Message In phase 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 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