Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help measuring voltage with multiple separated triggers

Hi

 

I'm considering getting a NI DAQ for my project, where a single analogue voltage source (photodiode) is measured with 4 separated triggers.

 

The triggers are 1KHz, 25% duty square waves with 90 degree phase difference from their neighbor. I want 4 separated arrays of voltage continuously measured.

 

I have very limited experience with DAC because we usually just use lock-in, as most times we only have one trigger and we are only interested in the differential value between the trigger on/off (A-B).

 

This time I need to get the "differential differential value" ((A-B)-(C-D)), and the only way I can think of is to get all of them and calculate later.

 

Can I start 4 AI tasks in parallel on a single channel that is connected to the voltage source with those triggers ?

 

Do I need to use a 4KHz trigger instead ? However that way I cannot tell which is which since all of them will be in the same array.

 

If this is a suitable task for NI DAQ, could you recommend a model ? We don't a counter either. Is it better to have a separated counter or using a model with internal clock (63XX I believe ?). 

 

Thanks in advance.

 

 

0 Kudos
Message 1 of 4
(1,275 Views)

I *think* that what you mean by the term "trigger" is what is normally termed a "sample clock" for NI's DAQ boards.  Are you talking about capturing a sample each time one of these signals has a rising edge?

 

I don't think there's a super simple way to do what you want.  There's a somewhat advanced method that should work, but I can't walk through every detail of it.  Use my summary as a starting point to search out additional info.

 

1. All AI channels will need to be in 1 task.  All will get sampled on every pulse from the external signal.  You'll have to extract the specific samples of interest from this set that contains extras.

 

2. You'll need to pair up the AI task with a DI "change detection" task.  You'll capture the 4 external signals with the DI task, and you'll use its "change detect event" as the sample clock for the AI task.  The DI task should be set to be sensitive to rising edges.

 

3. You'll need to then start the AI task before starting DI.  Thereafter, you'll get both a DI sample and an AI sample on every rising edge of any of the external signals.  The DI sample data can be interpreted to figure out which of the 4 signals just changed, then you'll know which of the AI signals is the relevant one at that same sample number.

 

 

-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).



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

Thanks for replying.

 

Sorry I didn't explain clearly. They are triggers, not sampling clocks. When NI DAQ detect a rising edge in trigger, it should read N samples at the rate of sampling clock (this is the basis for 'integration time' I believe ?). Sampling clock should be a few MHz.

 

Should I setup a CO task as sampling clock, which is used for the AI task ? The AI task is then configured as retriggerable at 4KHz.

 

Then again comes the problem of separating those 4 sets of data... If I use DI to read triggers, there will be 4 1KHz samples. How do I make a 4KHz trigger from them ?

 

Also could you please help me with model selection ?

0 Kudos
Message 3 of 4
(1,248 Views)

Sorry for the long delay -- I was just now going through recent-ish threads I've been in and noticed that this was one I'd left hanging.

 

Most of what I said before still holds true.  You'll need a DI change detection task so you can map your 4 individual trigger signals into a single "change detect" signal.  You'll capture the digital state of the 4 individual trigger signals every time one of them changes.  Note that the task won't indicate which line changed, you'll have to track that yourself.  (And further, it can sometimes be tricky knowing what the initial digital state was, since the 1st sample is taken *after* the first change.)

 

You'll have an AI task that is "driven" by the  change detect signal.  Only now that I understand better, your AI task will use this signal as a Start Trigger.  You'll also need to use a DAQmx Trigger property node to set the AI task to be retriggerable.

    Further, the AI task should be set for Finite Sampling.  Be aware that as you look to sample up in the multi-MHz realm, not every *requested* sample rate is actually achievable.  The sample clock is derived by dividing down an internal timebase, 100 MHz if you use a 63xx X-series board.  3 MHz isn't possible.  Neither are 6,7,9,11, and so on.  Only integer divisors of 100 MHz.   However, DAQmx will automatically choose a supported sample rate by rounding to a neighboring integer divisor.  You can query the DAQmx Timing property node for Sample Rate to find out the *actual* sample rate.

 

As to DAQ device selection, I would point you toward a 63xx family X-series multifunction board.  You'll need to look through them to see which ones support the AI sample rates you'll want to use.  Other specs to consider in your selection: 

- # AO channels available (and supported output rates)

- # DIO lines on port0, available for hw-clocking (varies between 8 and 32)

 

 

-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).



0 Kudos
Message 4 of 4
(1,188 Views)