FB_PMLStateMachine
In its updated form, the PML_StateMachine function block has a common interface to the PackML Machine State Model V3. It is expected that application-specific logic, such as state transitions, will be programmed in external function blocks and that the PML_StateMachine function block will take over the central logic of the state machine and the state representation. The Machine State Model has a different appearance due to the currently active UnitMode (eMode). Three basic models are preconfigured for this purpose (E_PMLProtectedUnitMode).
ePMLProtUnitMode_Production

ePMLProtUnitMode_Maintenance

ePMLProtUnitMode_Manual

Furthermore, other user-specific models can be created in a simple manner with the aid of the FB_PMLUnitModeConfig function block and are thus very flexible in use.
The logic for transitions, in particular between production, maintenance and manual mode, depends on the application. The states in which UnitMode changes are permissible for the basic models are described more precisely in the description of the FB_PMLUnitModeManager function block.
Inputs
VAR_INPUT
eMode : DINT;
eCommand : E_PMLCommand;
stSubUnitInfoRef : ST_PMLSubUnitInfoRef;
stOptions : ST_PMLStateMachineOptions;
END_VAR
Name | Type | Description |
---|---|---|
eMode | DINT | Current PML UnitMode |
eCommand | E_PMLCommand | Enumeration with the various PML commands of the function block. |
stSubUnitInfoRef | ST_PMLSubUnitInfoRef | Structure that points to an array of the current PML states of subordinated machine units |
stOptions | ST_PMLStateMachineOptions | Not used at present |
Outputs
VAR_OUTPUT
eState : E_PMLState;
sState : STRING;
bError : BOOL;
nErrorId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
eState | E_PMLState | Enumeration that delivers the current PML state of the automatic state machine.
|
sState | STRING | Name of the current PML state of the automatic state machine. |
bError | BOOL | Becomes TRUE as soon as an error occurs. |
nErrorId | UDINT | Supplies the error number when the bError output is set. |
Requirements
Development Environment | Target platform | PLC library to include |
---|---|---|
From TwinCAT
| PC (i386) | From Tc3_PackML_ V3 1.0.3 |