The read command goes in timeout when the level is to low. Any suggestions how to test that the counter is triggered and ready to receive the :READ command?
to do reading without timeout problem (DATA no ready) I use this configuration below.
I send an order to make a measurement and I wait for the status that tells me when the measurement is complete and the data available, then I read the result.
Do *ESR? ENDofMEASUREMENT = return value of "*ESR?" (0 or 1)
Loop Until ENDofMEASUREMENT = 1
FETCH?
When ENDofMEASUREMENT = 1, SCPI command "FETCH?" return reading. It's a good idea to put some delay in the loop DO UNTIL to reduce GPIB commands/sec sent on the BUS.
You may add timeout variable in the loop if necessary.
Hi,
to do reading without timeout problem (DATA no ready) I use this configuration below.
I send an order to make a measurement and I wait for the status that tells me when the measurement is complete and the data available, then I read the result.
Config 53132A, SCPI command
*CLS
*SRE 0
*ESE 0"
STAT:PRES
:INIT:CONT OFF
-----------------------------------------------------
Send command to do measurement
:INIT (start measurement)
*OPC
Test when reading is ready with "*ESR?"
Do
*ESR?
ENDofMEASUREMENT = return value of "*ESR?" (0 or 1)
Loop Until ENDofMEASUREMENT = 1
FETCH?
When ENDofMEASUREMENT = 1, SCPI command "FETCH?" return reading.
It's a good idea to put some delay in the loop DO UNTIL to reduce GPIB commands/sec sent on the BUS.
You may add timeout variable in the loop if necessary.
Regards
Yves