-

Y_CA_CamControl

Image

The CamControl function makes decisions regarding Engage and Disengage logic for applications where products are buffered and processed at random intervals. This function block requires the Y_AX_ProductBuffer function block from the PLCopen Toolbox and the Y_CA_CamShiftControl block from the Cam Toolbox. The main inputs that feed the CamControl block are RegistrationData and ControlData. This function block was designed for applications such as a Linear Flying Shear, Random Rotary Placer, Knife, Drill, etc.

Parameters

* Parameter Data Type Description Default
VAR_IN_OUT
B Axis AXIS_REF Logical axis reference. This value can be located on the Configuration tab in the Hardware Configuration (logical axis number).
V RegistrationData Yt_AX_ProductBufferStruct Structure containing all information for the circular buffer to operate.
V ControlData Yt_CA_CamSyncStruct Structure containing all information to allow both the CamControl and CamShiftControl to make decisions to run the cam function effectively.
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 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#0
VAR_OUTPUT
B Valid BOOL Indicates that the function is operating normally and the outputs of the function are valid.
V Engage BOOL Set high when the externally located Y_Cam_In function block(s) must be executed.
V Disengage BOOL Set high when the externally located Y_Cam_Out function block(s) must be executed.
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

• The Engage output is to be used with a Y_CamIn function block placed external to this function block. This design allows for one or more cam slaves to be operated via the logic provided.

• The Disengage output is to be used with a Y_CamOut function block placed external to this function block. This design allows for one or more cam slaves to be operated via the logic provided.

• This function block is designed to work with the Y_CA_CamShiftControlfunction block. It waits for an initial Camshift will occur before the first Engage event should take place. If the application requires the slave to become synchronized with the master without a Camshift, simply use an R_TRIG of the Y_CA_CamControl.Valid to cause the CamData.Shifting bit to go high and low.


Error Description

Refer to the Function Block ErrorID List.


Example

The operation of Y_CA_CamControl in deciding when to engage and disengage a cam is shown in the logic analyzer illustration below. The rising edge of the CamControl.Shifting variable denotes the "first" product to be processed. First product in this implementation means the cam is disengaged, the ProductBuffer was empty, and a product arrived. Shifting starts immediately if it is the first product in the ProductBuffer. Y_CA_CamControl waits for the falling edge of the Shifting bit to set the Y_CA_CamControl.Engage output. While the cam is engaged, the CamControl block continues to monitor the product buffer for new products. When the ProductBuffer indicates that no products have arrived and the cam cycle has past the ‘Decision Position,’ the CamControl.Disengage output is turned on.




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: Y_CA_

  1. The product buffer stores the position of each defect where a cut must be made.
  2. The Y_CA_CamShiftControl synchronizes the master (conveyor moving the wood) and slave (saw).
  3. The CamControl.Engage output must be connected to Y_CamIn.Execute. (Other logic requirements may be included if necessary.) Y_CA_
  4. 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.
  5. The CamControl.Disengage output must be connected to Y_CamOutExecute. In this application, it will cause the slave (saw) to disengage when the ProductBuffer indicates that there are no more defects to be cut. Y_CA_



 


This help information is valid for iCube Engineer Online Help 2025.6

Copyright © 2025 YASKAWA EUROPE GmbH and © 2025 YASKAWA America, Inc.