Y_PK_PackMLModeStateTimes
The PackMLModeStateTimes function block keeps track of the times spent in each mode and state of operation for the machine.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Admin_Tags |
Yt_PK_PackTags_Admin_STRUCT | Structure containing alarm data from the machine |
|
| VAR_INPUT | ||||
| B | Enable | BOOL |
The function will continue to execute while the enable is held high.
|
FALSE |
| B | Cmd_ResetCurrModeTimes | BOOL | When set, all time counting will be stalled and all of the times being counted for the Sts_ModeCurrent will be set to zero. | FALSE |
| B | Cmd_ResetAllTimes | BOOL | When set, all times being monitored will be reset to zero. Time counting will also be stalled as long as this input is held high | FALSE |
| V | Sts_ModeCurrent | DINT | The current mode of the machine | 0 |
| V | Sts_StateCurrent | DINT | The current state of the machine | 0 |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the outputs of the function are valid | |
| B | TimeRollOverWarning | BOOL | A warning is sent when any of the time accumulators is approaching rolling over | |
| B | Sts_StateCurrentSec | DINT | Time (in seconds) spent in the current state | |
| V | Sts_StateCumulativeSec | Yt_PK_StateCumulativeArray | An array containing the times spent operating in different modes and states | |
| B | Sts_ModeCurrentSec | DINT | Time (in seconds) spent in the current mode | |
| V | Sts_ModeCumulativeSec | Yt_DintArray32 | An array of times spent in each mode | |
| B | Sts_AccTimeSinceReset | DINT | Accumulated time since Cmd_ResetAllTimes was activated | |
| B | Error | BOOL | Set high if error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| B | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
Notes
- The output times are also internally stored in the AdminTags structure. Typically this is a Retained variable, and so all the time values will remain intact through power loss.
- See template documentation for further details on recommended usage.
Error Description:
See the
Function Block ErrorID List.