I am developing an application based on SCPI over Ethernet to get data from a PNA. A controller sends external triggers and the software must get a single data (real&imaginary).
So far I send some configuration commands:
And after that I begin measuring. According to what I understood from the documentation available I am doing the following:
The controller is configured to send N triggers in a specific period of time (i.e. 10 triggers in 1 minute) so there is a thread in the software doing the following:
If answer is "+1" I suppose data is ready so I send:
--> CALC:DATA? SDATA
If there is no answer the call should be blocked until it is available.
The problem I am facing is that with this synchronization mechanism, the PNA always answers immediately with "+1" to *OPC command, at any time without waiting for the external trigger so I just get my N points in a few ms but with no coordination with the controller. What am I doing wrong? What would be the correct commands in order to get this working?