I am using TSN to synchronize multiple cDAQ-9185. All cDAQ-9185 in a line topology, also known as daisy chaining.
All devices are placed into one task, using DAQ Start Trigger(Time).vi to start at a future time. But when I use 6 chassis, the start time should set to 6 senconds, otherwise, the task return error -209840. The explanation given in this link is as follows,
This error occurs when the default Time Start Trigger delay used by DAQmx is not long enough to allow the network of FieldDAQs to finish all of their configurations. To avoid this error, manually increase the time for the Time Start Trigger to a value further in the future by adding additional delay to the trigger, so that all FieldDAQs will have time to complete configuration. Note that the configuration time varies depending on the network topology and the number of FIeldDAQs in the system.
I have several questions,
1. What’s the difference using “DAQ Start Trigger(Time).vi” or not?
2. How can reduce the start time? Manually Synchronize Multiple Devices with Separate Tasks?
Solved! Go to Solution.
The reason your task configuration may take a significant amount of time and result in this error is because under the hood, DAQmx needs to adjust timing on all the measurements you've requested to ensure they're synchronized. These adjustments can take several seconds to complete in systems with a high channel count or multiple chassis in the same task. As you've seen, if you set the start time trigger to execute before task configuration is complete, DAQmx can't satisfy the time trigger and reports that it has been set in the past (relative to when task configuration completes.)
To reduce start time, manually synchronizing multiple tasks is an option. This essentially allows you to perform the task configuration yourself and reduces the complexity of tasks by having fewer devices that require synchronization in a single task. For systems with several chassis (more than 2 or 3), we usually recommend setting up a task for each chassis because this improves reliability and doesn't overload a single task with configuring a large number of channels.
Is there anywhere in the knowledge base or forums where that recommendation is documented? It would be helpful to understand why larger tasks are an issue and what the alternative, recommended configuration would look like.
Thanks for your reply.
As I See in this link, one analog input task will use one of the AI timing engines. One cRIO has 8 AI timing engines, so does this mean that I can only use up to 8 chassis, with every chassis has one task?
I have 1 cRIO and 7 cDAQs, each with 2 9239 and 2 9222. How do I synchronize the 9239 and 9222 separately in the system?
This is a best practice that we've developed after seeing customer applications and issues customers have had with our C Series products in the time since it has been released. I don't believe we currently have external documentation that makes this recommendation, but I expect we will have that documentation soon. When we do, I'll link it on this thread.
Each cDAQ also has timing engines, as described by this document:
The cRIO is not controlling the low-level measurements on each of those targets, it is controlling high-level DAQmx operations (stop, start, set properties, etc.) and collecting data from them when it's available. The cDAQs are doing the actual measurements.I don't expect the availability of timing engines to have an effect on your application.
Thanks, Austin. I'll keep an eye on the thread. We've integrated a few systems with multiple cDAQs, and we've definitely seen longer sync times, more frequent "loss of sync" messages, etc., as we increase the number of additional chassis in the configuration. I'm curious to see what the NI recommended topologies and sync strategies will be for larger multi-chassis systems.
Here's the whitepaper update I was referring to:
There's a small section at the bottom of section 3. that discusses possible caveats when putting a lot of channels in the same task. We don't talk much about topology in this document, but I made the update so I'm curious to get your feedback on what unanswered questions you have or what related problems you've encountered.
I programmed according to the way in Figure 12 of the link to solve the problem of error -209840 under multiple chassis.
I have 1 cRIO and 6 cDAQs, each with 1 pieces of NI 9239, each acquire 1 channel.
First, Below is my program, finite sampling, sampling frequency 50kHz, collecting 5000 points.But I still get the error -209840 unless I set the time trigger delay to be greater than 7s.
Sencond, as the card in 7 chassis all are NI 9239 with the same Reset Time, so all the Start Times are equal to the Synchronization Pulse plus Reset Time. When the vi running it reports an error of -209841. I delayed the Start Time by 0.2 sampling period and the error is eliminated.
Third, I think Figure 10 and Figure 12 in the reference above are reversed.
The Environment in the cRIO is as follow,
Thanks a lot.