Hi, everybody.
I am now using CompactLogix platform (1769-L35E) to develop a regulation program. There are several PID loops in this application.
I want to decrease the amount of the PID loops used in the program. So I write a separated sub program containing one PID regulator(which I call it as COMMON PID). When I need to use PID regulation in main program somewhere, I use JSR command to translate the PID parameter PV,SP,P,I,D to the COMMON PID. After running the sub program one time, the output of the COMMON PID will return and the execution return to the transfer place. Then, if the main program need the PID regulation somewhere else, the same procedure occurs: transfer parameter, run PID one time and then return the PID output.
After I got this idea, I always feel there will be something wrong, but I cannot tell where the wrong will be.
Would somebody tell me if I can use the PID like this? If not, where is my mistake? Or what will happen if I use PID like this?
Thanks in advance!
Hope everybody has a nice day!!!
I am now using CompactLogix platform (1769-L35E) to develop a regulation program. There are several PID loops in this application.
I want to decrease the amount of the PID loops used in the program. So I write a separated sub program containing one PID regulator(which I call it as COMMON PID). When I need to use PID regulation in main program somewhere, I use JSR command to translate the PID parameter PV,SP,P,I,D to the COMMON PID. After running the sub program one time, the output of the COMMON PID will return and the execution return to the transfer place. Then, if the main program need the PID regulation somewhere else, the same procedure occurs: transfer parameter, run PID one time and then return the PID output.
After I got this idea, I always feel there will be something wrong, but I cannot tell where the wrong will be.
Would somebody tell me if I can use the PID like this? If not, where is my mistake? Or what will happen if I use PID like this?
Thanks in advance!
Hope everybody has a nice day!!!
Last edited: