MC_GearIn
The MC_GearIn function block accelerates the slave axis to a velocity value equal to the Master Velocity x Ratio Numerator / Ratio Denominator. This function block commands the slave axis in position control mode by calculating the position command every scan based on the commanded velocity of the axis. Position synchronization with a master axis cannot be achieved using this function block alone.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Master | AXIS_REF | A logical reference to the master axis. | |
| B | Slave | AXIS_REF | A logical reference to the slave axis. | |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. | FALSE |
| B | RatioNumerator | DINT | Gear ratio numerator. | DINT#0 |
| B | RatioDenominator | DINT | Gear ratio denominator. | DINT#1 |
| E | Acceleration | LREAL | Value of the acceleration in user units/second^2 (acceleration is applicable with same sign of torque and velocity) | LREAL#0.0 |
| E | Deceleration | LREAL | Value of the deceleration in user units/second^2 (deceleration is applicable with opposite signs of torque and velocity.) | LREAL#0.0 |
| E | Jerk | LREAL | Not supported; reserved for future use. Value of the jerk in [user units / second^3]. | LREAL#0.0 |
| E | BufferMode | MC_BufferMode |
Defines the behavior of the axis - allowable modes are Aborting, Buffered, BlendingLow, BlendingPrevious, BlendingNext, and BlendingHigh. |
MC_BufferMode#Aborting |
| VAR_OUTPUT | ||||
| B | InGear | BOOL | Set high when the axis first reaches the specified gear ratio (function is complete). The output will remain high and only go low when an MC_Stop or MC_GearOut function block is executed. | |
| E |
Busy | BOOL | Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error) |
|
| E | Active | BOOL | For buffered modes, this output is set high at the moment the block takes control of the axis. For non buffered modes, the outputs Busy and Active have the same value. | |
| E | CommandAborted |
BOOL | Set high if motion is aborted by another motion command or MC_Stop. This output is cleared with the same behavior as the Done output. | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. |
|
Notes
- This function references the commanded position of the master axis. If the master axis is an external encoder, or if the master is an axis on the motion network which is disabled, then the actual position is referenced.
- The slave accelerates up to the ratio of the master velocity and becomes "InGear" when the ratio is reached. Compensation for any position relationship lost during the acceleration phase is not provided during synchronization. Use when maintaining a position relationship is important. MC_GearInPos
- The gearing ratio can be changed while MC_GearIn is running, using a consecutive MC_GearIn command or re-triggering the 'Execute' input without the necessity to first MC_GearOut. The InGear output is only set high the first time the specified ratio is reached.
Error Description
Refer to the Function Block ErrorID List
Example 1
MC_GearIn executed to gear Axis1 and Axis2 as the Master and Slave, respectively. The gear ratio is 2:1 so Axis2 will travel two times as fast as Axis1.
The LogicAnalyzer timing for the above example is shown below: