MLMstInit

Pipe Network motion icon

 Function - Initializes a Master TMP generator block.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

-2147483648 to 2147483647

N/A

No default

ID name of the Master Block.

ModuloPosition

LREAL

No range

User units

No default

Modulo Position for cyclic motion systems expressed in user logical units (Position Rollover Value).

Period

LREAL

No range

Cycles

No default

Sampling period of the generator expressed according to the update cycle.

Example: 2.0 means the sampling is done once every 2 cycles.

Speed

LREAL

No range

User units

No default

Travel speed value expressed in user logical units per second.

Acceleration

LREAL

No range

User unit/sec2

No default

Acceleration value expressed in user logical units per second squared.

Deceleration

LREAL

No range

User unit/sec2

No default

Deceleration value expressed in user logical units per second squared.

InitialPosition

LREAL

No range

User units

No default

Initial position value expressed in user logical units.

Used only at the pipe activation to initialize the position starting point.

Modulo

BOOL

FALSE, TRUE

N/A

No default

The available modes are:

  • TRUE - Modulo
  • FALSE - No modulo

Outputs

Output

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

Returns TRUE when the function successfully executes.

See Function - General Rules.

Remarks

  • This function is automatically created when the MLMaster Block is included in the Pipe Network Editor.
  • Based on the parameters defined in the Master pipe block, the Inputs for this function are initialized by default.

Figure 1: TMP Initialization

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//Initialize  a Master Pipe Block named “MASTER” to a Modulo of 360, motion generator sample period of 1,Speed of 1000.0, Accel and Decel of 10000.0, Initial position of 0.0,
MLMstInit( PipeNetwork.MASTER, 360.0, 1.0, 1000.0, 10000.0, 10000.0, 0.0, true );