LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control loop.vi wanted

Does anyone have a PID control loop.vi example that uses serial RS232 comunication, to share. I´t would really mean a lot to me
0 Kudos
Message 1 of 4
(3,424 Views)
You can find a simple PID controller inside a few of the DAQ Examples. In LabVIEW 6.1, go to Help>>Find Examples... and search on PID. Alternatively go to examples\daq\solution\control.llb. There is even one example that works without a DAQ board installed: Simple PID Demo.vi. I'll leave the serial communication up to you, but I don't imagine it will be very fast for control.

Regards,

Doug
0 Kudos
Message 2 of 4
(3,424 Views)
The future will tell me how well it will work, but I´m forced to use serial communication. And because of my poor labview skills I want to se how some one else solved it. This is why I want a specific PID control example.
0 Kudos
Message 3 of 4
(3,424 Views)
Hello,

I just finished a program that implements several PID controllers with serial communication. I can't send it to you right now but here is how it works:

It consists mainly of a while loop with shift registers. The shift registers are used to retain the previous time, error and error sum. (I use PID controller.vi available on this site).
For each loop, I read the process variable on the serial port then I send this variable and the setpoint to the PID controller. Then I use the output of the pid controller to set my process. This loop runs as long as I control the process.
The PID controller also output new time, error and error sum which are transfered by the shift registers and re-used by the controlled on the next iteration.

Contact me if you
want more details.

Martin St-Laurent, p.eng
Neosoft technologies inc.
mstlaurent@neosoft.ca
www.neosoft.ca
0 Kudos
Message 4 of 4
(3,424 Views)