07-24-2013 01:48 PM
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
07-24-2013 05:22 PM
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 . . .