LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control loop slows down during execution.

Hi, I am a attaching a LV8.6 code that i am currently using to control my engine experiment. I use PID control where the input signal is an rpm value that i measure using a counter. The ttl signal from the sensor is not clean and so i use an analog trigger to generate pulses on the counter from where i measure the frequency and hence the rpm. The output is generated as an analog voltage on an output channel. The problem i am facing is that the loop runs really good when i start off but gradually the loop keeps slowing down and this greatly affects my ability to control engine speed. I am not sure why this is happening. I tried increasing the sample size and rate (so as to increase the buffer size) but this didnt have any effect on the speed. I am guessing its a problem with the way i have my loops setup.. any suggestions would be greatly appreciated.

Thanks, Shyam.

0 Kudos
Message 1 of 2
(2,664 Views)

Hi all..I realised my mistake soon after posting as usually is the case:)..the create channel vi for doing the analog output to the output channel was within the loop and slowing things down..when i moved it out..it fixed the problem!!

Shyam.

0 Kudos
Message 2 of 2
(2,640 Views)