MLPhaInit

Pipe Network motion icon

 Function - Initializes a phaser Pipe Block.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

1 to 1024

N/A

No default

ID name of a phaser function block in the Pipe Network.

ModuloPosition

LREAL

0 to 1.0x10300

User units

No default

  • Rollover position of the phaser block output signal.
  • 0 (zero) indicates the output signal does not use the modulo operation.

Phase

LREAL

No range

N/A

No default

The amount of phase adjustment.

  • The phase value can be negative.
    • A negative phase value is subtracted from the input value.
  • Phase is expressed in User units.

UseUserSlope

BOOL

FALSE, TRUE

N/A

No default

  • Determines if the maximum slope or user-defined slope is used.
    • FALSE indicates the phaser block should use maximum slope.
    • TRUE indicates the phaser block should use user-defined slope.

PhaseSlope

LREAL

No range

User unit/sec

No default

  • User-defined rate at which phase changes are implemented.
    • Expressed in user logical units per second.
  • A slow rate parameter is used to limit the implementation of step changes of phase.

StandbyValue

LREAL

No range

N/A

No default

  • The output signal value assumed by the phaser output when the phaser is in a stopped condition.
  • Expressed in user logical units.
  • This is the output from the Phaser Block until the MLPhaWritePhase function is executed.

Outputs

Input

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

Remarks

  • Returns TRUE if the function succeeded.
  • This function block is automatically called by the Pipe Network(MLPN_CREATE_OBJECTS) if a Phaser block is added to the Pipe Network.
    • User-defined settings are entered in the Pipe Blocks Properties screen.
  • The Phaser Pipe Block is assigned a Name, OUTPUT_PERIOD, PHASE, PHASE_SLOPE_TYPE, and STANDBY_VALUE.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//Initialize  a Phaser  Pipe Block named “PhaseAdjust” to a Modulo of 720, phase offset value of 30, use the Max Slope
MLPhaInit( PipeNetwork.PhaseAdjust , 720, 30, false, 30 , 10 );

See Also