09-11-2023 01:59 PM
In the past I have tried achieve real time control of analog inputs/outputs and digital inputs/outputs using 1 sample on demand and a 10ms loop speed. This is possible when using NI6009 hardware and works great.
Recently I have been trying to achieve the same with a cDAQ chassis and appropriate cards. However I'm only able to achieve loop speeds of say 50ms which is too slow for some of the operations I'm trying to perform.
I tried rewriting my code by using continous samples and reading a small buffer and utilising the regenerate function for the AO. But it's just getting too complicated messing with arrays rather than just single samples.
Is this slow read/writing in 1 sample on demand with the cDAQ chassis down to the latency stack up with the USB, cDAQ chassis and then each module? Where as with the NI6009 the data is simply transfered too and from the card?
I really want to stick with cDAQ as it gives flexibility with the different modules that can be used. However it's just too slow with 1 sample on demand.
Would a cRIO be quicker? If so is it possible to use the cRIO without FPGA and still achieve faster 1 sample on demand speeds than a cDAQ?
I don't want to share my code. It works fine with the ni6009, I really only want to know if the cRIO hardware would perform as fast as the ni6009? But with the module flexibility of the cDAQ
I'm only trying to achieve 1 sample on demand every 10ms which in the grand scheme of things isn't that fast.
Solved! Go to Solution.
09-11-2023 03:11 PM
Is this slow read/writing in 1 sample on demand with the cDAQ chassis down to the latency stack up with the USB, cDAQ chassis and then each module? Where as with the NI6009 the data is simply transfered too and from the card?
This is indeed the case.
Using cRIO will definitely improve the latency drastically because cRIO has its own controller. You can get cRIO-904x/905x which supports DAQmx. They can run DAQmx API at 5 kHz. You can even use NI-DAQmx Hardware-Timed Single Point mode which is designed for point-to-point control.
09-12-2023 02:20 AM
Thanks. I will give it a go