• 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
  • Redundancy in Automation System

Using Kinematics to Control Robotic Arm Redundant Control System Example

Redundancy in Automation System

Introduction

The purpose of this example is to demonstrate how a redundancy framework and CDPPort with PortMUX can be used to achieve switching between redundant applications providing two alternative sources of input data. Redundancy is typically used to achieve high availability for mission-critical systems to allow parts of the system to fail while the system as a whole does not lose its function. Depending on the system requirements this requires both the hardware and the software in the system to be redundant. This example demonstrates only one aspect of making a redundant solution, selecting between two sources of redundant data.

The example does not cover setting up controllers and redundant networks between the controllers to achieve hardware redundancy, but just to show that building redundant systems with CDP Framework is feasible.

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 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 three applications:
    • Consumer - contains RDSelector, PortMUX and WaveAnalyzer components which are connected by WaveData and Control ports.
    • ProducerA and ProducerB - two identical applications that contain WaveSource (the wave data generator) and RDSelector.

In this example, the Consumer application has a Control port that contains Time, Offset, and Amplitude for the producer WaveSource control.

The Consumer application's RDSelector block continuously monitors the producer applications by contacting their RDSelector block. The PortMUX then uses the LeaderIndex from the RDSelector to switch between the two separate sources of WaveData to have stable sine and cosine signals for the WaveAnalyzer.

The two identical producer applications ProducerA and ProducerB task is to get data (e.g. Time, Offset, and Amplitude) via the WaveSource port from the Consumer application and, based on this data, generate the sine and cosine waves out to the WaveData port.

Note: To make configuring ProducerB easier, it was created as a clone of ProducerA using the CDP Studio Cloning Existing Applications feature. This means that ProducerB is a Clone of ProducerA and therefore needs no manual configuration. When the producer applications need configuration changes, only ProducerA have to be changed. The CDP Studio Update From Source feature can be used to apply those changes to ProducerB. For more details, refer to the CDP Studio Configure Mode manual Cloning Existing Applications.

RDSelector

The RDSelector block from redundancy framework is used to detect the currently most well-functioning producer application. For that, the block listens to the heartbeat messages on the prioritized TCP communication channel and elects one of them as the most well-functioning (i.e. leader) and sets its LeaderIndex output accordingly.

The RDSelector blocks are configured identically in both producer applications and in the Consumer application. For more information about the RDSelector and other redundancy framework blocks, see Framework - Redundancy.

Note: Note, that for this simple example the redundancy framework RDSynchronizer block was not needed to be used. RDSynchronizer is only needed when the redundant applications have some internal states to sync. In this example, both ProducerA and ProducerB are simple and stateless applications that only generate the wave data based on the given input.

PortMUX

The standard PortMUX component is used to switch between the two producer application WaveData ports. The WaveData ports in PortMUX contain ValuedConnections for values, to speed up the multiplexer switching. When the data is locally available the switching will be considerably faster compared to when the output port of the PortMUX would need to connect to the values in the producer application when the switch occurs.

Testing the redundancy

The project also contains Analyze mode plot configurations file called RDPlots.cac, which can be loaded in Analyze mode. When running the example system and looking at the plotted values it is possible to monitor the redundancy source switching. For this, one of the Producer applications needs to be stopped, this can be done in Application Output pane by using the stop button in the correct applications tab. The Consumer plot contains the Index value showing the WaveData source being used.

Using Kinematics to Control Robotic Arm Redundant Control System Example

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