• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Examples and Tutorials
  • Using Sequence Steps to Operate Doors

Using Anti-Sway on a Crane Creating a Reusable GUI Element

Using Sequence Steps to Operate Doors

Introduction

The purpose of this example is to demonstrate how to use the Sequencer to create control steps that must run in sequence one after another. This example uses Sequencer basic blocks to build simple no-code state machines.

The example emulates a simple door with a lock system to allow UI and control system to work without real hardware.

The whole example uses only no-code programming similar to PLC IEC 61131-3 and for sequence steps IEC 61499. This example makes use of CDPPorts as interfaces to simplify the overall system design.

How to Run the Example

To run the example from CDP Studio, open Welcome mode and find it under Examples. Next, in Configure mode right-click on the library project and select Build, then right-click on the system project and select Run & Connect. See the Running the Example Project tutorial for more information.

Project Overview

This example includes:

  • A system project containing two applications:
    • ControlApp - contains the control and emulation logic.
    • GUI - contains widgets to display door and lock positions/controls and the progress of ongoing operations.

In this example, it is possible to start two separate sequences from the GUI.

  • Open Sequence to unlock and open the door
  • Close Sequence to close and lock the door

The two GUI buttons make use of message buttons to send messages to DoOpen and DoClose event inputs in ControlApp.OperateDoor block to start those sequences. The GUI alarm panel shows door operation alarms, which can be emulated by disconnecting something in the system during runtime. For example, remove the routing for ControlApp.DoorsEmulator.EmuLockOpen.In before starting Open Sequence.

The sequences are defined in ControlApp.OperateDoor. The Steps: UnlockDoor, OpenDoor , CloseDoor, LockDoor make use of the Sequencer basic blocks. The blocks are then connected in two chains to create separate DoOpen and DoClose sequences. When for some reason the required status signals on DoorStatus port don't change before Timeout, each block will send a Abort message.

The sequences defined in ControlApp.OperateDoor also indicates if the block is active at the moment, by using a green tint on the block background color. This is true for all Sequencer blocks and basic block state machines.

The Abort event messages are collected by ControlApp.DoorReporter that reports an alarm each time such message arrives at its Alarm input. The reporting block also uses Sequencer basic block to set and clear alarm input in the AlarmOperator DoorControlAlarm.

There is an emulation block ControlApp.DoorsEmulator that emulates door open and lock states with simple delay operators and two very simple cyclic state machines also implemented with the Sequencer basic blocks, but this time without event support. This kind of state machine is equivalent to CDPComponent state machine.

Using Anti-Sway on a Crane Creating a Reusable GUI Element

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top