FunctionMLGearWriteRatioPipe Network motion icon

Description

Set the Ratio value of a selected Gear Pipe Block.

The output of a Gear Block = Input value * Ratio + Offset


  • Values lower then 1.0 can be entered, but require a leading zero (for example 0.8 instead of .8)

Arguments

Input

BlockID

Description

ID number of an initialized Gear Pipe Block

 

Data type

DINT

 

Range

[-2147483648, 2147483648]

 

Unit

n/a

 

Default

Ratio

Description

New Ratio value to be assigned to selected Gear Pipe Block. Values lower then 1.0 can be entered, but require a leading zero (for example 0.8 instead of .8)

 

Data type

LREAL

 

Range

 

Unit

n/a

 

Default

Output

Default (.Q)

Description

Returns TRUE if Ratio value is changed in the selected Gear Pipe Block

See more details here

 

Data type

BOOL

 

Unit

n/a

Return Type

BOOL

Related Functions

MLGearReadRatio

MLGearInit

Example

Structured Text

 

//Set the Ratio value of Gear1 Pipe Block to 5

MLGearWriteRatio(PipeNetwork.GEAR1, 5.0);

 

Ladder Diagram

MLGearWriteRatio: LD example

Function Block Diagram

MLGearWriteRatio: FBD example

Go back to the top of the page [Top]