MC_CamIn, MCP_CamIn – Engage the cam

Block SymbolsLicensing group: MOTION CONTROL
Qt SVG Document Exported by REXYGEN Studio uMaster uSlave CamTableID Execute MasterOffset SlaveOffset MasterScaling SlaveScaling StartMode BufferMode RampInFactor yMaster ySlave InSync CommandAborted Busy Active Error ErrorID EndOfProfile SyncDistance MC_CamIn Qt SVG Document Exported by REXYGEN Studio uMaster uSlave CamTableID Execute yMaster ySlave InSync CommandAborted Busy Active Error ErrorID EndOfProfile SyncDistance MCP_CamIn

Function Description

The MC_CamIn and MCP_CamIn 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 MC_CamIn block switches on a mode in which the slave axis is commanded to position which corresponds to the position of master axis transformed with with a function defined by the MCP_CamTableSelect block (connected to CamTableID input). Denoting the transformation as Cam(x), master axis position PosM and slave axis position PosS, we obtain (for absolute relationship, without phasing): PosS = Cam((PosM MasterOffset)MasterScaling) SlaveScaling + SlaveOffset. This form of synchronized motion of the slave axis is called electronic cam.

The cam mode is switched off by executing other motion block on slave axis with mode aborting or by executing a MC_CamOut block. The cam mode is also finished when the master axis leaves a non-periodic cam profile. This situation is indicated by the EndOfProfile output.

In case of a difference between real position and/or velocity of slave axis and cam-profile slave axis position and velocity, some transient trajectory must be generated to cancel this offset. This mode is called ramp-in. The ramp-in function is added to the cam profile to eliminate the difference in start position. The RampIn parametr is an average velocity of the ramp-in function. Ramp-in path is not generated for RampIn=0 and error -707 (position or velocity step) is invoked if some difference is detected. Recommended value for the RampIn parametr is 0.1 to 0.5 of maximal slave axis velocity. The parameter has to be lowered if maximal velocity or acceleration error is detected.

Inputs

uMaster

Master axis reference

Reference

uSlave

Slave axis reference

Reference

CamTableID

Cam table reference (connect to MCP_CamTableSelect.CamTableID)

Reference

Execute

The block is activated on rising edge

Bool

MasterOffset

Offset in cam table on master side [unit]

Double (F64)

SlaveOffset

Offset in cam table on slave side [unit]

Double (F64)

MasterScaling

Overall scaling factor in cam table on master side

Double (F64)

SlaveScaling

Overall scaling factor in cam table on slave side

Double (F64)

StartMode

Select relative or absolute cam table

Long (I32)

1 ....

Master relative

2 ....

Slave relative

3 ....

Both relative

4 ....

Both absolute

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)

RampIn

RampIn factor (0 = RampIn mode not used); average additive velocity (absolute value) during ramp-in process

Double (F64)

Outputs

yMaster

Master axis reference

Reference

ySlave

Slave axis reference

Reference

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

EndOfProfile

Indicate end of cam profile ( not periodic cam only)

Bool

SyncDistance

Position deviation of the slave axis from synchronized position

Double (F64)

Example
image/svg+xmlvelocity2 1 mode2 2 mode1 1 execute2 [execute2] execute1 [execute1] execute0 [execute0] direction2 1 deceleration2 0.2 axis_slave [axis_slave] axis_master1 [axis_master] axis_master [axis_master] acceleration2 1 SS 1 SO 0 SM 4 RF 0 MS 1 MO 0 MC_MoveVelocity − block 2 uAxisExecuteVelocityAccelerationDecelerationJerkDirectionBufferModeyAxisInVelocityCommandAbortedBusyActiveErrorErrorID MC_CamIn − block 1 uMasteruSlaveCamTableIDExecuteMasterOffsetSlaveOffsetMasterScalingSlaveScalingStartModeBufferModeRampInFactoryMasterySlaveInSyncCommandAbortedBusyActiveErrorErrorIDEndOfProfileSyncDistance MCP_CamTableSelect − block 0 uMasteruSlaveExecuteyMasterySlaveDoneBusyErrorErrorIDCamTableID

image/svg+xml0 1 2 3 4 5 6 7 8 9 10 0 0.5 1 Execute bool Block 0 execute (CamTableSelect) Block 1 execute (CamIn) Block 2 execute (MoveVelocity) 0 1 2 3 4 5 6 7 8 9 10 0 0.5 1 Active bool Block 1 active (CamIn) Block 2 active (MoveVelocity) 0 1 2 3 4 5 6 7 8 9 10 −100 −50 0 50 100 Acceleration acceleration Acceleration axis 1 − master Acceleration axis 2 − slave 0 1 2 3 4 5 6 7 8 9 10 −5 0 5 Velocity velocity Velocity axis 1 − master Velocity axis 2 − slave 0 1 2 3 4 5 6 7 8 9 10 0 2 4 6 8 Position position Position axis 1 − master Position axis 2 − slave

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