Y_AX_UpdateUsePointer
This is a template for function block description.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| V | RegistrationData | Yt_AX_ProductBufferStruct | Structure that contains details about the circular buffer used in the application. | |
| 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 | If multi action buffering is used, the Action input is the index of the specific action whose use pointer needs to be updated. | INT#0 |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| 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
- Use an R_TRIG block to update the use pointer. The use pointer gets updated multiple times if the function block is kept enabled for multiple scans.
Error Description
See the Function Block ErrorID List.
Example
Single action update of use pointer after conveyor tracking:
For the first triggering, UsePointer is updated to 1 and PrevUsePointer is set to 0:
Considering BufferSize is 20, for the last item of the buffer UsePointer goes from 19 to 0, and PrevUsePointer is set to 19: