Clears (resets) a specified GPIB device.
[ lStatus = ] GpibClear ( lBoardDevice )
The GpibClear procedure syntax has the following parts:
Name |
Type |
Description |
lStatus |
Long |
Status |
lBoardDevice |
Val Long |
Board or Device address |
This function initializes (resets) a specified GPIB device or board by sending the SDC (Selected Device Clear) command to the specified device, or by sending the DCL (Device Clear) command to the board. The instrument must have a DC1 or DC2 subset of the GPIB DC interface function in order to respond to this function.
The hexadecimal format of lBoardDevice is as follows:
lBoardDevice = 0xBBPPSS
Where:
BB |
Board address (1 - 9) |
PP |
Device Primary address (0 - 31) - 0 if not used (bus address), 31 used for Primary address of 0 |
SS |
Device Secondary address (0 - 31) - 0 if not used (bus address or device without Secondary address), 31 used for Secondary address of 0 |
When PPSS is 0, lBoardDevice specifies a board address. The value of lBoardDevice may be obtained using the GetDriverAddress function.
The function returns 0 on success and -1 on failure.
The following command clears the GPIB device at address 5 connected to GPIB board 1:
GpibClear(0x010500)
The following command clears all the GPIB devices connected to GPIB board 1:
GpibClear(0x010000)