Using one PID Instruction for several loops.

On lines where I have 20 or more temperature PID's, I generally break them down so I am only calling two or three of them each pass through the periodic task.

I generally have the PID/PIDE update time set for one second, and run that periodic task every 60 or 100 ms.
 
On lines where I have 20 or more temperature PID's, I generally break them down so I am only calling two or three of them each pass through the periodic task.

I generally have the PID/PIDE update time set for one second, and run that periodic task every 60 or 100 ms.

The update time set into the PID should be equal to the actual period at which the instruction gets executed for best results.

After all, the PID is an instruction which does calculations based on time, and it needs to know the interval since it did its last set of calculations to be able to assimilate the Integral and Derivative terms.

I put PIDs on a "cycle-count" also, to spread the PID instructions' executions over several cycles, but I always engineer it so that each PID gets executed at the time interval I put into the PIDs .Update parameter.

e.g. a "cycle" of 5, in a periodic task set at 100mS, means that each PID gets executed at 500mS intervals, that goes into each PIDs .Update parameter.
 
Yah, I guess I should have made that clear.
Normally, what I do, is define a real tag, and call it "task_PID_Update", and set that to a convenient value, example 1 second as a default. I pass that to each individual PID/E instruction, then decide how many ways I want to break them down.

Finally, in the periodic task scheduler, I take the actual task rate (from a GSV), multiply it by the number of 'phases' I want to execute the PID's in, and then update the task_PID_Update value so all the loops have a proper value.

I guess describing it is complicated, but it makes sure that
A) There is a default value for the first run,
B) The tuning remains consistent even if I add or subtract scan phases for the loops,
C) The tuning remains consistent even if I change the periodic task cycle time.
 

Similar Topics

I have a Micrologix 1200 and this is my first attempt to use a PID instruction. I have it "working" but it is extremely slow to reach the...
Replies
17
Views
6,615
I have a burner that uses two fuel sources. Currently we only have one PID tag that runs the fuel controls for the active burner, but if we...
Replies
6
Views
2,167
Hi everyone, I have a problem with EN2TR during I using the EN2TR web page. I was trying to use EN2TR web via connecting thru E-TAP and go thru...
Replies
1
Views
1,257
Is there a way to create proportional logic for a control valve without using a PID function? I want to create a simple P controller without...
Replies
8
Views
2,633
Hi Everyone! My name is Vidy and I am new to PLC AND PLC PROGRAMMING As Part of my final year project I have been tasked to program a PID...
Replies
5
Views
3,044
Back
Top Bottom