Chapter 7
G Mode Functions
© National Instruments Corp.
7-17
GPIB-SCSI-A User Manual
dtin
(continued)
Example:
This example is an entire low-level command sequence. This example
performs a Group 0 SCSI READ command sequence that reads one
block of data from a SCSI disk drive with a Target ID of 6 and a
blocksize of 256 bytes. Most of this example does at a low-level what
the high-level
read
command does automatically.
ibwrt (gpibscsia, "stat c n\n", 9);
/* Instruct 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 low-
* level command sequence or with the high-
* level mdsns command provided by the
* GPIB-SCSI-A.
*/
ibwrt (gpibscsia, "srqen #h18\n", 11);
/* Set up the GPIB-SCSI-A to request service
* when the Data Channel is ready or the
* GPIB-SCSI-A is ready for the next command.
*/