MC_CamScaling
A cam plate coupling can be scaled with the function block MC_CamScaling. 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 status flag Axis.Status.CamScalingPending (AXIS_REF) can be used to check whether a scaling procedure is queued.
Inputs
VAR_INPUT
Execute : BOOL;
ActivationMode : MC_CamActivationMode;
ActivationPosition : LREAL;
MasterScalingMode : MC_CamScalingMode;
SlaveScalingMode : MC_CamScalingMode;
MasterOffset : LREAL;
SlaveOffset : LREAL;
MasterScaling : LREAL := 1.0;
SlaveScaling : LREAL := 1.0;
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. |
MasterScalingMode | MC_CamScalingMode | Optional Scaling mode for the master position of the cam plate. |
SlaveScalingMode | MC_CamScalingMode | Optional Scaling mode for the slave position of the cam plate. |
MasterOffset | LREAL | Offset to the master position of the cam plate. |
SlaveOffset | LREAL | Offset to the slave position of the cam plate. |
MasterScaling | LREAL | Scaling of the master position of the cam plate. |
SlaveScaling | LREAL | Scaling of the slave position of the cam plate. |
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 the cam plate was created successfully. |
Busy | BOOL | The Busy output becomes TRUE when the command is started with Execute and remains TRUE 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. |