08-16-2022 10:46 AM
Hi!
In my current project i have two NI9220, one of them in a cDAQ-9181 and one in a cDAQ-9185.
The used aquisition rate on both is 10kS/channel.
I am using a DQMH structure, where one Module ist constantly aquiring Data (10 times per second 1000 Samples of each Channel of both NI9220 using one Taks for each NI9220) and sends them to the other modules by broadcast (Array of Waveforms). I'm using DAQmx and registered for one dynamic event when the NI9220 in the cDAQ-9185 has 1000 Samples available. In the event I read 1000 Samples of both NI9220.
I need NO real synchronization. The aquired Data are only used to calculate Mean/RMS values witch get compared between both modules afterwards (50Hz signals). So it does not matter if there is a time-offset between both NI9220. The "synchronization"-problem I'm currently facing is, that both modules are creating different amounts of data over long times (about 2.5 second in one day).
My first Idea to solve this was to check how many Samples are available from each NI9220 after I've read the 1000 Samples from both and if the difference is greater then "X" I discard "Y" Samples of the NI9220 which has more Samples available. Currently I do not know if this is a "good" solution and what "X" and "Y" should be.
Does anyone have a better solution or has implemented something similar?
Thank you!
08-16-2022 10:54 AM
Is there a reason you couldn't put both modules in the cDAQ-9185? Then you could just have 1 task to handle all of your channels and this would become a lot simpler.
08-16-2022 11:45 AM
If we are talking about two completely separate cDAQs, it means both run on different clock rates and hence the sampling rate will vary over time-based on each chassis' internal clock accuracy and drift.