Example: SequenceEditor
Product: CODESYS Application Composer
This example shows how to use the sequence editor which is integrated in the CODESYS Application Composer. With the corresponding graphical editor, modules are displayed and edited according to the sequence flow.
Description
You can use the sequence editor to edit the module tree in the form of a graphical sequence representation. To do this, you need to define and program the steps which should be added to the program sequence later as corresponding modules.
![]() |
For more information, see: Mechatronics library and mse.Sequence section.
Additional information
The AC_Mechatronics.library
library provides an OMAC program manager (simple) which is based on the OMAC State Model ( www.omac.org). The program manager allows for different states of the OMAC State Model, each to be equipped and displayed with a sequence.
![]() |
To use the AC_Mechatronics.library
library, you need to create modules which are inserted in the program sequences of the library. These program sequences are parameterized and instantiated in the sequence editor. If you want to use module sequence steps in a program sequence, then they must implement the AC_MEC.IProgramSequenceStep
interface.
AC_Mechatronics.library
library:If a sequence step should be used in a program sequence, then the
StepBase
module is the easiest way to extend it. In this way, the step directly implementsAC_MEC.IProgramSequenceStep
and can be used in program sequences. Within the extension ofStepBase
, theExecute
method must be overridden, which you can see in this example. TheExecute
method of the currently active step is executed and called until this step signals the end of its task by setting theDone
property toTRUE
.The
AC_Mechatronics.library
library already provides some basic steps. This includes, for example, sequence steps which represent jumps (ConditionalJump
) or branches (BranchOnBool
,BranchOnComparison
).Within the scope of the
AC_Mechatronics.
library, it is possible for sequence steps to act on the actuator modules which they reference. A slot is provided for actuators below anAC_Mechatronics.library
machine (top-level module in this library). In order to insert them there, the actuators must implement the emptyAC_MEC.IActuator
interface.Below the machine (module defined in
AC_Mechatronics.library
), there is a slot for a program manager module which contains the OMAC state behavior. Sequences for each OMAC state can be inserted below the program manager module. The Program Manager module has inputs and outputs to control the OMAC states (for example, to send astart
orstop
command to the program manager).Compare with the OMAC diagram.
System requirements and restrictions
Programming system | CODESYS Development System (version 3.5.17.0 or higher) |
Runtime system | CODESYS Control Win (version 3.5.17.0) |
Add-on components | CODESYS Application Composer |
Note
DOWNLOAD Projects