MLAddInit

Pipe Network motion icon

 FunctionClosed A 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. - Initializes an Adder Pipe Block for use in a PLCClosed Programmable Logic Controller - A digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events. ProgramClosed The act of performing a sequence of instructions or commands. 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.

Offset1

LREAL

No range

N/A

No default

Sets the Offset value of the first 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.

Ratio1

LREAL

No range

N/A

No default

Sets the Ratio 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.

Outputs

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

Output

Data Type

Range

Unit

Description

Default (.Q)

BOOL

 

 

Returns TRUE if the Adder Pipe Block is initialized.

See Pipe Network - General Rules.

Remarks

  • 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