Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

digital analog synchronisation

Hi

We have a system using a PCI6052-E which is set up to read two analog channels at a sample rate of 133kHz. We now need a digital input to be synchronized with the analog channels so that we know on which analog sample a digital transition occurred. Is this possible using the in built counters or is there a way to tie the analog sample clock to a digital sample clock? Will either of these options limit the maximum sampling rate we can run at?

Any suggestions greatly appreciated.

James

0 Kudos
Message 1 of 5
(3,543 Views)
Hello James,
 
If I understand you correctly, you want to use your digital signal as the sample clock for your analog acquisition.  If this is the case, you can just specify your timing source for your AI task to be external, select what terminal you want to connect your signal to (PFI 1, PFI 2, etc.) and then physically connect your digital signal to the appropriate pin.  This shouldn't affect your maximum sampling rate, but you can consult the E Series Users Manual to verify.
Eric
DE For Life!
0 Kudos
Message 2 of 5
(3,527 Views)
Hi Eric

Thanks for the help. Unfortunately this won't work for us because the digital transitions are comming in at a much slower rate than we need to sample on the analog signal. The digital signal is from an encoder pulse on a motor that is spinning at ~60rps. We get two pulses per revolution and are assuming that the angluar velocity is constant between encoder pulses. We want to use these pulses to determine the location of the motor for each of the analogue samples.

Can we set up a counter to count the number of analogue samples captured between encoder pulses, or is there a better way to do this?

best regards

James
0 Kudos
Message 3 of 5
(3,521 Views)

Brief outline of concept:

- Configure counter to use analog sample clock as its timebase source (the signal that causes count register to increment).

- Configure counter to use encoder pulse as its sampling clock (aka "Gate" for buffered measurement in traditional NI-DAQ).

- Start counter task before analog input task, so that counter sees every sample clock edge.

- A little processing.  Example: find out the encoder position (in # of pulses) at ai sample # 123456.  Use function with name something like "Threshold 1D Array" which has an output called "fractional index."  Feed in the array of buffered count values and the number 123456.  Round the fractional index down to the next lowest integer.  That rounded index value is the encoder pulse count you want.  Scale as needed.
 
There's also a way to capture a count with every ai sample, but it's going to give you ~1000 reps of each count value between increments.  Less processing though, and possible preferable if you need to do calcs on-the-fly.  Might require use of DAQmx and "duplicate count prevention" property.
 
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(3,514 Views)
Hi Kevin

That sounds like it would work for us. Thankyou very much for your help.

best regards

James
0 Kudos
Message 5 of 5
(3,506 Views)