Function
Confirms whether serial poll was performed by master (controller), and retrieves current status byte.
Format
Ret = GpibCheckSPoll ( DevId, SPoll, Stb )
Parameter
DevId [ VB.NET: Short ][ C, C++: short ][ C#: short ]
Specifies DevID.
SPoll [ VB.NET: Short ][ C, C++: short * ][ C#: out short ]
Retrieves whether serial poll was performed.
0 |
Not performed |
1 |
Performed |
Stb [ VB.NET: Short ][ C, C++: short * ][ C#: out short ]
Retrieves status byte.
0 to 255 |
Status byte |
Return Value
Ret [ VB.NET: Integer ][ C, C++: long ][ C#: int ]
0 |
Normality completion |
10001 |
Invalid ID was specified |
10002 |
Driver can not be called |
12662 |
Pointer to SPoll is NULL |
12663 |
Pointer to Stb is NULL |
22672 |
When device is used as master (controller), functions for slave (non-controller) are executed |
22697 |
Being used in other process |
Initial Value
Stb |
0 |
Status byte |
Remarks
Example
Retrieves current status and displays it.
C |
short SPoll, Stb; Ret = GpibCheckSPoll ( DevId, &SPoll, &Stb ); if ( Ret == 0) { if ( SPoll == 0 ) { Printf ( "No Serial Polling\n" ); Printf ( "%ld\n", Stb ); } else { Printf ( "Serial Polling\n" ); Printf ( "%ld\n", Stb ); } } |
See Also