MC_CamIn, MCP_CamIn – Engage the cam

Block SymbolsLicensing group: MOTION CONTROL
PIC PIC

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
PIC

PIC

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