I have a program that updates CTR/TMR channels for variable PWM signals at 1 Hz. As the title of the thread states, the function call for the update takes longer over time. It isn't a continuously increasing amount of time. It seems to be in steps. This is messing with the timing of my application.
Here is the function call:
I put a timer around this call using clock(); I started the test at 8:35 yesterday. By 21:35 it was 68 ms, and by this morning around 23 hours later it was 890 ms.
For now I am going to get around it by only calling the function if there is a change in duty cycle for any of the channels. I may also need to pass it off as a thread. I would still like to know why it is becoming less efficient over time. The DAQ device is a cDAQ 9401 on a USB 9178 chassis.