AnsweredAssumed Answered

Data acquisition synchronization: PC, controller, PNA

Question asked by afcec on May 19, 2016
Latest reply on May 24, 2016 by afcec

Hi,

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:

*CLS

*RST

CALC:PAR:DEL:ALL

CALC:PAR:DEF 'S21',S21

DISP:WIND:TRAC:FEED 'S21'

DISPLAY:ENABLE ON

FORM:BORD SWAP

FORM REAL,64

SENS:BWID 1000.0

SENS:AVER:COUN 1

SENS:AVER ON

TRIG:SOUR EXT

CONT:SIGN BNC1,TIEPOSITIVE

SENS:SWE:TRIG:MODE POINT

 

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:

 

--> *OPC?

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?

 

Thanks!

Outcomes