Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NaN value response. Oscilloscope dl9040 Yokogawa

Solved!
Go to solution

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. 

 

measure_waveform.jpg

Any help is appreciated.

 

Thank you.

0 Kudos
Message 1 of 4
(4,829 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(4,820 Views)

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. 

 

diagrama.jpg

 

Thanks again!

0 Kudos
Message 3 of 4
(4,783 Views)
Solution
Accepted by topic author luisi

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(4,774 Views)