Please enable JavaScript to view this site.

 Network Analyzers using RVNA and RNVNA software

Using the *OPC? or any other query when waiting for an operation to complete can lead to VISA timeout. The program must set the timeout to a value no less than the expected sweep time. For example:

viSetAttribute(instr, VI_ATTR_TMO_VALUE, 5000);

If a timeout has occurred, the Analyzer remains in the waiting state and does not respond to the next commands. The program must check the timeout condition and recover the Analyzer in case of the timeout. The recover code must include the Device Clear operation (viClear). The viClear function clears the device input and output buffers. Optionally, the recover code can include other operations, for example abort the current sweep or clear reporting status system.

status = viQueryf(instr, "TRIG:SING;*OPC?\n", "%*t");

if (status == VI_ERROR_TMO)

{

viClear(instr);

viPrintf(instr, "ABORt\n");

viPrintf(instr, "*CLS\n");

}

 

Rev.:  24.1