G Mode Functions
Chapter 7
GPIB-SCSI-A User Manual
7-18
© National Instruments Corp.
dtin
(continued)
ibwrt (gpibscsia, "getscsi\n", 8);
/* Tell the GPIB-SCSI-A to arbitrate for the
* SCSI bus.
*/
ibrd (gpibscsia, infobuf, 100);
/* Get the response from the GPIB-SCSI-A. */
get_stat(&ibstat,&gpiberr,&scsierr,infobuf);
/* Call a routine to convert the character
* strings representing numerical values to
* binary data.
*/
if (ibstat < 0)
/* The status would be negative if any error
* occurred with the GPIB or SCSI ports.
*/
processerr (ibstat)
/* If error, go and process it. */
else
{
ibwrt (gpibscsia, "selwo\n", 6);
/* Continue with the operation. After each
* step, check the status as you did after
* getscsi above. Because this does not show
* anything new, it is not done further in
* this example. selwo causes the GPIB-SCSI-A
* to attempt selecting a SCSI device at ID 6.
*/