MLDerInit

Pipe Network motion icon

 Function - Initializes an derivator object.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

1 to 1024

N/A

No default

ID number of a created Pipe Block.

ModuloPosition

LREAL

0 to 1.0x10300

User units

No default

Value of the period of a cyclic system expressed in User units.

  • The parameter INPUT_MODULO_POSITION is defined to correctly manage the periodicity (modulo) of the input values.
  • 0 (zero) indicates the input signal does not use the modulo operation.

Example: If the input value increases each millisecond by one (degree), then the output value is a thousand (degrees per second).

  • If the input value skips suddenly from 359 to 0:
    • If VALUE PERIOD = 360, the output continues to indicate 1000 (degrees per second).
      • This indicates that the roll-over into the next period has been properly handled.
    • If VALUE PERIOD = 1000, the output indicates -359,000 (degrees per second).
      • This indicates that the input has incorrectly interpreted roll-over as a 359 degree change in input in one millisecond.

Outputs

Input

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

Remarks

  • Function block is automatically called if a Derivator Block is added to the Pipe Network, with user-defined settings entered in the Pipe Blocks Properties screen.
  • Input ModuloPosition is defined to manage the periodicity (modulo) of the input values.

  • Derivator objects are normally created in the Pipe Network using the graphical engine.
    You do not have to add MLDerInit function blocks to their programs.
    Parameters are entered directly in pop-up windows and the code is automatically added to the current project.

Figure 1: MLDerInit

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//Create and Initiate a Derivator object 
MyDerivator := MLBlkCreate( 'MyDerivator', 'DERIVATOR' );
MLDerInit( MyDerivator, 360.0 );

See Also