PS_PackML_StateMachine_Maintenance

PS_PackML_StateMachine_Maintenance 1:

The function blocks for Packaging Machine State have a common interface to the PackML Machine State Model V3 in the updated form. It is expected that application-specific logic, such as state transitions, is programmed in external function blocks and that the Pack_ML_State_Machine function block handles the central logic of the state machine and the state representation. For that reason there is a recommendation for this function block with regard to how it can be combined with other logic.

The logic for transitions, especially between manual, semi-automatic and automatic modes (see figure), depends on the application.

PS_PackML_StateMachine_Maintenance 2:

PS_PackML_StateMachine_Maintenance 3: Inputs

VAR_INPUT
    Start           : BOOL;  
    Hold            : BOOL; 
    unHold          : BOOL; 
    Suspend         : BOOL; 
    unSuspend       : BOOL; 
    Abort           : BOOL; 
    Stop            : BOOL; 
    Complete        : BOOL; 
    Clear           : BOOL; 
    Reset           : BOOL; 
    StateComplete   : BOOL; 
END_VAR

Table/description: Execute state machine from rising edge...

Name

Type

Description

Start

BOOL

…to Starting.

Hold

BOOL

…to Holding or Held.

unHold

BOOL

…to Unholding.

Suspend

BOOL

...to Suspending or Suspend.

unSuspend

BOOL

…to Unsuspending.

Abort

BOOL

…to Aborting.

Stop

BOOL

…to Stopping.

Complete

BOOL

…to Resetting.

Clear

BOOL

…to Clearing.

Reset

BOOL

…to Resetting.

StateComplete

BOOL

Transition

PS_PackML_StateMachine_Maintenance 4: Outputs

VAR_OUTPUT
    Status          : WORD; 
    ST_Starting     : BOOL; 
    ST_Completing   : BOOL; 
    ST_Resetting    : BOOL; 
    ST_Holding      : BOOL; 
    ST_UnHolding    : BOOL; 
    ST_Suspending   : BOOL; 
    ST_UnSuspending : BOOL; 
    ST_Clearing     : BOOL; 
    ST_Stopping     : BOOL; 
    ST_Aborting     : BOOL; 
    ST_Execute      : BOOL; 
    ST_Complete     : BOOL; 
    ST_Idle         : BOOL; 
    ST_Held         : BOOL; 
    ST_Suspended    : BOOL; 
    ST_Stopped      : BOOL; 
    ST_Aborted      : BOOL; 
    Error           : BOOL; 
    ErrorID         : UDINT; 
    ePMLState       : E_PMLState;
END_VAR

Name

Type

Description

State

WORD

Status word representing the state of the state machine.

ST_Starting

BOOL

True if state machine is in Starting state.

ST_Completing

BOOL

True if state machine is in Completing state.

ST_Resetting

BOOL

True if state machine is in Resetting state.

ST_Holding

BOOL

True if state machine is in Holding state.

ST_UnHolding

BOOL

True if state machine is in Unholding state.

ST_Suspending

BOOL

True if state machine is in Suspending state.

ST_UnSuspending

BOOL

True if state machine is in Unsuspending state.

ST_Clearing

BOOL

True if state machine is in Clearing state.

ST_Stopping

BOOL

True if state machine is in Stopping state.

ST_Aborting

BOOL

True if state machine is in Aborting state.

ST_Execute

BOOL

True if state machine is in Execute state.

ST_Complete

BOOL

True if state machine in Complete state.

ST_Idle

BOOL

True if state machine is in Idle state.

ST_Held

BOOL

True if state machine in Held state.

ST_Suspended

BOOL

True if state machine is in Suspended state.

ST_Stopped

BOOL

True if state machine is in Stopped state.

ST_Aborted

BOOL

True if state machine is in Aborted state.

Error

BOOL

Becomes TRUE, as soon as an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.

ePMLState

E_PMLState

Current PML state of the automatic state machine.

Requirements

Development environment

Target system type

PLC libraries to be linked

TwinCAT v3.1, build 4018 onwards

PC (i386)

Tc3_PackML