Chapter 7
G Mode Functions
© National Instruments Corp.
7-111
GPIB-SCSI-A User Manual
wrext
(continued)
Example:
This example causes the GPIB-SCSI-A to write one block of data at
Logical Block Address 5000 to the Target with a SCSI ID of 4 and a
blocksize of 512 bytes. After the GPIB-SCSI-A detects END on a byte
transfer from the GPIB Talker, the GPIB-SCSI-A sends the carriage
return byte set up by the
pad
command to pad the rest of the transfer to
prevent the GPIB-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
* 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.
*/