Gear
|
Name |
Description |
|
Initializes a Gear Pipe Block with user-defined settings and for use in a PLC program. |
|
|
Returns the Offset value of a selected Gear Block from the Pipe Network. |
|
|
Returns the Offset Slope value of a selected Gear Block from the Pipe Network. |
|
|
Returns the Ratio value of a selected Gear Block from the Pipe Network. |
|
|
Returns the Ratio Slope value of a selected Gear Block from the Pipe Network. |
|
|
Sets the Offset value of a selected Gear Pipe Block. |
|
|
Sets the Offset Slope value of a selected Gear Pipe Block. |
|
|
Sets the Ratio value of a selected Gear Pipe Block. |
|
|
Sets the Ratio Slope value of a selected Gear Pipe Block. |
Purpose
The purpose of the Gear block is to amplify / attenuate (with a ratio) and shift (with an offset) the flow of values.
- A Gear may have a ratio and offset less or greater than one, or even zero.
- Ratio and offset may be changed dynamically during application execution.
- A slope may be specified to limit the rate at which step changes in ratio and offset are implemented.
Parameters
|
Parameter |
Description |
|
Modulo |
Modulo mode adapts the output values according to the ModuloPosition (modulo).
|
|
Offset |
Input offset of a new Gear Pipe Block.
|
|
OffsetSlope |
User-defined limit at which step changes in Offset are implemented.
|
|
Ratio |
Ratio coefficient of a new Gear Pipe Block.
|
|
RatioSlope |
User-defined limit at which step changes in Ratio are implemented.
|
Output = Ratio * Input + Offset
Examples: Gear Functions
The output value starts with offset = 0 and gain = 1 (blue line). (Figure 1)
Figure 1: Offset = 0 and Gain = 1
Call the MLGearWriteOff function to modify the Offset.
This is where Offset_Slope is set with the MLGearWriteOSlp function. (Figure 2)
Figure 2: Offset_Slope set with MLGearWriteOSlp
After setting the Offset (Q=TRUE in the previous figure), call the MLGearWriteRatio function to modify the gear Ratio.
This is where Gain_Slope is set with the MLGearWriteRatSlp function. (Figure 3)
Figure 3: Gain_Slope set with MLGearWriteRatSlp
The output value is adapted with the gear offset and ratio (blue line). (Figure 4)
Associated Data
- OutputValue: Output value of the data flows.
- IsReady: Boolean set to TRUE when the pipe block is ready.
- INPOS: reserved for debugging purposes.








