ControlLogix Totalizer (TOT)


Introduction to the ControlLogix Totalizer (TOT)

The ControlLogix Totalizer (TOT) tracks the total amount of a product. In this example, we’ll have an input of barrels / second. However, you can change the time base of the instruction to reflect minutes, or hours. The ControlLogix Totalizer (TOT) is available in Function Blocks or Structured Text.

Keep in mind that the totalizer’s input is a RATE. Emphatically, it is not counts.

The Totalizer has two main modes: Program Mode, and Operator Mode. The Intention of Program Control Mode is for the program to control the totalizer. In other words, the logic can start, stop or reset the totalizer. On the other hand, the operator can take control of the totalizer, and manually perform these actions. Likely, the operator will be using an HMI (Human Machine Interface).

As time progresses, the totalizer’s output will keep track of the total number of barrels. Remember, we base this on a flow rate. You can reset the count at any time. The totalizer will also show you the last counts it has accumulated before the reset.

Create your Function Block Routine

Obviously, if you don’t already have a function block routine, we’ll need to create that. Right click on a program folder, and create a new routine. Be sure to set the type as Function Block. Keep in mind that if this is a subroutine, we need to add a JSR. Typically, we add the JSR to the MainRoutine. In this case, I will simply create a routine called “Barrels”.

Add Your Logic

At this point, we’ll add a Totalizer instruction. We’ll do this in the Barrels Routine. Remember that if you are doing this online, you need to start pending routine edits. At the same time, I’ve create a tag called “Barrels”. It’s data type is DINT. This tag will simulate a flow rate coming from an analog module. Furthermore, I’ve connected the IREF of the Barrels tag to the IN of our Totalizer.

Configure the ControlLogix Totalizer (TOT) Instruction

In addition to adding the TOT to our routine, we must configure the instruction. Click the grey square at the upper right corner. This will display the properties.

First, we’ll configure the time base. Enter 0 if your flow rate is in barrels/second. Likewise, if your rate is barrels/minute, enter 1. Enter 2 for an hourly rate.

Secondly, we’ll look at the Gain. This is simply a multiplier for the output. In this case, we’ll leave the gain at 1.

Thirdly, we have the reset value. After a reset, the output will go to this value. We’ll leave this on zero.

Next, we have the target and deviations. Configure these if you wish to energize a bit when the output reaches a certain point. Likewise, you might configure the deviation values to give you an alarm. You might use these to warn the operator that you are getting close to the target output.

Finally, we have a low cutoff. When the Input rate is below a certain value, we can stop the totalizer with this cutoff value.

Controlling the Instruction

Keep in mind the totalizer has two modes: Program Control mode and Operator Control Mode. In this case, we’ll take program control mode. Since we don’t have logic writing to these tags, we’ll control this from the properties screen. Normally, you would run tags into the instruction face. Obviously, this allows the program to control the totalizer.

In the properties, let’s turn on ProgProgReq. This means that we are generating a request from the program. This request will enter program control mode.

Be sure to hit enter. Next, turn on the ProgStartReq bit. ProgResetReq should be set to 0. Again, hit ENTER, then APPLY. At this point your totalizer will run.

I’m going to enter a value of 60 into our “Barrels” Tag. This will simulate a flow rate of 60 barrels/minute.

Resetting the Counts

At any time, we can energize ProgResetReq, and the total counts will move to the OldTotal tag. Your counts will reset, and start over at the reset value. In this case, that is 0.

Keep in mind that whenever you change a value in the properties screen you must hit “Enter”. After that, press apply, to accept your changes.

Summary

In short, the totalizer’s input is a rate. The totalizer simply calculates the total product over time based on this rate. You can control the totalizer by either entering program control mode, or operator mode. Additionally, you can configure deviation targets as a warming to the operator.

For more ControlLogix information, visit the category page!

— Ricky Bryce

Leave a comment

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