02-12-2021 03:29 AM - edited 02-12-2021 03:29 AM
The query is on the dt(s) input. When I don't wire anything to it and place it inside a while loop running at 50ms , I see that it runs at the same 50ms ( dt out(s)). And if i wire anything like 0.01 s it runs at that speed. The query is how to force it to run at an optimum interval for the specific process ? The HELP file mentions that if -1 or 0 is wired to the dt(s) input then it calculates the time since it was last called.
I don't think I understand this point. And in a PID the interval at which correction is applied is an important parameter.
Any pointers on this ?
02-12-2021 03:37 AM - edited 02-12-2021 03:42 AM
Hi Raghunathan,
@MogaRaghu wrote:
When I … place it inside a while loop running at 50ms , I see that it runs at the same 50ms ( dt out(s)).
And if i wire anything like 0.01 s it runs at that speed.
The query is how to force it to run at an optimum interval for the specific process ?
I don't think I understand this point. And in a PID the interval at which correction is applied is an important parameter.
The PID runs with the interval of the loop around it!
When you set a different dt value then the internal ID calculations are just wrong…
You need to determine the "optimum interval" on your own and then set the loop to iterate at this interval. Usually the PID loop should be faster than the typical reaction time of the system you want to control…
Btw. you can look iniside the PID.vi to see what's going on!