TestSys

NI-488.2

TestSys


Purpose

Cause IEEE 488.2-compliant devices to conduct self tests.

Format

C

void TestSys (int boardID, const Addr4882_t *addrlist, short *resultlist)

Visual Basic

CALL TestSys (boardID%, addrlist%(), resultlist%())

Interactive Control (Usage Notes)

TestSys addrlist

Input

boardID The interface number
addrlist A list of device addresses terminated by NOADDR

Output

resultlist A list of test results; each entry corresponds to an address in addrlist

Description

TestSys sends the "*TST?" message to the IEEE 488.2-compliant devices described by addrlist. The "*TST?" message instructs them to conduct their self-test procedures. A 16-bit test result code is read from each device and stored in resultlist. A test result of 0\n indicates that the device passed its self test. Refer to the documentation that came with the device to determine the meaning of the failure code. Any other value indicates that the device failed its self test. If the function returns without an error (that is, the ERR bit is not set in Ibsta), Ibcnt contains the number of services that failed. Otherwise, the meaning of Ibcnt depends on the error returned. If a device fails to send a response before the timeout period expires, a test result of –1 is reported for it, and the error EABO is returned.

Possible Errors

EABO The interface timed out before receiving a result from a device; Ibcnt contains the index of the timed-out device. -1 is stored as the test result for the timed-out device.
EARG Either an invalid address appears in addrlist or the addrlist is empty; Ibcnt is the index of the first invalid address in the addrlist array.
EBUS No devices are connected to the GPIB.
ECIC The interface is not the Controller-In-Charge; see SendIFC.
EDVR The NI-488.2 driver is either configured incorrectly or is not properly installed.
EHDL boardID is out of range.
ELCK The requested operation could not be performed because of an existing lock by another process.
ENEB The interface is not installed or is not properly configured.
ENOL No Listeners are on the GPIB.
EOIP Asynchronous I/O is in progress.