Y_CA_CamShiftControl
The CamShift_Control block manages cam shifting for applications that buffer random products such as Linear Flying Shear or Random Rotary Placer/Knife/Drill, etc. The purpose is to re-synchronize the slave for each item or product arriving on the master axis.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Master | AXIS_REF | A logical reference to the master axis | |
| B | Slave | AXIS_REF | A logical reference to the slave axis | |
| V | RegistrationData | Yt_AX_ProductBufferStruct | Structure containing all information for the circular buffer to operate. | |
| V | ControlData | Yt_CA_CamSyncStruct | Structure containing all information about the cam profile that will be used to calculate and implement cam shifts | |
| VAR_INPUT | ||||
| B | Enable | BOOL | The function will continue to execute every scan while Enable is held high and there are no errors. | FALSE |
| V | UpdateUsePointer | BOOL | RegistrationData.UsePointer will be updated when a product has been processed only if this input is TRUE. If more than one slave follow the master, only the last slave must update the UsePointer. | FALSE |
| V | Action | INT | Designates this instance of this function block as one of the several activities to occur based on the registration sensor. For applications that have only one action, such as a cut or a stamp, this input can be left unconnected. This input is required for applications that have more than one action associated with a sensor input, such as pick and place. | INT#1 |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| V | Shifting | BOOL | Set high if the function block is active and Y_CamShift is Busy. | |
| V | ItemsProcessed | UDINT | Provides a count of the number of products processed since this function was enabled. | |
| 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. | |
Notes
- This function block includes a Y_CamShift block, and will execute shifts at the appropriate position based on data provided by the user via the ControlData structure.
- The shifted master position is available by reading slave axis parameter 1502.
- This function block requires the Y_AX_ProductBuffer function block from the PLCopen Toolbox and the CamControl block from the Cam Toolbox. These three blocks work together to provide cam engage/disengage control as well as cam shifting (synchronization) logic.
- The ‘Shifting’ bit is held high when a Y_CamShift is in progress.
- The CamShift_Control block uses data from RegistrationData and ControlData to make decisions on when to shift the master position and by how much to shift the position. The user must provide valid data in the RegistrationData and ControlData structures.
- In cases where multiple slaves are synchronized to a single master, the slaves can share the same ProductBuffer. Set the last slave (last CamShift_Control function block) to update the UsePointer for the ProductBuffer.
Error Description
Refer to the Function Block ErrorID List .
Code Example
The role of CamShift_Control in master / slave synchronization for each product is illustrated below.
Application Example
This example illustrates how the CamControl block can be applied in a linear flying shear application. In this application, the items to be cut are defective areas (knots) in a piece of wood. The code shown here performs the following actions:
- The product buffer stores the position of each defect where a cut must be made.
- The Y_CA_CamShiftControl synchronizes the master (conveyor moving the wood) and slave (saw).
- The CamControl.Engage output must be connected to Y_CamIn.Execute. (Other logic requirements may be included if necessary.)
- Key Point: When defects are close together, the goal is to remain engaged, and use the CamShift function during the slave (saw) retraction stroke while not in contact with the wood to re-synchronize with the next defect (or knot) to be cut.
- The CamControl.Disengage output must be connected to Y_CamOutExecute. In this application, it will cause the slave (saw) to disengage when the product bufferindicates that there are no more defects to be cut.