1 state transition (state entry/state exit), State transition (state entry/state exit), Architecture: the applicationtemplate in detail – Lenze PLC Designer ApplicationTemplate (PLC Designer R3-x) User Manual

Page 91

Advertising
background image

Lenze · ApplicationTemplate · 1.3 EN - 04/2013

91

Architecture: The ApplicationTemplate in detail

Where can the response of a machine module be programmed?

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

9.8

Where can the response of a machine module be programmed?

[9-22] Example: Status-related actions of the MAP_Module1_App1 FB

9.8.1

State transition (state entry/state exit)

Every change of a status-related action (within an action or from an action) sets a specific flag for a

task cycle to "TRUE".

• xStateEntry: The status-related action sets this flag to "TRUE" during the entry for one task cycle.
• xStateExit: The status-related action sets this flag to "TRUE" during the exit for one task cycle.

[9-23] Program example: S04_SERVICE action

The response of a machine module (in a

specific state) can be programmed in the

prepared Actions of the ApplicationTemplate.

• Actions are marked with the

icon.

During every cycle, always the action

representing the current status of the machine

module's state machine is passed through.

• Program parts which are only required if

the machine module is in a specific state

have to be stored directly within these

predefined actions.

• The MM_EmptyModule module template

contains a predefined structure with

(empty) actions.

IF xStateEntry THEN

// Put state entry code here

// ...

END_IF

// Put cyclic code here

// ...

Note!

The following procedure is to be taken into consideration for task timing-related

program commands: At a state transition, actions are assigned to the individual task

cycles in the same way as for the sequential function chart AS:

• At the "Ready""Automatic" state transition, the task cycle...

• ...first passes through the S02_READY action with a set xStateExit flag.
• ...then passes through the S05_AUTOMATIC action with a set xStateEntry flag.

Advertising