LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering Hysteresis to calculate Average

I'm trying to create a file that will calculate the past 1 second of data from channel two (current) based on the input of channel 1 (voltage). The voltage will be at a steady state (approximately 2 V) and drop to 0 which should trigger recording the average. I'm having trouble getting the trigger to work effectively. It should record the last second before the voltage drops to 0 and average that but it currently doesn't record anything.

 

VI file attached for reference, there are a couple different attempts at this so it's still a little messy.

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

Hi,

 

Have you looked at the 'Basic Level Triggering of Waveforms.vi' that ships with LabVIEW? This example VI can be found by going to Example Finder in LabVIEW (Help >> Find Examples). You could use this code by creating a case structure which takes the average of a signal when the triggering conditions are true. You can also search for 'Hysteresis' in Example Finder to find other relevant examples to look through.

 

Also, see Figure 14. of this tutorial for more information about hysteresis triggering: Tips and Techniques in Data Acquisition Triggering - NI-DAQmx

 

Josh

Applications Engineer

National Instruments 

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