FB_PMLUnitModeConfig

FB_PMLUnitModeConfig 1:

Machines may have unit modes other than "Production", "Maintenance" and "Manual". This function block enables the user to configure further models (UnitModes).

The number of the new model, the existing states and the states in which a model change is possible can be freely defined.

From version 1.0.5.0 of the library, the activation of a flashing and the state and state text color can also be stored here.

The configuration is then part of the global structure ST_PMLUnitModeConfiguration.

FB_PMLUnitModeConfig 2: Inputs

VAR_INPUT
    eMode                           : DINT;
    sName                           : STRING;
    bDisableClearing                : BOOL;
    bDisableStarting                : BOOL;
    bDisableSuspended               : BOOL;
    bDisableStopping                : BOOL;
    bDisableAborting                : BOOL;
    bDisableHolding                 : BOOL;
    bDisableHeld                    : BOOL;
    bDisableUnholding               : BOOL;
    bDisableSuspending              : BOOL;
    bDisableUnsuspending            : BOOL;
    bDisableResetting               : BOOL;
    bDisableIdle                    : BOOL;
    bDisableCompleting              : BOOL;
    bDisableComplete                : BOOL;
    bEnableUnitModeChangeStopped    : BOOL;
    bEnableUnitModeChangeIdle       : BOOL;
    bEnableUnitModeChangeSuspended  : BOOL;
    bEnableUnitModeChangeExecute    : BOOL;
    bEnableUnitModeChangeAborted    : BOOL;
    bEnableUnitModeChangeHeld       : BOOL;
    bEnableUnitModeChangeComplete   : BOOL;

    aStateFlashing                  : ARRAY [E_PMLState.Undefined..E_PMLState.Completed] OF BOOL := aStateFlashingDefault; //Extension Tc3_PackML_V3 >= 1.0.5.0
    aStateColor                     : ARRAY [E_PMLState.Undefined..E_PMLState.Completed] OF STRING[6] := aStateColorDefault; //Extension Tc3_PackML_V3 >= 1.0.5.0
    aStateTextColor                 : ARRAY [E_PMLState.Undefined..E_PMLState.Completed] OF STRING[6] := aStateTextColorDefault; //Extension Tc3_PackML_V3 >= 1.0.5.0
END_VAR

Name

Type

Description

eMode

DINT

Number of the new PML UnitMode [4..31]

sName

STRING

Name of the new PML UnitMode

bDisableClearing

BOOL

Disables the "Clearing" PML state.

bDisableStarting

BOOL

Disables the "Starting" PML state.

bDisableSuspended

BOOL

Disables the "Suspended" PML state.
Disabling the static state also causes the "Suspending" and "Unsuspending" PML states to be disabled.

bDisableStopping

BOOL

Disables the "Stopping" PML state.

bDisableAborting

BOOL

Disables the "Aborting" PML state.

bDisableHolding

BOOL

Disables the "Holding" PML state.

bDisableHeld

BOOL

Disables the "Held" PML state.
Disabling the static state also causes the "Holding" and "Unholding" PML states to be disabled.

bDisableUnholding

BOOL

Disables the "Unholding" PML state.

bDisableSuspending

BOOL

Disables the "Suspending" PML state.

bDisableUnsuspending

BOOL

Disables the "Unsuspending" PML state.

bDisableResetting

BOOL

Disables the "Resetting" PML state.

bDisableIdle

BOOL

Disables the "Idle" PML state. Disabling the static state also causes the "Resetting" PML state to be disabled.

bDisableCompleting

BOOL

Disables the "Completing" PML state.

bDisableComplete

BOOL

Disables the "Complete" PML state. Disabling the static state also causes the "Completing" PML state to be disabled.

bEnableUnitModeChangeStopped

BOOL

Enables a mode change in the "Stopped" PML state.

bEnableUnitModeChangeIdle

BOOL

Enables a mode change in the "Idle" PML state.

bEnableUnitModeChangeSuspended

BOOL

Enables a mode change in the "Suspended" PML state.

bEnableUnitModeChangeExecute

BOOL

Enables a mode change in the "Execute" PML state.

bEnableUnitModeChangeAborted

BOOL

Enables a mode change in the "Aborted" PML state.

 

bEnableUnitModeChangeHeld

BOOL

Enables a mode change in the "Held" PML state.

bEnableUnitModeChangeComplete

BOOL

Enables a mode change in the "Complete" PML state.

 

aStateFlashing

ARRAY[0..17] OF BOOL

Defines the flashing of the states when active.

aStateColor

ARRAY[0..17] OF STRING[6]

Defines the color of the states when active.

aStateTextColor

ARRAY[0..17] OF STRING[6]

Defines the text color of the states when active

FB_PMLUnitModeConfig 3: Outputs

VAR_OUTPUT
    bError     : BOOL;
    nErrorID   : UDINT;
END_VAR

Name

Type

Description

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

  • 3.1 Build 4024.63

PC (i386)

From Tc3_PackML_ V3 1.0.3