LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize measurement data based on an input analogue signal as trigger?

Hello,

I am using a DAQ (NI USB 6351) to record my signals. AI 0 records a sinusoidal measurement signal and AI 4 is a trigger ramp signal. I’m trying to synchronize the start of the measurement signal to a voltage level based on the ramp signal. In other words, I would like the measurement signal to start recording and save to a text file only when the trigger signal satisfies the voltage condition of: .

Currently, the measurement signal is not triggered properly, observed with the recorded voltage level from text file, where the starting voltage (at time = 0 sec) ranges from 3.5 to 2 V.

 

Is this problem caused by DAQ2 (Received ramp signal) sending in data faster before the comparison operation has been carried out? Or ..? How to fix this ..?

 

Please see attachment for the current VI build.

 

Thank you for the help,

Best,

0 Kudos
Message 1 of 4
(2,852 Views)

Hello,

I am using a DAQ (NI USB 6351) to record my signals. AI 0 records a sinusoidal measurement signal and AI 4 is a trigger ramp signal. I’m trying to synchronize the start of the measurement signal to a voltage level based on the ramp signal. In other words, I would like the measurement signal to start recording and save to a text file only when the trigger signal satisfies the voltage condition of: 2.5 V <= Measurement signal <= 2.7 V.

 

Currently, the measurement signal is not triggered properly, observed with the recorded measurement signal from text file, where the starting voltage (at time = 0 sec) ranges from 3.5 to 2 V. 

 

Is this problem caused by DAQ2 (Ramp signal) sending in data faster before the comparison operation has been carried out? Or ..? How to fix this ..?

 

Please see attachment for the current VI build.

 

Thank you for the help,

Best,

 

 

0 Kudos
Message 2 of 4
(2,874 Views)

Your code makes no sense. The dynamic data out of the first comparison has only two possible values (coerced back to a DBL number of either 0 or 1), so comparing it to a fractional number is pretty pointless.

 

Why don't you use more defined datatypes instead of dynamic data?

 

 

 

0 Kudos
Message 3 of 4
(2,845 Views)

In your DAQ Assistant, there is a Trigger tab.  Use that to set up an analog trigger on your signal at the level you want.


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
(2,835 Views)