MLAddWriteRat2

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. - Set the ratio value of the second entry of the Adder 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.

Ratio

LREAL

No range

N/A

No default

Desired new value for the Adder Object's Ratio2.

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 Ratio value for input two is set.

See Function - General Rules for more information.

Remarks


  • Changes made to the Ratio of an Adder block are executed immediately and can cause an axis position to jump.

  • Ratio2 amplifies the value of the second input to the block before its added to the first input.

MLAddWriteRat2

Figure 7-70: MLAddWriteRat2\

FBD Language

MLAddWriteRat2: FBD example

FFLD Language

MLAddWriteRat2: LD example

ST Language

//Change the ratio value of second entry to the Adder block to 2 
MLAddWriteRat2 ( PipeNetwork.MyAdder, 2 );

See Also