MC_CamIn
The MC_CamIn FB permits travel along cams listed in a table.
Block diagram
FB parameters
VAR_IN_OUT | |||
Variable name | Data type | Description | |
Master | AXIS_REF | Axis reference of the master axis. | |
Slave | AXIS_REF | Axis reference of the slave axis | |
VAR_INPUT | |||
Variable name | Data type | Description | |
Execute | BOOL | Starts the command on the rising edge. | |
MasterOffset | LREAL | Offset of the master axis table Value range [-2147483648.0, 2147483647.0] | |
SlaveOffset | LREAL | Offset of the slave axis table Value range [-2147483648.0, 2147483647.0] | |
MasterScaling | LREAL | Factor for the master axis profile Value range [-2147483648.0, 2147483647.0]
! Important !: Only integer values should be currently used! | |
SlaveScaling | LREAL | Factor for the slave axis profile Value range [-2147483648.0, 2147483647.0] | |
StartMode | UDINT | See explanations in the Section Values at input “StartMode”. | |
CamTableID | UINT | Identifier of cam used for the motion. | |
TableFctType | UDINT | See explanations in the Section Values at the “TableFctType” input. | |
VAR_OUTPUT | |||
Variable name | Data type | Description | |
InSync | BOOL | Indicates that the motion of the slave axis is now synchronous with the cam. | |
CommandAborted | BOOL | TRUE indicates that the command was aborted by another command. | |
Error | BOOL | Is TRUE if an error occurs in the FB. | |
ErrorID | WORD | Error identifier | |
EndOfProfile | BOOL | Output which indicates the cyclical end of the cam profile. |
Behaviour of the FB:
- The command to move along a cam can only be issued only when the slave axis is in one of the following states:
- Standstill
- Continuous Motion
- Discrete Motion
- Synchronised Motion
If this is not the case, the “Error” output is set to FALSE and “ErrorID” indicates an error value that designates the state the axis is currently in.
- The value range of the “MasterOffset”, “SlaveOffset, “MasterScaling“ and “SlaveScaling” input variables is monitored and, if it is exceeded, an error number referring to the variable is output at the “ErrorID” output and “Error” is set to TRUE.
- If no table is loaded and the CamIn FB is commanded, the error P-ERR-40001 (ERR_PLC_AX_MC) is issued at the “ErrorID” output and the error P-ERR-60172 is issued at the AxisErrorID output of an MC_ReadAxisError function block.
- The function block is retriggerable. Therefore, it can send a command again in the active state.
- For an axis to work as a master axis and for it to transfer the necessary synchronisation information to all axes (slaves) cyclically, the parameter cam_gear.is_master (P-AXIS-00288) must be set to 1. An axis configured as master can be simultaneously coupled to another master axis as slave.
- The MC_CamIn FB can only be used for rotary and linear slave axes.
- Master/slave coupling is realised with the setpoints of the master.
- A slave axis is defined with the following axis parameters:
- cam_gear.v_diff_percent (P-AXIS-00289)
- cam_gear.time_in_window (P-AXIS-00290)
- cam_gear.time_out_in_window (P-AXIS-00291)
- cam_gear.v_max_slave (P-AXIS-00303)
- cam_gear.a_max_slave (P-AXIS-00304)
- cam_gear.v_phasing (P-AXIS-00305)
- cam_gear.a_phasing (P-AXIS-00306)
- cam_gear.d_phasing (P-AXIS-00307)
- cam_gear.j_phasing (P-AXIS-00376)
- cam_gear.j_vel_sync (P-AXIS-00377)
For further explanations, see the Sections Influence of axis parameters on the coupling process and Cam functionality.