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