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 Programmable Logic Controller, PLC, or Programmable Controller is 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 Program.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

-2147483648 to 2147483648

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

Default

Description

Default (.Q)

BOOL

N/A

N/A

No default

Returns TRUE if the Adder Pipe Block is initialized.

See Function - General Rules for more information.

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.

MLAddInit

Figure 7-61: MLAddInit

FBD Language

MLAddInit: FBD example

FFLD Language

MLAddInit: LD example

ST Language

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

See Also