MLAddWriteInput

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. - Sets the source of an input of an adder Pipe Block.

Inputs

Input

Data Type

Range

Unit

Default

Description

BlockID

DINT

-2147483648 to 2147483648

N/A

No default

ID number of an initiated Adder object.

InputID

DINT

1, 2

N/A

No default

Select first or second input to the Adder object.

InputBlockID

DINT

-2147483648 to 2147483648

N/A

No default

ID number of an initiated Pipe Block. This is an input to the 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

N/A

Returns TRUE if the input to the Adder object is set.

See Function - General Rules for more information.

Remarks

  • Function block is automatically called if an Adder Block is connected to other blocks in the Pipe Network.

MLAddWriteInput

Figure 7-66: MLAddWriteInput


  • Adder objects are normally created in the Pipe Network using the graphical engine.
    You do not have to add MLAddWriteInput function blocks to their programs.
    Blocks are connected with lines in the Pipe Network.
    The code is automatically added to the current project.

FBD Language

MLAddWriteInput: FBD example

FFLD Language

MLAddWriteInput: LD example

ST Language

//Set the first input of an Adder pipeblock to be connected to the output of GEAR1 pipeblock
MLAddWriteInput( PipeNetwork.ADDER, 1, PipeNetwork.GEAR1 );

See Also