MLDerReadInModPos

Pipe Network motion icon

 FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Returns the Input ModuloPosition of the derivator block.

Inputs

Input

Data Type

Range

Unit

Default

Description

ID

DINT

-2147483648 to 2147483648

N/A

No default

ID number of an initiated Derivator object.

Outputs

Output

Data Type

Range

Unit

Default

Description

ModuloPosition

LREAL

No range

User units

No default

Current Input ModuloPosition of the selected Derivator object.

Remarks

Input ModuloPosition is defined to manage the periodicity (modulo) of the input values.

Example

If the input value increases each millisecond by one degree then the output value is 1000 degrees per second.

Suddenly, the input value skips from 359 to 0 (zero).

  • Input ModuloPosition = 360, the output continues to indicate 1000 degrees per second.
    • This indicates that rollover into the next period has been properly handled
  • Input ModuloPosition = 1000, the output then indicates 359,000 degrees per second.
    • This indicates that the input has incorrectly interpreted roll-over as a 359 degree move in one millisecond.

MLDerReadInModPos

Figure 7-91: MLDerReadInModPos



  • The first calculation of a Derivator Pipe Block just after the pipe installation indicates 0 (zero) regardless of the initial input value.

FBD Language

MLDerReadInModPos: FBD example

FFLD Language

MLDerReadInModPos: LD example

ST Language

//save the current input MODULO_POSITION of a Derivator object 
DerInputPeriod := MLDerReadInModPos ( PipeNetwork.MyDerivator );

See Also