09-26-2014 05:07 AM
Hi,
I'm controlling an oscilloscope through GPIB. The oscilloscope is the DL9040 from the Yokogawa company. I'm using the driver provided from NI and it works properly. With the driver I can communicate with the instrument without problems (acquire waveforms, save image..). However, I have a problem trying to measure some parameters from the waveform like the frequency, duty cycle and others.
My problem is that the response of the oscilloscope to any query is NaN. For example, if I want to measure the frequency of the trace 1 (wavefrom from channel 1) I have to write the followign command:
:MEAS:TRACE1:AREA1:FREQ:VAL?
And unfortunately the response is NaN. I don't understand this, because if I measure the frequency manually with the buttons of the instrument the frequency is 10 kHz.I don't know where is the error or what things I have to configure. I also have to say that this happens with any paramater to measure (Burst, Maximum, MInimum..).
I have attached the VI that I used to measure the parameters.
Any help is appreciated.
Thank you.
Solved! Go to Solution.
09-26-2014 06:23 AM
How long are you waiting once a waveform capture is done before doing the measurement?
When working with a Tektronix scope, I found that I had to add in delays everywhere just so it could process the command, do the measurements on the waveform, and then spit it back. So if you request a measurement before the waveform has been processed, it won't have a value ready and will therefore just spit back NaN.
09-29-2014 05:12 AM
I wasn't waiting between commands and measurements. But, now I have added delays between the measurement command (writing to the instrument) and the measurement return value (reading from the instrument). However, the response from the instrument is the same: NaN.
I also have added a timeout in the proceess of the waveform acquisition, but it neither works.
I have attached the modification done in the following image. I don't know if I have to do this or other thing, but I'm very confused.
Thanks again!
09-29-2014 06:21 AM
I was referring to time between commands that are sent. You may need to setup the measurement, wait so long, then request the data, the request being the :VAL? command.