Lenze ApplicationTemplate PackML (PLC Designer R3-x) User Manual

Page 74

Advertising
background image

Architecture: The ApplicationTemplate PackML in detail

Stater machine: Query examples

74

Lenze · ApplicationTemplate PackML · 1.0 EN - 05/2014

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

• IF condition

• Query the module's intrinsic

status

IF Status_UnitStateCurrent (MM_Address:=
L_EATP_CONST.OWNID

)= L_EATP_States_PackML.Execute THEN

// Do something if Statemachine is in state EXECUTE

END_IF

• CASE instruction

• Module's intrinsic/subordinated

module status enquiry by method

CASE Status_UnitStateCurrent (MM_Address:=
L_EATP_CONST.OWNID)OF

L_EATP_States_PackML.Execute:

// Do something if Statemachine is in state EXECUTE

L_EATP_States_PackML.Complete:

// Do something else if Statemachine is in state
COMPLETE

L_EATP_States_PackML.Stopped:

// Do something else if Statemachine is in state STOPPED

END_CASE

Querying an active warning

• IF condition

• Query the module's intrinsic

warning

IF AlarmInformation.eReaction=
L_EATP_AlarmReactionType.Warning THEN

// Do something if warning is active

ELSE

// Do something else if warning is not active

END_IF

Querying the setpoint state of the master

• IF condition

• signal-based with method Status-

StateRequested

IF Status_UnitStateCurrent
(MM_Address:=L_EATP_CONST.OWNID) =
L_EATP_States_PackML.Execute THEN

IF Status_StateRequested(MM_Address:=
L_EATP_CONST.OWNID) = L_EATP_States_PackML. Completing

THEN

// Do something if actual state is EXECUTE and set

state to COMPLETING

;

END_IF

END_IF

Objective/call

Example

Advertising