Y_CA_CamSlaveRecover
The CamSlave_Recover block moves a Slave back into sync with the master axis after camming was interrupted unexpectedly, such as E-Stop conditions, or alarms that disable the servo. This function block is particularly useful when resuming the cam motion from the position where it was interrupted is necessary to avoid wasting products in process, or if machine characteristics demand it, or if homing and re-starting the cycle is not feasible. The CamSlave_Recover function block can be used to bring the slave axis to the position in the cam table that corresponds to the current master axis position. Linear interpolation is performed for accuracy in case of coarse resolution between points in the cam table. Once CamSlave_Recover is Done, the camming motion can resume. This function block contains an MC_MoveAbsolute function.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Slave | AXIS_REF | A logical reference to the slave axis. | |
| B | CamTable | Yt_MS_CamStruct | Cam data structure | |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. | FALSE |
| B | MasterPosition | LREAL | Master axis’ current position. The CamSlave_Recover function block will command the slave axis to move to the slave position corresponding to this MasterPosition value. | LREAL#0.0 |
| B | Velocity | LREAL | Velocity with which the slave axis recovers and moves to the position from the cam table corresponding to the master axis position | LREAL#0.0 |
| B | Acceleration | LREAL | Acceleration with which the slave axis recovers and moves to the position from the cam table corresponding to the master axis position | LREAL#0.0 |
| B | Deceleration | LREAL | Deceleration with which the slave axis recovers and moves to the position from the cam table corresponding to the master axis position | LREAL#0.0 |
| E | Jerk | LREAL | Not supported; reserved for future use. Value of the jerk in [user units / second^3]. | LREAL#0.0 |
| B | Direction | MC_Direction | The position of the slave axis for which the corresponding master position is required. | LREAL#0.0 |
| VAR_OUTPUT | ||||
| B | Done | BOOL | Set high when the commanded action has completed successfully. If another block takes control before the action is completed, the Done output will not be set. This output is reset when Execute goes low. | |
| B | Busy | BOOL | Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error) | |
| B | Active | BOOL | For buffered modes, this output is set high at the moment the block takes control of the axis. For non buffered modes, the outputs busy and active have the same value | |
| B | CommandAborted | BOOL | Set high if motion is aborted by another motion command or MC_Stop. This output is cleared with the same behavior as the Done output. | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
| B | SlavePosition | LREAL | The slave position that relates to the master as described in the CamTable. | |
Notes
After CamSlave_Recover is Done, in most cases, the slave will be at a position different from the home position or dwell position. Care should be taken before re-engaging the slave to the master axis. Engage Position and Engage Data inputs on the Y_CamIn block should be verified to make sure that they are set correctly. Incorrect engage position and or engage method can cause abrupt motion on the slave axis.
Recommended steps to recover from a cam cycle interruption
1) Clear all alarms after an E-Stop.
2) Enable the slave.
3) Verify the MasterPosition input is the position of the master axis to where the slave must to move to re-synchronize the cam operation.
3) Execute CamSlave_Recover with valid inputs.
4) Once CamSlave_Recover.Done is TRUE, the slave is in position to continue the cam motion immediately.
5) Change the Y_CamIn.EngagePosition to the current master position. Set Y_CamIn.EngageData.SlaveAbsolute:= TRUE.
6) Execute Y_Camin. The cam will engage and when the master axis starts motion, the slave will move in synchronization with the master.
Error Description
Refer to the Function Block ErrorID List .
Example
E-Stops can result in the instantaneous loss of control of the axes. Manually clearing debris or scrap from the machine and adjustments after E-Stops and alarms can cause a change in motor position, all resulting in a de synchronization of the master and slave.
The example given below illustrates how the CamSlaveRecover block can solve E-Stop recovery issues. The logic analyzer plot shows the axes when the E-Stop occurred. At this point, the Y_CamIn outputs InSync and Busy change to FALSE. A slight drift in the master axis position can be seen after the E-Stop. This can be due to axis inertia, or because of adjustments made to the machine. The CamSlaveRecover block is executed to physically move the slave to the position that corresponds to the master’s current position as determined by looking in the CamTable.
The distance that the slave axis traverses in this process can be seen in the illustration. Once the CamSlaveRecover is Done, the slave can be re-engaged with the master using Y_Camin.
Important: In this recovery condition, the ‘EngagePosition’ must be set to the master axis’ current position and the EngageData.SlaveAbsolute=TRUE must be applied.