MC_GearInPos, MCP_GearInPos – Engage the master/slave velocity ratio in defined position

Block SymbolsLicensing group: MOTION CONTROL
Qt SVG Document Exported by REXYGEN Studio uMaster uSlave Execute RatioNumerator RatioDenominator MasterSyncPosition SlaveSyncPosition MasterStartDistance Velocity Acceleration Deceleration Jerk BufferMode SyncMode yMaster ySlave StartSync InSync CommandAborted Busy Active Error ErrorID SyncDistance MC_GearInPos Qt SVG Document Exported by REXYGEN Studio uMaster uSlave Execute yMaster ySlave StartSync InSync CommandAborted Busy Active Error ErrorID SyncDistance MCP_GearInPos

Function Description

The MC_GearInPos and MCP_GearInPos blocks offer the same functionality, the only difference is that some of the inputs are available as parameters in the MCP_ version of the block.

The functional block MC_GearInPos engages a synchronized motion of master and slave axes in such a way that the ratio of velocities of both axes is maintained at a constant value. Compared to MC_GearIn, also the master to slave position ratio is determined in a given reference point, i.e. following relation holds:

SlavePosition SlaveSyncPosition MasterPosition MasterSyncPosition = RatioNumerator RatioDenominator.

In case that the slave position does not fulfill this condition of synchronicity at the moment of block activation (i.e. in an instant of positive edge of Execute input and after execution of previous commands in buffered mode), synchronization procedure is started and indicated by output StartSync. During this procedure, proper slave trajectory which results in smooth synchronization of both axes is generated with respect to actual master motion and slave limits for Velocity, Acceleration, Deceleration and Jerk (these limits are not applied from the moment of successful synchronization). Parameter setting MasterStartDistance=0 leads to immediate start of synchronization procedure at the moment of block activation (by the Execute input). Otherwise, the synchronization starts as soon as the master position enters the interval MasterSyncPosition ± MasterStartDistance.

Notes:
1. The synchronization procedure uses two algorithms: I. The algorithm implemented in MC_MoveAbsolute is recomputed in every time instant in such a way, that the end velocity is set to actual velocity of master axis. II. The position, velocity and acceleration is generated in the same manner as in the synchronized motion and a proper 5th order interpolation polynomial is added to achieve smooth transition to the synchronized state. The length of interpolation trajectory is computed in such a way that maximum velocity, acceleration and jerk do not violate the specified limits (for the interpolation polynomial). The first algorithm cannot be used for nonzero acceleration of the master axis whereas the second does not guarantee the compliance of maximum limits for the overall slave trajectory. Both algorithms are combined in a proper way to achieve the synchronized motion of both axes.

2. The block parameters (execution of synchronization and velocity/acceleration limits) have to be chosen so that the slave position is close to SlaveSyncPosition approximately at the moment when the master position enters the range for synchronization given by MasterSyncPosition and MasterStartDistance. Violation of this rule can lead to unpredictable behaviour of the slave axis during the synchronization or to an overrun of the specified limits for slave axis. However, the motion of both axes is usually well defined and predictable in standard applications and correct synchronization can be performed easily by proper configuration of motion commands and functional block parameters.

Inputs

uMaster

Master axis reference

Reference

uSlave

Slave axis reference

Reference

Execute

The block is activated on rising edge

Bool

RatioNumerator

Gear ratio Numerator

Long (I32)

RatioDenominator

Gear ratio Denominator

Long (I32)

MasterSyncPosition

Master position for synchronization

Double (F64)

SlaveSyncPosition

Slave position for synchronization

Double (F64)

MasterStartDistance

Master distance for starting gear in procedure

Double (F64)

Velocity

Maximal allowed velocity [unit/s]

Double (F64)

Acceleration

Maximal allowed acceleration [unit/s2]

Double (F64)

Deceleration

Maximal allowed deceleration [unit/s2]

Double (F64)

Jerk

Maximal allowed jerk [unit/s3]

Double (F64)

BufferMode

Buffering mode

Long (I32)

1 ....

Aborting (start immediately)

2 ....

Buffered (start after finish of previous motion)

3 ....

Blending low (start after finishing the previous motion, previous motion finishes with the lowest velocity of both commands)

4 ....

Blending high (start after finishing the previous motion, previous motion finishes with the lowest velocity of both commands)

5 ....

Blending previous (start after finishing the previous motion, previous motion finishes with its final velocity)

6 ....

Blending next (start after finishing the previous motion, previous motion finishes with the starting velocity of the next block)

SyncMode

Synchronization mode (cyclic axes only)

Long (I32)

1 ....

CatchUp

2 ....

Shortest

3 ....

SlowDown

Outputs

yMaster

Master axis reference

Reference

ySlave

Slave axis reference

Reference

StartSync

Commanded gearing starts

Bool

InSync

Slave axis reached the cam profile

Bool

CommandAborted

Algorithm was aborted

Bool

Busy

Algorithm not finished yet

Bool

Active

The block is controlling the axis

Bool

Error

Error occurred

Bool

ErrorID

Result of the last operation

Error

i ....

REXYGEN general error

SyncDistance

Position deviation of the slave axis from synchronized position

Double (F64)

Example
image/svg+xmlvelocity3 30 velocity2 60 velocity1 30 syncMode 2 rationNumerator 2 ratioDenominator 1 position2 40 position1 100 mode3 1 mode2 1 execute3 [execute3] execute2 [execute2] execute1 [execute1] direction3 1 direction1 1 deceleration3 20 deceleration2 50 deceleration1 20 bufferMode1 1 axis_slave [axis_slave] axis_master1 [axis_master] axis_master [axis_master] acceleration3 50 acceleration2 50 acceleration1 50 SSP 20 MSP 20 MSD 10 MC_MoveAbsolute − block 3 uAxisExecutePositionVelocityAccelerationDecelerationJerkBufferModeDirectionyAxisDoneCommandAbortedBusyActiveErrorErrorID MC_MoveAbsolute − block 1 uAxisExecutePositionVelocityAccelerationDecelerationJerkBufferModeDirectionyAxisDoneCommandAbortedBusyActiveErrorErrorID MC_GearInPos − block 2 uMasteruSlaveExecuteRatioNumeratorRatioDenominatorMasterSyncPositionSlaveSyncPositionMasterStartDistanceVelocityAccelerationDecelerationJerkBufferModeSyncModeyMasterySlaveStartSyncInSyncCommandAbortedBusyActiveErrorErrorIDSyncDistance

image/svg+xml0 5 10 15 0 0.5 1 Execute bool Block 1 execute (MoveAbsolute1) Block 2 execute (GearIn) Block 3 execute (MoveAbsolute2) 0 5 10 15 0 0.5 1 Active bool Block 1 active (MoveAbsolute1) Block 2 active (GearIn) Block 3 active (MoveAbsolute2) 0 5 10 15 0 0.5 1 InSync bool Block 2 InSync (GearIn) 0 5 10 15 −100 −50 0 50 100 Acceleration acceleration Acceleration axis 1 − master Acceleration axis 2 − slave 0 5 10 15 −100 −50 0 50 100 Velocity velocity Velocity axis 1 − master Velocity axis 2 − slave 0 5 10 15 0 50 100 150 200 Position position Positon axis 1 − master Position axis 2 − slave

2024 © REX Controls s.r.o., www.rexygen.com