LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Capture doesn't match Scope Reading

So I'm trying to connect to an Osciloscope (Tektronix TDS3000 series) using this driver. I'm starting with the Single Channel Waveform Acquire.vi, and I'm not acquiring the data I need. I haven't modified the block diagram at all, only some of the front panel controls. It seems to be sending the correct settings to the scope, because the waveform I need is appearing on the scope screen after the labview vi is run. If I mess with the settings, this does not occur. 

 

It should be noted that occasionally, I do get a correct waveform on the computer, which makes me think it is not triggering correctly, and every once in a while I run the program at the perfect time so it acquires the data I need. 

 

The signal is an audio signal that beeps every few seconds. 

Download All
0 Kudos
Message 1 of 9
(3,831 Views)

If there is any more information I should give about the problem, please let me know

0 Kudos
Message 2 of 9
(3,796 Views)

Hi tikihiki

 

Which version of LabVIEW do you have? Which version of the VISA driver do you have?

 

Have you been able to run successfully any of the Instrument driver Tektronix TDS 3000 Series Oscilloscope examples or do you also have similar issues or problems with the examples.

 

What exactly do you mean with not triggering correctly, are you using a software trigger in LabVIEW, sending a trigger command using the instrument driver or do you mean a trigger in the Tektronix device.

 

Regards

Esteban R.

0 Kudos
Message 3 of 9
(3,774 Views)
LabVIEW 2011 SP1

NI VISA 3.2

 

The "Transfer Current Waveform" example, does work, as it seems it basically just copies what is on the scope screen. I could possibly just use this for my project, but it wouldn't be an ideal solution, as it doesn't automatically send the right settings, and because it doesn't use triggering (I eventually want the program to loop on each trigger).

 

"Single Channel Waveform Acquire" is the one thats giving me problems. What I think the program should do is send the settings to the scope, wait for a trigger, then perform read the waveform data. From what I gather, it is just reading from the scope probe immediately after it is run. I say this because it immediately acquires data (quiet noise that is well below trigger threshold), even if I turn off all sound on the audio device that the probe is plugged into. I haven't modified the VI at all, so I'm not sure what the problem is (or if I'm just misunderstanding what the VI is supposed to do).

0 Kudos
Message 4 of 9
(3,767 Views)

So I've changed my approach a bit, but I'm still running into a triggering problem. I'm now building off the "Transfer Current Waveform" example, which originally just reads the scope screen. The problem is when I put it in a loop (I also added a second channel but that isn't causing any problems). The idea is that, because I set up a trigger, the loop will get "stuck" at the Run block until a trigger occurs (the beep). Once the beep happens, it will record the waveforms, and loop around. That way, there is one iteration per trigger.

 

But what is actually happening is, the program never waits for a trigger, and just loops through recording waveforms as fast as it can (it takes about a second, which is more than fast enough for the intended use btw). The end result is, results are recorded at times unrelated to the trigger, and it generally iterates a few times per beep.

 

VI is attached, thanks for the help!!

0 Kudos
Message 5 of 9
(3,745 Views)

Hi tikihiki

 

If you want to read two channels I recommend you to see the Tektronix TDS 3000 Series Dual channel Waveform Acquire.vi example in that example they read two channels and they have a trigger. The only problem is that it does not run continuously so you will have to modify that example in order to run continuously.

 

When you place a loop like a for loop or a while loop is highly recommended to use a timing VI like this one Wait Until Next ms Multiple this allows the processor to run other tasks and slow down the speed iteration of the loop. Here is a picture.

wait until next.PNG

 

 

Also another way to control the data flow of your code is to add a case structure and have a some sort of selector or switch between the cases.

 

Regards

Esteban R.

0 Kudos
Message 6 of 9
(3,728 Views)

I solved the problem!! Basically, the trigger VIs that came with the driver only send the trigger commands to the scope. They don't have any way to wait for a trigger before acquiring data. So I ended up modifying the "Wait for Acquisition Complete". I had to change the query sent to the scope so that the program doesn't continue until the scope sends a "Trigger" command. It is working perfectly!

 

Now I have one more issue that seems like it would be simpler, but I cannot find the answer. As the loop runs, it is storing data an an indicator array. But after the loop is over, I need to do some things with the data, and I can't find any way to get output from it. It is storing the correct data and I can see it from the front panel, but I can't do anything with the data.

 

Thanks!

0 Kudos
Message 7 of 9
(3,715 Views)

Nvm, I got it...

0 Kudos
Message 8 of 9
(3,711 Views)

I am having the exact same problem.  Would you please show exactly how you fixed it?  Nothing I've tried works (except for inserting delays into that VI, but the delays have to change based on my signal frequency...), and I've tried a lot.

 

Thank you!

0 Kudos
Message 9 of 9
(3,631 Views)