From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ sampling problem

Hi , As part of my project I should acquire digital and analog channels and output them using Mixed signal graph.I use 6363 OEM. I should use the sampling rate of 2MS/s for the digital lines . I acquire analog and digital lines continously in the same loop but I can not use this sapling rate for the analog channels and so I should reduce the sampling rate to 100k for analog channels.

Now because of the sampling rate there is a delay between changes on digital channels and analog channels. Could you please let me know if there is a way to use 2 different sampling rates and still be abale to sync analog and digital channels?

As can be seen in the picture both pink(digital) and white (analog) are sup[posed to change states at the same time but now they are out of sync.

 

Thanks

 

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

It looks like you are acquiring the same signal or sychronized signals, so this is not about synchronizing the tasks, just the display correct?

 

You could actually sychronize the task (check out sychnronization under DAQmx in the NI Example Finder) and then make sure that you're displaying the same time frame for each signal.  I.E. if you're sampling at at 2MS/s for the digital task and 15 kHz for the analog task, you can grab 2 M samples at a time from the digital graph and 15K samples at a time from the analog task and you should see the same second on your graph for both signals.

 

Otherwise you should be able to read out both tasks as waveforms.  If you do that you will have a start time for each bit of data, so you just need to offset the signals so that the data syncs up by timestamp.  I'm not sure if the Mixed Signal graph will do that for you automatically or not . . . 

Chris
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 2
(1,920 Views)