Topic: DMD0143

SLOPE - Calculate Slope


The Calculate Slope (SLOPE) instruction is used to calculate the slope of the line between two points. The first point is the value of the specified input that is recorded when the instruction is enabled, the second point is recorded at the end of the Sample Time.

 

Each time the calculation is made the first point is set equal to the second point and a new second point is recorded at the end of the next Sample Time. This process of computing the slope and shifting to the next point continues as long as the instruction is enabled.

 

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 that is changing. This can be any readable numeric location.

 

Sample Time - specifies the period (in milliseconds) that the slope 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 Cycle Time will be normalized to its 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 readable numeric location.

 

Slope - designates a location to store the calculated slope. This can be any writable numeric location.

 


Status Display:

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

 


See Also:

 


Rung Example: