Y_PK22_UN_ModuleSummation
The Y_PK22_UN_ModuleSummation function block rolls up the Equipment Module (EM) State Complete bits for all active and enabled EMs. The result is an overall State Complete bit for the Unit Machine level that is used by the Y_PK22_PackML22_State_Diagram function block.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| V | UnitMachine | #60397 |
Structure containing all the information about the machine’s current state and mode of operation for all EMs and CMs | |
| V | PML_Status | #60385 |
Structure that contains the current state of operation and the current transition states sent by PackML_StateMachine | |
| VAR_INPUT | ||||
| B | Enable | BOOL | The function will continue to execute while the enable is held high | FALSE |
| V | EM_Mask | WORD |
Mask to deactivate EMs. When an EM is deactivated, commands will not be sent down to the EM and all StateComplete bits will be set to TRUE. Each bit corresponds to the same number EM to deactivate. (Example: to deactivate EM_3, set EM_Mask.X3 =TRUE)
16 Equipment Modules are supported, numbered 0-15. |
16#0000 |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the outputs of the function are valid | |
| B | EMs_Active | WORD | The list of active EMs. Same bit scheme as EM_Mask. (Example: if EMs_Active.X4 = TRUE then EM_4 is active) | |
| B | EMs_NotDone | WORD | A bit pattern of which Equipment Modules have not completed the transition task. | |
| 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 user can identify those EMs stuck in transition by comparing the outputs EMs_Active and EMs_NotDone. These outputs are of WORD datatype, with each bit [x] representing the active status and transition status of EM[x]. Example: If the PackML command STOP was given, and EM[1] was enabled and active, but not finished stopping yet, the output of EMs_Active would be ...00011 while the output of EMs_NotDone would be ...00010. The user then knows that the process is stuck in EM[1]. The user would then go to the EM01_ModuleControl worksheet to further drill into the problem.
- See template documentation for further details on recommended usage.
Error Description:
See the
Function Block ErrorID List.