Y_PK_EM_ModuleSummation
The EM_Module_Summation function block rolls up the Control Module State Complete bits for all active and enabled CMs. The result is an overall Equipment Module State Complete bit that is transferred to the UN_ModuleControl Worksheet.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| V | UnitMachine | Yt_PK_UNitmachine_STRUCT | Structure containing all the information about the machines current state and mode of operation for all EMs and CMs | |
| VAR_INPUT | ||||
| B | Enable | BOOL | The function will continue to execute while the enable is held high | FALSE |
| V | EM_Number | INT | The EM number corresponding to the EM in which this FB is located | 0 |
| V | CM_Mask | WORD |
Mask to deactivate CMs. When a CM is deactivated, commands will not be sent down to the CM and all StateComplete bits will be set to TRUE. Each bit corresponds to the same number CM to deactivate. (Example: to deactivate CM_3, set CM_Mask.X3 =TRUE)
16 Control Modules are supported for each Equipment Module, numbered 0-15. |
16#0000 |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the outputs of the function are valid | |
| B | CMs_Active | WORD | The list of active EMs. Same bit scheme as CM_Mask. (Example: if CMs_Active.X4 = TRUE then CM_4 is active) | |
| B | CMs_NotDone | WORD | A compilation of which Control 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 CMs stuck in transition by comparing the outputs CMs_Active and CMs_NotDone. These outputs are of WORD datatype, with each bit [x] representing the active status and transition status of CM[x]. Example: If the PackML command STOP was given, and CM[1] was enabled and active, but not finished stopping yet, the output of CMs_Active would be ...00111 while the output of CMs_NotDone would be ...00010. The user then knows that the process is stuck in CM[1]. The user would then go to the EM00_CM01_Control_Outputs worksheet to further drill into the problem.
- See template documentation for further details on recommended usage.
Error Description:
See the
Function Block ErrorID List.