MLAddInit
Function - Initializes an Adder Pipe Block for use in a PLC Program with user-defined settings.
-
-
- Adder objects are normally created in the Pipe Network using the graphical engine.
- You do not have to add MLAddInit functions to their programs.
- Parameters are entered directly in pop-up windows; 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.
Inputs
|
Input |
Data Type See Data Types. |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
BlockID |
DINT |
1 to 1024 |
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 See Data Types. |
Range |
Unit |
Description |
|---|---|---|---|---|
|
Default (.Q) |
BOOL |
FALSE, TRUE |
N/A |
|
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







