This function block activates master-slave coupling with the profile for an electronic cam specified in a cam table.
The library supports the following cam types (motion laws) via the CommonMotionTypes library (refer to ST_MultiCam and ET_CamType in the CommonMotionTypes library guide for details):
oStraight line
oSimple sine
oGeneral fifth degree polynomial
oStandard fifth degree polynomial
ST_MultiCam is the same data structure used by PacDrive3 and therefore can be created with the same cam editor.
The function block provides a ramp-in mechanism. The ramp-in mechanism is activated by setting the input SlaveStartMode to RampIn and configured via the inputs VelocityOffsetRampIn, AccelerationOffsetRampIn, DecelerationOffsetRampIn, and JerkOffsetRampIn.The ramp-in direction of a modulo axis can be set via the input RampInDirection.
Library name: PLCopen MC part 1
Namespace: PLCO
|
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. |
|
CamTableID |
MC_CAM_ID |
Identifier of the cam table to be used. The data type MC_CAM_ID is an alias of ST_MultiCam of the CommonMotionTypes library. Refer to the CommonMotionTypes library guide for details. |
|
BufferMode |
Default value: Aborting Buffer mode. Possible values: oValue Aborting oValue Buffered See MC_Buffer_Mode for a description of the values. |
|
|
Periodic |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. TRUE starts periodic mode for MC_CamIn. This mode repeats the execution of the cam on a continuous basis. FALSE starts the cam in single-shot mode. The slave axis position of the closest edge (first or last cam point) is frozen if it is outside the defined range, that is, the slave axis is at a standstill (but still in the state SynchronizedMotion) if the cam is outside the defined range. NOTE: Regardless of whether a cam is started in periodic or single-shot mode, it signals EndOfProfile, and a buffered motion job (if such a job exists) becomes active when EndOfProfile is reached (even if the cam is defined as periodic). |
|
MasterStartMode |
Default value: Absolute Possible values: oValue Absolute oValue Relative See MC_Master_Start_Mode for a description of the values. |
|
|
SlaveStartMode |
Default value: Relative Possible values: oValue Relative oValue RampIn See MC_Slave Start_Mode for a description of the values. |
|
|
RampInDirection |
Direction of ramp-in for coupling if the slave axis is a modulo axis. The direction is the direction to the absolute target of the ramp-in mechanism (where MC_CamIn is considered to be InSync) from the position of the slave axis, not the Y period of the cam profile. If the slave axis is not a modulo axis, the values for this input have no effect. Default value: PositiveDirection Possible values: oValue PositiveDirection: oValue NegativeDirection oValue ShortestWay See MC_Direction for a description of the values. |
|
|
VelocityOffsetRampIn |
LREAL |
Value range: -2147483648...2147483647 Default value: 0 Velocity offset for ramp-in mechanism in user-defined units. |
|
AccelerationOffsetRampIn |
LREAL |
Value range: Any positive LREAL value Default value: 0 Acceleration offset for ramp-in mechanism in user-defined units. |
|
DecelerationOffsetRampIn |
LREAL |
Value range: Any positive LREAL value Default value: 0 Deceleration offset for ramp-in mechanism in user-defined units. |
|
JerkOffsetRampIn |
LREAL |
Value range: Any positive LREAL value and zero oPositive values: Jerk limit (in units/s3) (maximum jerk with which the acceleration is modified). oZero: Jerk limit disabled. The acceleration instantaneously jumps from zero to maximum acceleration (infinite jerk). Default value: 0 |
|
Output |
Data type |
Description |
|---|---|---|
|
InSync |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oTRUE: If the axes are coupled and the cam is processed. |
|
Busy |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Function block is not being executed. oTRUE: Function block is being executed. |
|
Active |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: The function block does not control the movement of the axis. oTRUE: The function block controls the movement of the axis. |
|
CommandAborted |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Execution has not been aborted. oTRUE: Execution has been aborted by another function block. |
|
Error |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. oFALSE: Function block is being executed, no error has been detected during execution. oTRUE: An error has been detected in the execution of the function block. |
|
ErrorID |
ET_Result |
This enumeration provides diagnostics information. |
|
EndOfProfile |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. TRUE: After the last segment of the cam has been completed. |
|
RampInDuration |
TIME |
Indicates the time remaining until the ramp-in procedure is completed and the output InSync is set to TRUE. |
As opposed to the specifications of PLCopen Motion Control Part 1, Version 2.0, the library does not provide a separate function block MC_CamTableSelect. The cam table is specified as an input of MC_CamIn.
The library does not provide a separate function block MC_CamOut. A running function block can be replaced by any other function block.
This function block provides high flexibility for both absolute and relative movements. For example, there is not necessarily a relation between the modulo of a master (or slave) axis and the application period of a cam in X (or Y) direction. Therefore, offset corrections can be applied on the fly by slightly adjusting the application period of the cam profile in X or Y direction. This would not be possible with the axis modulo which cannot be modified while the axis executes a function block.
|
ErrorId |
Cause |
Corrective |
|---|---|---|
|
AxisInErrorStop |
Function block cannot be executed because an axis error has been detected and the axis is in operating state ErrorStop. |
Verify that the axis is not in the operating state ErrorStop when attempting to start a new function block. |
|
AxisInvalid |
No axis is specified for the input Axis or specified axis does not support the required function. For MC_Touchprobe and MC_AbortTrigger: Specified axis does not support capture. |
Connect the axis for which the function block is to be executed to the input Axis. For MC_Touchprobe and MC_AbortTrigger: Use an axis that supports capture. |
|
AxisIsDisabled |
Function block cannot be executed because the axis is the operating state Disabled. |
Verify that the axis is not in the operating state Disabled when attempting to start a new function block. |
|
AxisIsStopping |
Function block cannot be executed because an MC_Stop function block is active and the axis is in the operating state Stopping. |
Verify that the axis is not in the operating state Stopping when attempting to start a new function block. |
|
IfMotionCommandNotSupported |
The connected axis does not support all of the required functions. |
Verify that the connected axis implements the IF_MotionCommand interface of the MotionInterface library. |
|
InvalidC |
One of the points of the electronic cam has an invalid C value. |
C is the value of the next curved segment of the electronic cam. Permissible values for C: 0 < C ≤ 1. |
|
InvalidCamTableID |
The definition of the electronic cam is invalid. |
Verify that a correct cam table is provided for MC_CamIn via the input CamTableID. |
|
InvalidK |
One of the points of the electronic cam has an invalid K value. |
K is the curvature of the electronic cam at the position for which K is defined. The value must be 0 for a simple sine (ET_CamType = SimplSin) and for a general fifth degree polynomial (ET_CamType = Poly5Com). |
|
InvalidLambda |
One of the points of the electronic cam has an invalid Lambda value. |
Lambda is the value of the next cam segment preceding the inflection point. Permissible values for Lambda: 0 < Lambda < 1. |
|
InvalidM |
One of the points of the electronic cam has an invalid M value. |
M is the slope of the electronic cam at the position for which M is defined. |
|
MasterAxisNotHomed |
The master axis has not been homed. |
Running MC_CamIn with mcAbsolute for MC_Master_Start_Mode requires a homed master axis. |
|
MasterInvalid |
The object at the input Master is invalid. |
Provide a valid reference to the axis for which the function block is to be executed (object from Devices tree such as an axis or an encoder). |
|
NoBusCommunication |
The fieldbus is not in the state Operational (Sercos: phase 4). |
Verify that the fieldbus is in the state Operational (Sercos: phase 4) at the rising edge of the input Execute and during the execution. |
|
OutOfMemory |
Insufficient memory for movement command. |
Reduce the memory required by your application. |
|
UnexpectedReturnValue |
Indeterminable return value from system. |
Contact your Schneider Electric representative. |