From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-21-2010 05:34 PM
I have attached a simplified vi of the CD&sim loop producing this lag. It has about 1.5 to 1.8 second delay from the time the "i" value in the control is changed until the DAQ actually outputs the signal. This seems excessive, and I need to reduce this to under .5 seconds.
Is this a problem with the software configuration or the DAQ hardware?
04-21-2010 07:59 PM
Is there a reason you are using a control simulation loop?
You might be having problems with your abuse of local variables such as Relay 1 2 3 and 4. Why didn't you wire the results of the array manipulation directly to the DAQ assistants? It is probably taking an extra iteration of the loop before a change in relay 1 through 4 makes its way to getting to the DAQ card. I don't know how the simulation loop is supposed to work to know what its timing rate is.
Why the crazy array manipulations? You are indexing an array to get a boolean. Building it back into a 1 element 1-D array, then replacing that element with itself.
04-22-2010 09:10 AM
10-05-2010 06:10 PM
I'm waaaay late on this but it was not a software problem. You configured the sim loop to run with a 1 kHz clock and you set the period in the loop attributes to 1000. This will cause the simulation loop to execute once every 1000 clock ticks, which means once every second on a 1 kHz clock.
I'm also suspicious about you using a variable-step solver like RK23 with hardware timing. You should use a fixed step solver like RK1-4 with hardware timing if you want to achieve any semblance of real-time.