Y_AX_ProductBuffer
This function block uses MC_TouchProbe and provides a circular buffer of recorded latch positions for the axis specified. It is tailored for use specifically for applications that process random incoming products such as rotary knifes or linear flying shear. Together, the application programmer and the ProductBuffer function block manage the RegistrationData structure which contains information pertaining to the product positions and other mechanical dimensions related to the application.
Parameters:
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| V | ProductAxis | AXIS_REF | Logical axis reference. | |
| V | RegistrationData | Yt_AX_ProductBufferStruct | Structure containing all information for the circular buffer to operate. | |
| 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 | TestMode | BOOL | If TRUE, then the internal MC_TouchProbe is aborted, and the function block can be used to "dry cycle" the machine by simulating products using the TestTrigger input. | FALSE |
| V | TestTrigger | BOOL | If TestMode is TRUE, then on the rising edge of TestTrigger, the actual position of the ProductAxis will be stored into the RegistrationData STRUCT. | FALSE |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| V | BufferLevel | INT | Indicates the number of products in the buffer by subtracting UsePointer from StorePointer. | |
| 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 Y_AX_ProductBuffer function block manages only the storing activity and only updates the StorePointer. Another part of your application must update the UsePointer and PrevUsePointer after the products have been processed. If the UsePointer is not updated, this function block will eventually generate the ErrorID 10022, buffer overrun.
- The StorePointer and UsePointer are the 'Head' and the 'Tail' of the circular buffer. If more than one 'Use' of the latch data is required, use the expanded sub structure added for v206 which supports a series of Use pointer activities.
- Both a cyclic (modularized) and non cyclic (unmodularized) latch position are stored into the RegistrationData simultaneously.
- TestMode can be toggled on the fly without re Enabling the function block. TestMode was added in v201.
- See the ProductBuffer eLearning Module on Yaskawa's YouTube channel.
Error Description:
Example 1:
Consider a rotary knife application as shown below.
(*Initialization of the ProductBufferStruct in an initialize program*)
Conveyor.Products.LockoutDistance:=LREAL#3.25; (* inches *)
Conveyor.Products.ManualOffset:=LREAL#0.0;
Conveyor.Products.ProductAwayDistance:=LREAL#23.75;
Conveyor.Products.Sensor.Bit:=UINT#1; (* see MC_TouchProbe help for details *)
Conveyor.Products.SensorDistance:=LREAL#23.25; (* If product leads slave, increase this value *)
Conveyor.Products.SensorOffset:=REM(Conveyor.Products.SensorDistance, Conveyor.MachineCycle);
Example 2:
The configuration shown below is for a system which is used to detect rising edge triggers for a product moving along a conveyor driven by a servo. the rising edge detection signal is wired to the EXT1 terminal of the Servopack.
RegistrationData.BufferNonCyclic will show the unmodularized position of the item in the buffer.