Chapter 7
G Mode Functions
© National Instruments Corp.
7-53
GPIB-SCSI-A User Manual
rcnct
(continued)
Example:
This example is an entire low-level command sequence. It performs a
Group 0 SCSI WRITE command sequence that writes one block of data
to a SCSI disk drive with a Target ID of 5 and a blocksize of 532 bytes.
Most of this example does at a low-level what the high-level
write
command does automatically.
ibwrt (gpibscsia, "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 either through low-level
* command sequence or with the high-level
* mdsns command provided by the GPIB-SCSI-A.
*/
ibwrt (gpibscsia, "pad 13\n", 7);
/* Request the GPIB-SCSI-A to pad data
* transfers to the SCSI with the carriage
* return character.
*/