12-12-2019 02:13 AM
Hello,
can someone help me solve this issue?
I still have problem with reading...
Thank you.
12-12-2019 09:50 AM - edited 12-12-2019 09:51 AM
It might be that your timing to perform the frequency span after the trigger may be causing a timeout delay - Add a delay for this (guessing at 2 seconds, but more may be needed). I have included the setup using your path on top and with utilizing my Prologix driver below. You will need to deactivate one or the other.
LV2019
12-12-2019 02:34 PM - edited 12-12-2019 02:39 PM
Yes, you could pole the instrument using *OPC? and read its response. You will want to set the timeout to something longer than your measurement takes. By default the timeout is probably 1s or 3s, if the measurement takes 10s then *OPC? will never return 1, it will error as you've seen.
Alternately you could set the timeout to 1000s, send a *WAI until done, and then just have the code continue after that. I've simplied your code a bit and demonstrated timeout read/set and *WAI.
But, If you want to read back your trace you need the right SCPI commands, and will need to go through the manual for those. Or search the forum - https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Get-power-measurements-from-Spectrum-Analyze...