Hi everyone.
I am trying to acquire signals coming from two National Instrument modules (NI 9234 and 9219) which are docked to the same cDAQ 9174 chassis.
The problem is : on the one hand, the 9234 is a high-speed Delta/sigma converter module, which lowest sample rate is 1651.6129Hz. On the other hand, the 9219 is a slow-sampled module, which sample rate cannot exceed 100Hz.
According to this page, it is possible to do what I am looking for. When measuring the same signal on both channels of NI Measurement and Automation eXplorer software, I experience what is described (the 9234 acquires data at the chosen sample rate while the 9219 acquires data as fast as it can and replicates samples to fill the gaps). So, what I am trying to do is possible (Yay !) I am looking to do this with Matlab Data Acquisition Toolbox solution (NI Max cannot save the recorded data). However, I have trouble because the sampling rate is defined for the session. Creating a session with channels coming from both 9234 and 9219 results in the following warning messages :
Warning: A channel that does not support on-demand operations was added to the session. On-demand operations using inputSingleScan and outputSingleScan will be disabled. Only clocked operations using startForeground and StartBackground can be done.
Warning: The Rate property was increased to 1651.6129 due to changes in the session configuration. Warning: A channel that does not support clocked sampling was added to the session. Clocked operations using startForeground and startBackground will be disabled. Only on-demand operations using inputSingleScan and outputSingleScan can be done.
Warning: This property must be the same for all channels on this device. All channels associated with this device were updated.
The resulting session has an authorized sample rate ranging from zero to zero... I do not know inputSingleScan very well but it does not seem well-fitted for continuous data acquisition.
To overcome this, I tried to create two data acquisition sessions : s0 (sampled at 6400 Hz, with a channel from 9234) and s1 (sampled at 100 Hz, with a channel from 9219). However, starting these sessions separately results in a ~800ms delay between channels (I guess it is the initialization time of the first session for which I use startBackground).
Does someone know a trick to help me ? Either a way to create a DAq session with several sampling rates, or a solution to start acquisition on two sessions simultaneously ?
I tried to use the addTriggerConnexion function to trig one session with the other one. I am quite a beginner with DAq Toolbox but it does not seem to work (given that both my modules are connected to the same 9174 chassis, the source and destination of the trigger are on the same device, resulting in an error).
Thanks in advance,
Lionel