Y_YA_TON_Retained
This function block is a variation of the Timer function that allows more flexible manipulation and retention of the Accumulator value.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| V | Accum | TIME | Accumulated time value as Time datatype | |
| 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 | Preset | TIME | Preset value as Time datatype | T#0s |
| V | Reset | BOOL | Reset Timer | FALSE |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| V | Q | BOOL | Turns ON when preset value is reached | |
| V | TT | BOOL | Turns ON while enabled until preset is reached | |
| 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
- If enabled, the function block will increment the accumulator.
- The accumulator will be retained until reset by input or from elsewhere in the program.
- To keep the accumulator value through power loss, set the external variable that holds the accumulated value to be a Retained type.
Error Description
Refer to the Function Block ErrorID List