Transmits SRQ and performs transfer of a status byte to master.
Transmits SRQ and confirms whether master has received status byte.
short SrqSend, Stb; short SPoll;
SrqSend = 1; // Sets to SRQ transmitting Stb = 10; // Sets status byte to 10 Ret = GpibSendSRQ ( DevId, SrqSend, Stb ); // Transmits SRQ
if ( Ret == 0 ) { // Confirms whether transfer normally completed SPoll = 0; // do { Ret = GpibCheckSPoll ( DevId, &SPoll, &Stb ); // Confirms whether serial poll is done
if ( Ret != 0) break; // Confirms whether it normally completed } while ( SPoll == 0 ); // Loops until serial poll is done
if ( SPoll == 1) Printf ( "Serial Polling \n" ); // Displays message when serial poll is done }
|
Since a master does not surely need to accept a status byte even if it receives SRQ, it may not escape from the do-while loop in the above example.