Forums › SA Series Discussions › New data in buffers flag and Spike/SCPI timeout issue
- This topic has 2 replies, 2 voices, and was last updated 3 years ago by
JHoy.
- AuthorPosts
JHoyParticipantI am using the SCPI control by means of pyVISA to grab marker data points from trace data. Is there an easy way to know when there is new data in the buffers? I was hoping there might be a flag I could query to see if there is new trace data rather than continuously querying the same trace/marker data that I just received. Basically, I would like a way to detect if the trace has updated.
The other problem I keep running into is timeout. I set Spike to attempt an auto reconnect, but SCPI still crashes. Is there a way to either set Spike to never timeout, or to set SCPI to detect a timeout and reconnect without throwing an error?
AndrewModeratorJHoy,
If you are sweeping, you can set the software into ‘single’ trigger mode, and manually initiate and wait for the sweeps. Most of our examples use this approach. For example, the scpi_simple_sweep.cpp example shows how you can start and wait for a sweep to complete with one SCPI command. That way you don’t have to wait for your measurement to change. In this way, the sweeps are user driven and you can control and wait for when they update.
Regarding your other issue. Can you provide more details? It sounds like your device is disconnecting in Spike? and then your SCPI query times out? I’m not sure the Spike software would be able to provide continuity right now if your device is disconnecting during a SCPI query. I believe you would need to wait for the timeout and then re-query. If your device is disconnecting that often, we would probably want to troubleshoot that issue.
JHoyParticipantAndrew,
Thank you for the quick response!
I will try the single trigger mode. I did not even think about doing that.
I think my problem with regard to timeout issues may have been due to my computer going to sleep. I am going to try it again after changing the sleep settings to see if there is still an issue.
- AuthorPosts
You must be logged in to reply to this topic.