This function block activates coupling of a master axis and a subordinate axis with a given gear factor between the position or velocity of the master axis and the subordinate axis, depending on the operating mode.
The subordinate axis synchronously follows the movement of the master axis (position or velocity synchronicity).
The inputs RatioNumerator and RatioDenominator let you set a user-specific gear ratio for the movement of the subordinate axis.
In the operating mode Cyclic Synchronous Position, the coupling is performed based on position values. For example, with a gear ratio of 1:2, the subordinate axis moves half of the distance of the master.
In the operating mode Cyclic Synchronous Velocity, the coupling is performed based on velocity values. For example, with a gear ratio of 1:2, the subordinate axis moves at half of the velocity of the master.
Input |
Data type |
Description |
---|---|---|
Master |
Axis_Ref |
Reference to the axis for which the function block is to be executed. |
Slave |
Axis_Ref |
Reference to the axis for which the function block is to be executed. |
Execute |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. This function block can be restarted while it is executed. The target values are overwritten by the new values at the point in time the rising edge occurs. |
RatioNumerator |
INT |
Value range: -2147483648...2147483647 Default value: 1 Numerator of gear ratio.
NOTE: The value 0 is invalid.
|
RatioDenominator |
UINT |
Value range: 1...2147489647 Default value: 1 Denominator of gear ratio. |
Acceleration |
LREAL |
Value range: A positive LREAL value Default value: 0 Acceleration in user-defined units. The value at this input is used to reach the specified target velocity (acceleration). |
Deceleration |
LREAL |
Value range: A positive LREAL value Deceleration in user-defined units. Default value: -1
NOTE: If the default value of -1 presented at the input Deceleration is used as a signal that the parameter has not been modified and therefore, the value at the input Acceleration is also used for the deceleration.
This is the threshold value of the acceleration during the ramp-in phase of MC_GearIn in case that the absolute value of the velocity of the subordinate axis decreases. |
OperationMode |
Operating mode for function block Default value: Position |
Output |
Data type |
Description |
---|---|---|
InGear |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
Busy |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
CommandAborted |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
Error |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
ErrorID |
This enumeration provides diagnostics information. |
The input Acceleration needs to be set to a value greater than 0 before the function block is executed.
The gear ratio can be modified during a movement. However, the new values are taken into account only with the next rising edge of the input Execute.
The subordinate axis uses the values for Acceleration and Jerk only during the first acceleration phase. The subordinate axis then follows the master axis.
If the operating mode is set to Velocity via the input OperationMode and if the drive is not able to operate in the operating mode Cyclic Synchronous Velocity, the function block MC_CamIn detects an error. The axis is not affected.
The library does not provide a separate function block MC_GearOut. A running function block can be replaced by any other function block.