MLPhaInit
Description
Initializes a phaser Pipe Block. Returns TRUE if the function succeeded.
This function block is automatically called by the FunctionA 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. PipeNetwork(MLPN_CREATE_OBJECTS) if a Phaser Block is added to the Pipe Network, with user-defined settings entered in the Pipe Blocks Properties screen.
The Phaser Pipe Block is assigned a Name, OUTPUT_PERIOD, PHASE, PHASE_SLOPE_TYPE, and STANDBY_VALUE.
Arguments
Input
BlockID |
Description |
ID Name of a Phaser function block in the Pipe Network |
Data type |
DINT |
|
Range |
[-2147483648, 2147483648] |
|
Unit |
n/a |
|
Default |
— |
|
ModuloPosition |
Description |
Rollover Position of the Phaser block |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit |
|
Default |
360.0 |
|
Phase |
Description |
Amount of Phase adjustment |
Data type |
LREAL |
|
Range |
— |
|
Unit |
n/a |
|
Default |
0.0 |
|
UseUserSlope |
Description |
Setting determines if Max Slope or user-defined slope is used |
Data type |
BOOL |
|
Range |
0, 1 |
|
Unit |
n/a |
|
Default |
Max Slope |
|
PhaseSlope |
Description |
User-defined slope for making the phase adjustment |
Data type |
LREAL |
|
Range |
— |
|
Unit |
User unit/sec |
|
Default |
0.0 |
|
StandbyValue |
Description |
This value is output from the Phaser Block, when the pipe is active, until the MLPhaWritePhase function is executed. |
Data type |
LREAL |
|
Range |
— |
|
Unit |
n/a |
|
Default |
0.0 |
Output
Default (.Q) |
Description |
Returns True if the function block is successfully executing See more details here |
Data type |
BOOL |
|
Unit |
n/a |
Related Functions
Example
Structured Text
//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 );
Ladder Diagram
Function Block Diagram