Chapter 7 Program
(1) Command condition
: It is a condition to give cam operation/cam operation cancellation commands to the axis.
(2) Axis connection state flag
: When the axis to be operated is connected to motion control module, and EtherCAT communication with motion control
module is normally performed, it is On.
(3) Axis error/Warning status flag
: If there are errors and warnings in the axis, it is On.
(4) Axis operation status flag: If the axis is in operation, it is On.
(5) 2-axis cam operation/Cam operation cancellation commands
: In the example program, cam operation (MC_CamIn) motion function block is executed under the following conditions.
- Cam operation condition is On.
- The axis and main axis are normally connected.
- There should be no errors and warnings.
- The axis is not in operation.
In addition, cam operation cancellation (MC_CamOut) motion function block is executed under the following conditions.
- Cam operation cancellation condition is On.
- The axis is normally connected.
- There should be no errors and warnings.
- The axis is in operation.
Conditions to execute motion function block may vary depending on systems.
(6) Cam operation command input variables
: These are input variables to execute cam operation (MC_CamIn) motion function block.
- Main axis: It sets main axis of cam operation.
- Serve axis: It sets the axis in which cam operation is executed.
- Changes in parameters during operation: It sets whether to apply to the operation by changing input variable values of the
function block. For details, refer to “6.1.5 Changes in parameters during execution of motion function block”.
- Main axis offset: It sets offset values of main axis data to be used when cam table data is applied.
- Serve axis offset: It sets offset values of serve axis data to be used when cam table data is applied.
- Main axis magnification: It sets magnification of main axis data to be used when cam table data is applied.
- Serve axis magnification: It sets magnification of serve axis data to be used when cam table data is applied.
- Cam operation starting point: It sets the position of main axis which will be the starting point of cam table.
- Distance of main axis for starting cam operation: It sets the distance of main axis in which actual cam operation starts.
- Main axis data selection for cam operation: It selects main axis data which will be a basis of cam operation among main axis
command position and main axis current position.
- Cam table number: It sets cam data number to conduct cam operation.
- For details on cam operation command input variables, refer to “6.4.1 Cam operation (MC_CamIn)”.
- Changes in parameters during operation: It sets whether to apply to the operation by changing input variable values of the
function block. For details, refer to “6.1.5 Changes in parameters during execution of motion function block”.
- Buffer mode: It sets the point of time when motion function block is executed. That is, it sets whether to execute immediately
or execute after the completion of commands which are currently being performed. For details, refer to “6.1.4 Buffer Mode
Input”.
(7) Cam operation command output variable
: It is a variable to store output values generated when cam operation (MC_CamIn) motion function block is executed.
- Cam operation: It is on when serve axis is synchronized in main axis according to cam data after the execution of motion
function block.
- Function Block in execution: When motion function block is executed, it is On, and the execution is completed, it becomes Off.
- Function Block axis control in operation: In case motion function block controls the axis, it is On.
- Error occurrence state: In case error occurs as the motion function block is executed, it is On.
- Error number: In case error occurs, the number that corresponds to error is generated.
- For details on the output of motion function block, refer to “Edge motion commands” of “6.1.3 Basic I/O Variable”.