MLGearWriteRatSlp
Function 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 Ratio Slope value of a selected Gear Pipe Block.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
BlockID |
DINT |
-2147483648 to 2147483647 |
N/A |
No default |
ID number of an initialized Gear Pipe Block. |
Slope |
LREAL |
No range |
1/sec |
No default |
New Ratio value to be assigned to the selected Gear Pipe Block.
|
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Default (.Q) |
BOOL |
|
|
Returns TRUE if the Ratio Slope value is changed in the selected Gear Pipe Block. See Pipe Network - General Rules for more information. |
Remarks
- Ratio Slope sets the limit at which step changes in ratio are implemented.
- The GEAR block output adds a position offset to the GEAR block input when using a RatioSlope.
- See RatioSlope Offset for examples.
-
-
Set the
RatioSlope < (Ratio * EtherCAT ***EtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs Update Rate)
.
The Gear block makes a jump (without a ramp) from one gear to the next when the RatioSlope is greater than the Ratio change factor multiplied by the update rate scale factor.
RatioSlope Offset
With Offset
- If MLGearWriteRatSlp is set as to generate a ramp (instead of a step) when going from a gear ratio of 1 to 2, there is a position offset when the gear ratio settles as 2.
- In this image:
- The ratio goes from 1.0 to 2.0.
- Green is PN Gear Block Output.
- Red is Gearbox Input.
|
Without Offset
If MLGearWriteRatSlp is set without a ramp, , there is no offset.
|
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//Set the Ratio Slope value of Gear1 Pipe Block to 100
MLGearWriteRatSlp(PipeNetwork.GEAR1, 100.0);
See Also