|
UNINTENDED EQUIPMENT OPERATION |
Verify that the physical position of the slave axis at the start of the cam matches the position in the cam definition to help avoid position jumps if you use the slave start mode Absolute. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
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.
The function block lets you implement interpolated cams. Two types of interpolated cams are available:
oLinear interpolation
oInterpolation with Poly5 cam law
The cam is interpolated from an array of cam points. To use an interpolated cam, create an array in your application with a minimum of 3 points and a maximum of 10000 points.
Linear interpolation:
The array describes the function of the cam (Y = f(X)). The values you specify for the array are the Y coordinates of the cam points. These Y values are equidistantly distributed along the X axis (which means that the X coordinates are determined by the function block). The array values are assigned in ascending order to the individual points from left to right, starting with the lowest array index as the lowest X value.
Interpolation with Poly5 cam law:
The array describes the function of the cam in terms of the master position (X), the slave position (Y), the velocity at the cam point (V, corresponds to the slope), and the acceleration at the cam point (A, corresponds to the curvature). Use strictly monotonically increasing values for X.
To start an interpolated cam, set the input InterpolationPoints to the address of the array where the cam points are stored. If the input InterpolationPoints is not equal to zero on a positive edge of the input Execute, the function block MC_CamIn starts an interpolated cam as parameterized via the input InterpolationParameter. Data provided via the input CamTableID is ignored. If the input InterpolationPoints is equal to zero on a positive edge of the input Execute, the function block starts the cam and ignores the data provided via the input InterpolationParameter.
The data type MC_Interpolation_Parameter is used to parameterize the interpolated cam. It is an alias of the structure ST_Interpolation_Parameter of the MotionInterface library. Parameterization:
oudiNumCamPoints
Number of array entries filled with cam points. If the array is bigger than the amount of filled cam points, additional array elements are ignored.
olrMinMasterPosition and lrMaxMasterPosition
For an array for linear interpolation, the position range of the master is set via lrMinMasterPosition and lrMaxMasterPosition. The cam point in the lowest array index corresponds to lrMinMasterPosition. The cam point in the array index set via udiNumCamPoints corresponds to lrMaxMasterPosition. The other cam points are evenly distributed between these master positions. lrMinMasterPosition and lrMaxMasterPosition are ignored for Poly5 interpolation.
oetInterpolationMode
This enumeration specifies the interpolation type. Possible values: and .
oYArrayLinear (cam is a straight line between each of the cam points)
oXYVAArrayPoly5 (polynomial of fifth degree)
|
UNINTENDED EQUIPMENT OPERATION |
oVerify that the number of interpolation points you specify for the input InterpolationPoints is the same value you specify for udiNumCamPoints of the structure ST_InterpolationParameter used for the input InterpolationParameter if you use an interpolated cam. oVerify that the values for X of the structure ST_InterpolationPointXYVA increase strictly monotonically if you use an interpolated cam with cam law Poly5. oVerify that the data in the array of cam points is not modified while the cam is buffered or being executed. oVerify that no online modifications are triggered while the cam is being executed. |
Failure to follow these instructions can result in death, serious injury, or equipment damage. |
Refer to the MotionInterface library guide for details on parameterizing an interpolated cam via ST_InterpolationParameter.
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 oValue Absolute 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 |
InterpolationPoints |
POINTER TO BYTE |
Memory address of an array with a length from 3 up to 10,000. Array type depends on value of etInterpolationMode for the input InterpolationParameter, either ARRAY OF LREAL or ARRAY OF ST_InterpolationPointXYVA. Value range: 0 and 3 ... 10000 Default value: 0 NOTE: The value must be the same as for udiNumCamPoints of ST_InterpolationParameter used by the input InterpolationParameter. Refer to the MotionInterface library guide for details. |
InterpolationParameter |
MC_Interpolation_Parameter |
Uses MC_InterpolationParameter for parameterization of an interpolated cam. Refer to MC_InterpolationParameter for details. |
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. |