Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Error when fetching curves on oscciloscope DPO 7254C

Post Reply
florianlf
Posts: 1
Joined: January 23rd, 2017, 7:35 am
Country: Switzerland

Error when fetching curves on oscciloscope DPO 7254C

Post by florianlf » January 23rd, 2017, 7:49 am

Hello,

It's my first message on the forum so I hope I am giving enough info to get some help.. I have struggling with this problem for a few days now.
We are trying to build a program with labview that is able to read the two waveforms sent by a Function Generator (Tek AFG3021C) on the oscilloscope (Tek DPO7254C) after averaging x times the two signals (Function Generator Output sent to Channel 2 and TTL Output sent to Channel 1; oscilloscope trigger setup on Channel 1). We encountered no problems with setting up the function generator so I will only discuss the issues we have with programming the oscilloscope. In manual mode, we can also do what we want, the problem comes when we want to extract the waveforms to the computer with labview.

Here is the setup we are using:
NI Labview 2016 (32-bits)
NI-VISA 2016
Tektronix AFG3021C Function generator (connected by ethernet)
Tektronix DPO7254C Oscilloscope (connected by ethernet)
Windows 7 Professional Edition (SP1)

The full program controlling the oscilloscope is attached (in the zip file): “Oscillo Control Test 2.vi”.
In this VI, the oscilloscope is first setup in a vi called “Oscillo Setup parameters (Sub VI).vi”, also attached, where we first setup the two channels, the time, the trigger and then the acquisition mode (single, Hi-Res or Average). I used sub VIs from the Tek7000 series library and a self made one for the acquisition mode (see also attached “Oscillo Set Measurement Mode (Sub VI).vi” ), as I could not find one example in the library. Also attached are the several control cluster ctrl def that I created to "simplify" programming.

In the main program, after setting up the oscilloscope, the measurement is initiated (initiate.vi), then I added a wait for "Wait for Operation complete.vi" and the two waveforms should be extracted in a for loop (with N={ch1, ch2}) before closing the connection. I tried first with the ”Read (multiple waveforms).vi” I found in the Tektronix 7000 Series library but I observed the same problem.
My program works ok if the total acquisition time is below 5 or 10 sec. However, if I want to extract 25 averages of signals (set at 1 Hz), I get this error:
Error -1074000000 occurred at Tektronix 7000 Series.lvlib:Error Query.vi
Instrument reports:
402,"Operation complete"
2241,"Waveform requested is invalid; Waveform data not available; CURV?"
410,"Query INTERRUPTED"
0,"No events to report - queue empty"

As we would like to acquire quite slow signal after several averages, this is a serious problem for us. The problem we experienced is related, I guess, to the sub VI "Wait for Operation complete.vi". which does not wait to complete the averages before I fetch the two waveforms.

Is there a way we can wait for the setup to be completed and the averages to be completed, before we extract the waveforms? I could not find any example in the library or on the forum. Should I add a little subvi asking the equipment if it is ready (writing command lines such as BUSY?, *WAI) until I can read a BUSY 0 before fetching the curves ? I did not try yet as I thought there was maybe a more elegant method (and less demanding to the computer) to solve ou problem.

Many thanks for your help,
Florian
Attachments
Oscillo TEK 7254C control.zip
(74.02 KiB) Downloaded 983 times

Dave W
Tektronix Applications
Tektronix Applications
Posts: 266
Joined: April 26th, 2010, 12:01 pm
Country: United States

Re: Error when fetching curves on oscciloscope DPO 7254C

Post by Dave W » February 1st, 2017, 3:43 pm

Hi florianlf,

Operation Complete *OPC? will only indicate the end of the acquisition is the scope is in the single sequence mode so make sure to use the single sequence mode. In continuous acquisition mode *OPC? returns immediately and does not provide synchronization with the acquisition so don't use it this way.

Other than making sure to use the single sequence mode, just make sure the timeout for the OPC call is long enough for your entire acquisition time plus the time between initiating and the trigger arriving plus some margin for overhead.

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: No registered users and 4 guests