PML_UnitModeManager

PML_UnitModeManager 1:

Machines have other system modes apart from “Production”. Each unit mode is defined by its own state model. A "Mode Manager" must be defined for transitions between the modes. The “Mode Manager” decides how and in which state a machine can change unit modes; i.e. built-in barriers prevent the machine from changing to unsuitable states. These barriers are permanently defined for the “Production”, “Maintenance” and “Manual” base modes, as the illustration below shows. This can be individually specified for other modes defined via the PML_UnitModeConfig function block.

WARNING

Adhere to proper mode changes

The logic for transitions between the modes depends on the application, especially for transitions between "Manual" and "Production" mode. In addition, hardware barriers or safety equipment may be necessary for such mode changes. The responsibility for proper mode changes lies with whoever implements them.

PML_UnitModeManager 2:

PML_UnitModeManager 3: Inputs

VAR_INPUT
    bExecute        : BOOL;
    eModeCommand    : DINT;
    ePMLState       : E_PMLState;
END_VAR

Name

Type

Description

bExecute

BOOL

Mode change on rising edge

eModeCommand

DINT

Requested mode

ePMLState

E_PMLState

Enumeration that delivers the current PML state of the automatic state machine.

PML_UnitModeManager 4: Outputs

VAR_OUTPUT
    eModeStatus     : DINT;
    sModeStatus     : STRING;
    bDone           : BOOL;
    bError          : BOOL;
    bErrorID        : UDINT;
END_VAR

Name

Type

Description

eModeStatus

DINT

Current PML UnitMode

sModeStatus

STRING

Name of the current PML UnitMode

bDone

BOOL

Becomes TRUE as soon as the mode change has been successfully carried out.

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