Introduction

The Sequential Function Chart (SFC) data type family includes derived data types, such as the structures that restore the properties and status of the chart and its component actions.

Each step is represented by two structures. These are:

  • the SFCSTEP_STATE structure

  • the SFCSTEP_TIMES structure

Illustration:

NOTE: The two structure types SFCSTEP_STATE and SFCSTEP_TIMES are also linked to each Macro step of the sequential function chart.

Definition of the SFCSTEP_STATE Structure Type

This structure includes all types of data linked to the status of the step or of the Macro step.

These data types are:

  • x: BOOL elementary data type (EDT) containing the value TRUE when the step is active,

  • t: TIME elementary data type (EDT) containing the activity time of the step. When deactivated, the step value is maintained until the next activation,

  • tminErr: BOOL elementary data type (EDT) containing the value TRUE if the activity time of the step is less than the minimum programmed activity time,

  • tmaxErr: BOOL elementary data type (EDT) containing the value TRUE if the activity time of the step is greater than the maximum programmed activity time,

These data types are accessible from the application in read only mode.

Definition of the SFCSTEP_TIMES Structure Type

This structure includes all types of data linked to the definition of the runtime parameters of the step or of the Macro step.

These data types are:

  • delay: TIME elementary data type (EDT), defining the polling delay time of the transition situated downstream from the active step,

  • tmin: TIME elementary data type (EDT) containing the minimum value during which the step must at least be executed. If this value is not respected the data tmin.Err switches to the value TRUE,

  • tmax: TIME elementary data type (EDT) containing the maximum value during which the step must at least be executed. If this value is not respected the data tmax.Err switches to the value TRUE.

These data types are only accessible from the SFC editor.

Data Access Syntax of the Structure SFCSTEP_STATE

The instance names of this structure correspond to the names of the steps or macro steps of the sequential function chart

Syntax

Comment

Name_Step.x

Used to find out the status of the step (active\inactive)

Name_Step.t

Used to find out the current or total activation time for the step

Name_Step.tminErr

Used to find out if the minimum activation time of the step is less than the time programmed in Name_Step.tmin

Name_Step.tmaxErr

Used to find out if the maximum activation time of the step is greater than the time programmed in Name_Step.tmax