MC_CamIn
The MC_CamIn FB enables travel along cams that are created in the form of a table.
Block diagram
Parameters of the FB
VAR_IN_OUT | |||
| Master | AXIS_REF | Axis reference to the master axis. |
| Slave | AXIS_REF | Axis reference to the slave axis. |
VAR_INPUT | |||
| Execute | BOOL | Start at rising edge. |
| MasterOffset | LREAL | Offset of master table. Range [-2147483648.0, 2147483647.0] |
| SlaveOffset | LREAL | Slave axis: Offset of the table. Range [-2147483648.0, 2147483647.0] |
| MasterScaling | LREAL | Factor for the master axis profile. From the slave point of view the master overall profile is multiplied by this factor. Range [-2147483648.0, 2147483647.0] Currently only integer values may be used! |
| SlaveScaling | LREAL | Factor for the slave axis profile. The overall slave profile is multiplied by this factor. Range [-2147483648.0, 2147483647.0] |
| StartMode | DWORD | Bits 2-0: Start mode 001: Ramp in (16#1) 010: Absolute (16#2) 100: Relative (16#4) |
| CamTableID | UINT | Identifier of cam table to be used, linked to output of MC_CamTableSelect. |
| TableFctType | UDINT | Table function types: 0: STEP_DIRECT 1: LINEAR 2: POLYNOM_3 3: POLYNOM_3_KOEFF 4: LINE_POLY5 5: POLY5_LINE 6: TABLE_DEFINED |
VAR_OUTPUT | |||
| InSync | BOOL | Cam is engaged for the first time. |
| CommandAborted | BOOL | Command is aborted by another command. |
| Error | BOOL | Indicates if an error has occurred. |
| ErrorID | WORD | Error identification. |
| EndOfProfile | BOOL | ‘Pulsed’ output signals the cyclic end of the cam profile. |
Behavior of the FB
- The command for travel along a cam can only be issued only when the slave axis is in the ‘Standstill’ or ‘Continuous Motion’ or ‘Discrete Motion’ or ‘Synchronized Motion’ state. 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’ und ‘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, an axis error is indicated (‘ErrorID’ = 40001) and the error ID 60172 is output via the ‘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 cam or gear master axis and for it to transfer the necessary synchronisation information to all axes (slaves) cyclically, the ‘cam_gear.is_master’ parameter must be set to 1 for such a master axis in the axis parameter configuration. An axis configured as the master can simultaneously also be coupled to another master axis as a slave.
- The MC_CamIn FB can be used for both rotatory and linear slave axes.
- Master/slave coupling is realized with the set points of the master.
- A slave axis is defined with the following axis parameters:
- cam_gear.v_diff_percent
- cam_gear.time_in_window
- cam_gear.time_out_in_window
- cam_gear.v_max_slave
- cam_gear.a_max_slave
- cam_gear.v_phasing
- cam_gear.a_phasing
- cam_gear.d_phasing
- cam_gear.j_phasing
- cam_gear.j_vel_sync