PML_StateMachine
In the updated form the PML_StateMachine function block has a common interface with the PackML Machine State Model V3. It is assumed that application-specific logic, such as state transitions, is programmed in external function blocks and that the PML_StateMachine function block deals with 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 modules are preconfigured for this (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 function block PML_UnitModeConfig 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 function block PML_UnitModeManager.
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;
bError : BOOL;
nErrorId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
eState | E_PMLState | Enumeration that delivers 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 system type | PLC libraries to include |
---|---|---|
TwinCAT v3.1 Build 4018 and higher | PC (i386) | Tc3_PackML_V2 |