G Mode Functions
Chapter 7
GPIB-SCSI-A User Manual
7-62
© National Instruments Corp.
rdcap
(continued)
During the execution of this command, if the GPIB-SCSI-A
encounters a phase which it does not expect, an EPHS error
indication results. For a list of the expected phases, refer to
the section titled Handling of SCSI Phases in G Mode in
Chapter 6, Programming in G Mode.
The information returned in the Data In phase is the logical
block address and block length, in bytes, of the last logical
block of the specified logical unit.
Refer to your SCSI device documentation for the expected
values in each byte of the Command Descriptor Block, the
SCSI phases that the device creates, and the format and
meaning of the returned READ CAPACITY data.
If there is anything following the
rdcap
command, the
GPIB-SCSI-A aborts the operation and indicates an EARG
error.
Example:
ibwrt (gpibscsia, "rdcap\n", 6);
/* Tell the GPIB-SCSI-A to complete a SCSI
* READ CAPACITY command.
*/
ibrd (scsidev, rdcbuf, 100);
/* Get the data from Data Channel. */
processrdc (rdcbuf);
/* Process the buffer. */