08-19-2010 12:04 PM
I am using several NI digital I/Os. Depending on the state of the control they are on/off and all in a loop ~30-40Hz.
What happens to the hardware and CPU usage when I force the output to go ON 40 times a second and it is already ON? I do not know what happens between my soft and the end of the hardware.
My guess would be that nothing - neither the hardware or the CPU is bothered much with the same request but I might be wrong.
I am talking about "DAQmx Write" and "SET INHIBIT MOMO.flx" It is run on a NI PXI platform. I kind of want to minimize the CPU usage.
Thanks
Solved! Go to Solution.
08-20-2010 11:08 AM
Howdy Andy,
There is no difference in CPU usage between calling DAQmx Write for "ON, ON, ON, ON, ON, etc..." versus "ON, OFF, ON, OFF, ON, etc..." Everytime time DAQmx Write is called it sends the new sample to the hardware buffer to be output regardless of what is already there. DAQmx does not keep track of the current state of your output in software so if you want to prevent DAQmx Write from being called 40 times unnecessarily you will need to implement your own bookkeeping system in software.
Regards,