Rockwell PID Execution Time: the Difference Between Continuous and Periodic Tasks

Have you ever seen an Integral Term on a PID controller that seems an order of magnitude larger or smaller than what should be used?  Often, the issue stems from the method in which logic is executed on the Process Automation Controller (PAC). More specifically, when the PID block is executed in the PAC it needs to match the update time configured in the PID block. For instance, if the PID Block’s update time is set to 500 milliseconds, the rung on which the PID block is located also needs to execute at 500 milliseconds.  If the PID block is executed significantly faster than its configured update time during a PID controller tuning session, it can be expected that the outcome will leave something to be desired from a controller performance standpoint. What’s more, since the issue stems from a data mismatch, commercial PID loop tuning software won’t be able to provide a better answer.

The root of the problem is frequently linked to the way in which the ControlLogix PAC’s ladder logic is executed. It’s not uncommon for the PID block to be configured to run as a continuous task versus a periodic task.  While the two modes are similar, there are important differences that directly affect how the PID functions and how it can be tuned for improved performance. Read on to learn more about these two types of tasks and what is considered best-practice for loop tuning.

Continuous Tasks

Like the name suggests a continuous task runs in an uninterrupted manner. If a technician needs a section of logic to run all the time, then the logic should be configured for operation as a continuous task. That will cause the logic to run continuously in the background, and it will divert CPU power from other operations such as motion, communication, as well as periodic or event-specific tasks. Once a full scan of the controller is completed the task will restart and run again immediately. It’s worth noting that multiple continuous tasks cannot be run simultaneously on a controller. Only one continuous task can be run at a time.

Periodic Tasks

As may be expected a periodic task runs intermittently. If an engineer needs to run a section of logic on a scheduled basis within the scan of other logic, then a periodic task is the way the controller should be configured. The periodic task causes controller functions to be performed according to specified intervals. When the designated time arrives a periodic task will first interrupt all other tasks that have a lower priority and then perform its operation. Upon its completion the task will then permit the other lower priority tasks to resume where they left off. It’s considered best-practice to use periodic tasks rather than continuous tasks when tuning PIDs.  If a periodic task isn’t possible, a timer prior to the PID block can be used to fire the PID block at the correct interval. If the scan rate for a controller’s task is set to “continuous,” then the task will execute the PID logic as quickly as possible and without regard for the actual sample rate of the PID. The timing associated with a continuous task usually varies between 15-30 milliseconds, while most PID controllers are set with a fixed update time of 500 milliseconds.  Such a mismatch can result in significant difference in how the Integral and Derivative math is calculated.

It’s important for practitioners who use the ControlLogix PAC to be aware of the different types of tasks and their use. That’s especially true if they intend to tune PID control loops using software or any model based tuning method.

If your plant utilizes the ControlLogix PAC from Rockwell Automation, click here to learn more about the problem and the solution.

These resources offer related content:

Iconic-Mark_Inverted-Color

What Options Exist for Tuning Emerson DeltaV Controllers?

Tuning Technologies that Integrate with the DeltaV DCS and Handle Highly Variable ‘Everyday’ Process Conditions are Available Emerson’s DeltaV distributed control system (DCS) dominates much of North America’s process manufacturing market and beyond.  For good reason engineers routinely rank it among the top supervisory control...
Shutterstock_1048930442

What Role Should CLPM Play in a Process Manufacturer’s Intelligent Operations Strategy? How Does CLPM Contribute to Improved Process Health and Asset Health?

PID control loops are critical in the regulation of plant-floor production processes. The health of these loops serves as an indicator of the wellness of a facility’s overall production process and its ability to operate efficiently. This suggests that investing in control loop performance monitoring...
Iconic-Mark_Inverted-Color

Data Collection Speed is Key to the Accurate Interpretation of Process Dynamics

  Data Collection Speed Determines Whether or Not KPIs Can Accurately Assess Individual PID Control Loop Health and Plant-Wide Production Performance If you’re old enough to remember silent movies, then you know what it’s like to see the characters seemingly jiggle around the screen. Black...

Still looking for more?

Now that you’ve gotten the basics, connect with our team to learn how our people, processes and technologies can help you optimize.