Determine Scan Time in ControlLogix


How to Determine Scan Time in ControlLogix

There are several ways to Determine Scan Time in ControlLogix. One way is to simply look in RSLogix / Studio 5000. The properties of the task will tell us the max scan time, and last scan time. Another way is with the GSV Command. We can store the scan times to a tag.

It’s important to realize that every scan will be different. Basically, the scan time is the time it takes the processor to execute your logic top to bottom. Each task has it’s own scan time that we can monitor.

Obviously, the lower our scan time is, the faster the processor can react.

Factors that Influence Scan Time

In ControlLogix, you can have up to 32 tasks. Only one of these tasks can be Continuous. On the other hand, others can be Periodic or Event tasks. There are many things that can influence your scan time. Let’s concentrate on the continuous tasks for now. Some of the factors that can influence the time of the continuous tasks include:

  • Speed of your processor
  • Length of your logic
  • Background tasks, and cleanup
  • Frequency of periodic (or other) task execution
  • Length of other periodic (or other) tasks that interrupt the continuous task

Generally, it’s not just the main task that can be interrupted. When you set up a period task, you assign it a priority. If a periodic task is executing, and it’s time for a higher priority task to execute, it will interrupt the periodic task. For this reason, we cannot even guarantee the execution time of a periodic tasks.

Determine Scan Time in ControlLogix with Studio 5000 / RSLogix 5000

One way to determine the scan time is to go to the properties of a task. Simply right click a task in the controller organizer window. After that, click the “Monitor” tab.

Although every scan is different, we can get an idea of what our scan times are. This is actually a periodic task. As you can see, my scan time for this task runs around 5ms.

Furthermore, let’s flip over to the “Configuration” Tab. This will show our watchdog set point. It’s important to realize that if we exceed this watchdog set point, the processor faults. Although you can change the watchdog set point, exceeding this value usually indicates a problem in your logic. It could be that you are creating an infinite loop somewhere.

Determine Scan Time with the GSV Command

Occasionally, we want the program to know it’s own scan time. We might need this for certain integral calculations. We can also display this to the operator using an MMI device such as a PanelView.

For example, we’ll get the Last Scan time of our task. First, we’ll create a tag called “LastScan”. The data type is DINT.

At this point, we’ll add a GSV Command to our logic. The class is “Task”. Obviously, the Instance name will be the task that you wish to get the scan time for. In this case, the Attribute is “LastScanTime”. You can choose from the list of options if you want MaxScanTime, or some other attribute. We store the result to the tag we created called “LastScan”.

As you can see, the LastScanTime is 5201 microseconds.

Summary of how to Determine Scan Time in ControlLogix

In short, the lower your scan time, the better. You can determine the scan time by using Studio 5000, or the GSV Command. There are some common sense ways to improve scan time such as increasing the periodic interval for less important tasks. Additionally, you can place less important logic into a periodic tasks that executes less frequently. Keep in mind that if you exceed the watchdog setp oint, the processor faults. Generally, if your logic exceeds the watchdog set point, something is wrong in your project.

For more information, visit the ControlLogix Category Page!

— Ricky Bryce

Leave a comment

Your email address will not be published. Required fields are marked *