MC_CamScaling_V2
A cam plate coupling can be scaled with the MC_CamScaling_V2 function block. The raw table data of the cam plate are not affected, however the scaling refers to an existing master/slave coupling. The following parameters can be modified: scaling factors for master and slave, and offsets for the cam plate within the coordinate system.
Optionally, the modification will only take effect from a certain master position, enabling precise scaling during the motion. Caution when scaling during motion. The slave position at the time of scaling should only be affected slightly by the change.
The Axis.Status.CamScalingPending (AXIS_REF) status flag can be used to check whether a scaling procedure is queued.
Inputs
VAR_INPUT
Execute : BOOL;
ActivationMode : MC_CamActivationMode;
ActivationPosition : LREAL;
CamTableID : MC_CAM_ID;
Scaling : ST_CamScalingData;
Options : ST_CamScalingOptions_V2;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is executed with a rising edge at Execute input. |
ActivationMode | MC_CamActivationMode | ActivationMode specifies the scaling time or position. |
ActivationPosition | LREAL | Master position at which a cam plate is scaled depending on the ActivationMode. |
CamTableID | MC_CAM_ID | ID of the cam plate that is scaled. |
Scaling | ST_CamScalingData | Scaling data such as mode, offset and scaling factor |
Options | ST_CamScalingOptions_V2 | Not used |
Inputs/outputs
VAR_IN_OUT
Slave : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Slave | AXIS_REF | Axis data structure of the Slave. |
The axis data structure of type AXIS_REF addresses an axis unambiguously within the system. Among other parameters, it contains the current axis status, including position, velocity or error state.
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | Becomes TRUE if scaling was successful. |
Busy | BOOL | The Busy output becomes TRUE when the command is started with Execute and remains TRUE for as long as the command is processed. If Busy becomes FALSE again, the function block is ready for a new order. At the same time one of the outputs, Done or Error, is set. |
Active | BOOL | Active indicates that the command is executed. For cam plate switching, Active becomes TRUE if the coupling command was executed successfully but the cam plate is still queued. If the cam plate is activated depending on the ActivationMode, Active becomes FALSE and InSync is set. |
CommandAborted | BOOL | Becomes TRUE if the command could not be fully executed. The axis may have become decoupled during the coupling process (simultaneous command execution). |
Error | BOOL | Becomes TRUE as soon as an error occurs. |
ErrorID | UDINT | If the error output is set, this parameter supplies the error number. |