LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need a loop that will run when the new waveform has been triggered

The oscilloscope is the LeCroy_64xi WaveRunner.

We are using LabVIEW 2014 SP1.

 

The problem I am having is that the waveforms being saved is based on a delay and a trigger level condition, but not a newly triggered waveform. If I set the trigger level condition to 5V then the waveforms will be saved every second (the value I set the waveforms per second function (Hz)) as long as the oscilloscope has a waveform that is greater than 5V.

 

I need the waveforms to be saved only if the waveform has been triggered. 1 file per triggered waveform.

 

Does anyone have any suggestions? I dont have any ideas.

0 Kudos
Message 1 of 2
(2,387 Views)

I'm not sure I understand your problem, but have some suggestions.

  • Start by removing the Write to Measurement File from your Loop.  You don't want to do this (relatively-time-consuming) task in the same loop as your data acquisition.
  • Now that you have a "pure DAQ" loop, does the triggering and loop logic make sense?  I'm mystified why you have a Waveforms/second control driving your Wait function.  A pure DAQ loop will run at the speed of the DAQ device, so if there are no triggers, it won't run at all, and if the triggers come faster than the DAQ task (which I can't determine from your code), then triggers will be skipped.
  • Once you have the DAQ loop functioning as you wish, look up Producer/Consumer design pattern (you can find it by starting LabVIEW, clicking File/New ... (the dots are important), and navigating to From Template/Frameworks/Design Patterns and choose the Producer/Consumer Design Pattern (Data).

Bob Schor

0 Kudos
Message 2 of 2
(2,378 Views)