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
Execute |
The command is executed with a rising edge at input Execute. |
ActivationMode |
ActivationMode specifies the scaling time and position. |
ActivationPosition |
Master position at which a cam plate is scaled, depending on the ActivationMode. |
MasterScalingMode |
optional Scaling mode for the master position of the cam plate |
SlaveScalingMode |
optional Scaling mode for the slave position of the cam plate |
MasterOffset |
Offset to the master position of the cam plate |
SlaveOffset |
Offset to the slave position of the cam plate |
MasterScaling |
Scaling of the master position of the cam plate |
SlaveScaling |
Scaling of the slave position of the cam plate |
Outputs
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Done | Becomes TRUE if scaling was successful. |
Busy | 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 job. At the same time one of the outputs, Done, CommandAborted or Error, is set. |
Active | Active indicates that the command is executed. When the scaling was done depending on ActivationMode, Active becomes FALSE and Done is set. |
CommandAborted | Becomes TRUE, if the command could not be fully executed. |
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
Slave : AXIS_REF;
END_VAR
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.