MC_CamAdd
MC_CamAdd adds a cam plate to a multi-cam coupling. The cam plate coupling is initially created with MC_CamIn_V2.
Alternatively, a cam plate can be added with MC_CamIn_V2.
The status flag Axis.Status.CamTableQueued (AXIS_REF)can be used to check whether a cam plate is queued for addition or switchover.
The block can be used from a runtime version TwinCAT 2.11 R2
Important :
ActivationMode (time and/or position from which the operation takes place)
CamOperationMode (adding, switching or removal of superimposed cam plates)
Inputs
VAR_INPUT
Execute : BOOL;
ActivationMode : MC_CamActivationMode := MC_CAMACTIVATION_INSTANTANEOUS;
ActivationPosition : LREAL;
CamTableID : MC_CAM_ID;
Scaling : ST_CamScalingData;
Options : ST_CamInOptions_V2;
END_VAR
Execute |
The command is executed with a rising edge at input Execute. | |
ActivationMode |
The ActivationMode is used to specify the time and/or position at which the cam plate coupling or switchover is to take place. | |
ActivationPosition |
Optional master position at which a cam plate is switched, depending on the ActivationMode. | |
CamTableID |
ID of the cam plate used for the coupling | |
Scaling |
Optional scaling parameters for the cam plate | |
Options
|
Data structure with further coupling and switching options: | |
Interpolation type |
Interpolation type for position tables. Not required for motion functions. | |
CamOperationMode |
For MC_CamAdd theCamOperationMode is preallocated with CAMOPERATIONMODE_ADDITIVE. | |
ReferenceCamTableID |
Optional ID of a cam plate that is already active in the coupling. This ID is only required for operations that would otherwise be ambiguous, e.g. automatic offset adjustment in relation to an existing cam plate (Master AutoOffset). |
Outputs
VAR_OUTPUT
InSync : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
InSync | Becomes TRUE if the cam plate operation was completed successfully. In operations with activation position InSync only becomes TRUE after the actual activation. |
Busy | The Busy output becomes TRUE when the command is started with Execute and remains TRUE as long as the command is processed. When Busy becomes FALSE again, the function block is ready for a new command. At the same time one of the outputs InSync, CommandAborted or Error is set. |
Active | Active indicates that the command is executed. Active becomes TRUE if the command was issued successfully but the operation is still queued. If the cam plate is activated depending on the ActivationMode , Active becomes FALSE and InSync is set. |
CommandAborted | Becomes TRUE, if the command could not be fully executed. The axis may have become decoupled during the coupling process (simultaneous command execution). |
Error | Becomes TRUE, as soon as an error occurs. |
ErrorID | If the error output is set, this parameter supplies the error number |
Inputs/outputs
VAR_IN_OUT
Master : AXIS_REF;
Slave : AXIS_REF;
END_VAR
Master |
Master axis data structure. |
Slave |
Axis data structure of the Slave. |
The axis data structure of type AXIS_REF addresses an axis uniquely within the system. Among other parameters it contains the current axis status, including position, velocity or error status.