MLAddInit

Pipe Network motion icon

 Function - Initializes an Adder Pipe Block for use in a PLC Program with user-defined settings.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

-2147483648 to 2147483647

N/A

No default

ID number of a created Pipe Block.

Ratio1

LREAL

No range

N/A

No default

Sets the Ratio value of the first entry of an Adder object.

Offset1

LREAL

No range

N/A

No default

Sets the Offset value of the first entry of an Adder object.

Ratio2

LREAL

No range

N/A

No default

Sets the Ratio value of the second entry of an Adder object.

Offset2

LREAL

No range

N/A

No default

Sets the Offset value of the second entry of an Adder object.

Outputs

Adder Block Output = Ratio1*Input1 + Offset1 + Ratio2*Input2 + Offset2

Output

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

Returns TRUE if the Adder Pipe Block is initialized.

See Function - General Rules.

Remarks


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

  • Function block is automatically called if an Adder Block is added to the Pipe Network.
    • User-defined settings are entered in the Pipe Blocks Properties screen.
  • The Pipe Block is assigned ratios and offsets for both inputs.
    • After an Adder block is initialized, the inputs need to be selected using the MLAddWriteInput function block or graphically using the Pipe Network.

Figure 1: MLAddInit

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//Create and Initiate a Trigger object 
MyAdder := MLBlkCreate( 'MyAdder', 'ADDER' );
MLAddInit( MyAdder, 1.0, 0.0, 1.0, 0.0 );

See Also