LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize Data Acquisition while reading faster than synchronization signal

Solved!
Go to solution

Hello everyone,

 

i am looking for a solution for this problem.

 

We are measuring a multiplexed laser signal with a camera.
While we have the multiplexed signal, external,( laser 1, laser 2, background) we want to make a single measurement during each of those peaks for the other sensors (all Analog Ins). 
But we can only get the signal for the first multiplexed signal (laser 1) to synchronize the data acquisition. We use the rising edge of that signal to synchronize the data acquistion cycle.

We know the length of the cycle, for this example 1s. Once we get that first peak we want to manually tell the system to make a measurement at 1/6s, 3/6s and 5/6s, after that first peak and then start again once we get the next peak.

While it is possible to use this signal as an external source, i have only achieved a measurement with that rising edge and not during the rest of the cycle.
I have looked into using Daqmx Triggering, but that has only resulting in the first peak being used to synchronize at the beginning once.

(I found the option to set Triggering as retriggerable, but only for X-Series)

 

We are using a PXIe-6124 (and have a PXI-6289 as backup)

I will appreciate any advice. Thanks! 

0 Kudos
Message 1 of 3
(822 Views)
Solution
Accepted by topic author P_s_11

You can do this by pairing up a counter task with your AI.

 

The counter task can be a retriggerable finite pulse train and the AI task can use the counter output as its sample clock.  This example is a good starting point.

 

Ideally, one would be able to carefully choose 'initial delay' as well as 'low time' and 'high time' to place the output pulses exactly where you want them.  But a lot of NI's devices, especially older ones, only use 'initial delay' for the very first trigger and not on subsequent ones.  Here's more info (and a possible, but somewhat more complex workaround).

 

What'll probably be best is to set 'initial delay' and 'low time' to be ~1 microsec short of 1/6 sec while setting 'high time' to 1 microsec.  Configure for 5 pulses per trigger.  Then when you read the AI data, you can ignore the extra samples at 2/6 and 4/6 sec and keep only the ones you want at 1/6, 3/6, 5/6.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 3
(784 Views)

Perfect, thank you very much.

 

This is exactly what i was looking for.

 

Tried it and its working, had to check how to route the counter signal and now it is working exactly as intended.

 

Thanks again for the quick answer!

 

0 Kudos
Message 3 of 3
(737 Views)