Topic: DMD0138

INTEGRAT - Integrate Over Time


The Integrate Over Time (INTEGRAT) instruction is used accumulate the value of the specified input location (this is typically a rate value) at a specified time interval. A typical example where this instruction is used flow meters where the number of rotations of the rotor is counted by a pulse transmitter and converted to volume and flow rate.

 

The instruction always integrates at a per-second rate, regardless of the Sample Time. The Sample Time changes the interval at which it integrates, and adjusts the amount added accordingly. For example:

 

Assume Scale Factor is 1 and Input is fixed at 1.

If Sample Time is 10000, then every 10.000 seconds, Integrate Into will add 10 to Integrate Into.

If Sample Time is 1000, then every 1.000 second, Integrate Into will add 1 to Integrate Into.

If Sample Time is 100, every .0100 milliseconds, Integrate Into will add 0.1 to Integrate Into.

 

The calculation performed at each Sample Time is:

Integrate Into = Integrate Into + (Input * (current Sample Time in seconds) * Scale Factor).

 

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Input - designates the location that contains the value to integrate. This can be any readable numeric location.

 

Sample Time - designates the period that the integral value will be calculated while the instruction is enabled.
 

  • Constant - specified using the Time format (HH : MM : SS : mmm).

    The maximum Sample Time value in this form is 569 hours, 31 minutes, 23 seconds, and 647 milliseconds. If needed, the value entered for the Sample Time will be normalized to it's standard value. For example, if you entered a value of  97 Seconds, that value will be converted and displayed as 1 Minute and 37 Seconds.

    When editing the Constant Preset value, the following keystrokes are available to make entering the value easier and faster:

    • h - takes you to the Hours field

    • m - takes you to the Minutes field

    • s - takes you to the Seconds field

    • mm - takes you to the Milliseconds field

 

  • Variable - designates a location that contains the total number of milliseconds desired for the Sample Time. This can be any positive integer between 0 and 2147483647 or any readable numeric location.

 

Scale Factor - specifies a scale factor that will be applied during the integral calculation. This can be any constant value or any readable numeric location. Normally this value is calculated based on the time units of the Input, and the desired units of the Integrate Into parameter.

 

Integrate Into - designates a location to store the integral value. This can be any writable numeric location.

 


Status Display:

The yellow triangle in the upper left corner indicates this is a Multi-Scan instruction.

 

This instruction has the following two ladder logic input legs:

 

The first input leg (EN) enables and disables the integration process. If this input logic is ON, the instruction will begin integrating. When this input logic is OFF, the instruction will stop integrating, but the Integrate Into value will retain it's current value. If this input logic comes back ON, the instruction will resume the integration process.

 

The second input leg (RST) is the Reset. If this input logic is ON the instruction will reset the Integrate Into value to 0.0.

 


See Also:

 


Rung Example: