• 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

  • Protocols - ExternalControl I/O
  • Additional ExternalControlBroker Setup Guides
  • 5.0.0

SMTP Setup Guide Troubleshooting ExternalControl I/O Request Setup

Additional ExternalControlBroker Setup Guides

Additional ExternalControlBroker Setup Guides

Below are a few more examples of different usage scenarios of ExternalControlBroker requests in CDP Studio, the independent automation software for open PC-based real-time distributed control systems. These examples are described briefly to give you ideas on how ExternalControlBroker requests can be used and configured.

Regularly Check Network Or Sensor Bus Connectivity And Run Command On Failure

For that use the following guidelines:

  • Create LocalCommandRun named TestPING with TriggerOnTimeout=300 (for every 5 minutes) to run CommandLine="ping [LINUX:-c:][WINDOWS:-n:] 3 ipaddress"
  • Create another LocalCommandRun with TriggerRouting="App.Comp.TestPING.LastReturnCode" so the command will be launched when App.Comp.TestPING.LastReturnCode changes from 0 (ping OK) to 1 (ping fails) to run some actions (fe. remote device reset)

Log Signal Values to Some Text File Every 30 Minutes

For that use the following guidelines:

  • Create LocalCommandRun with CommandLine="[LINUX:cat:][WINDOWS:more:] >> signal-log.txt"
  • Optionally, set WorkingDirectory to point to the folder you want the log file to be created into
  • Add RequestSignalChannel with Routing to your actual signal to log
  • Set TriggerOnChange=false, TriggerOnTimeout=1800

Get Initial Configuration Values From JSON Configuration File on System Startup

For that use the following guidelines:

  • Add FILERequest with URL="configuration.json", Method=GET
  • Add ResponseChannels with names that match JSON tag names in your configuration file
  • Set ResponseTranslator to JSONTranslator

Get UPS Status From Linux (f.e. Using UPSC Service)

For that use the following guidelines:

  • Add LocalCommandRun with CommandLine="upsc myups ups.status 2>/dev/null"
  • Add ResponseSignalChannel<short> named UPSStatus for UPS status
  • Add three ValueMap<short> for ups.status output to be translated into signal short value, for example:
    • StreamValue="OL" -> ChannelValue=0 (for UPS on-line status)
    • StreamValue="OB" -> ChannelValue=1 (for UPS on-battery status)
    • StreamValue="LB" -> ChannelValue=-1 (for UPS low-battery status)
  • add some actions based on this UPSStatus signal changing (f.e. by triggering alarm using AlarmOperator)

Start Some Background Task Always at CDP Application Start, That Is Closed Automatically on Application Stop

For that use the following guidelines:

  • Add LocalCommandRun with required background task set in CommandLine
  • Set ResponseWaitTimeout=0

Create Signal Database Using RRD (Round Robin Database)

For that use the following guidelines:

  • Create LocalCommandRun with CommandLine like
    rrdtool create signals.rrd --step 300 DS:signal1:GAUGE:600:-50:50 DS:signal2:GAUGE:600:-50:50 RRA:MAX:0.5:1:288

    for creating the database on CDP start (the command does nothing if the database already exists)

  • Create another LocalCommandRun with CommandLine
    rrdtool update signals.rrd N:%d:%d

    for updating 2 values into the database from the 2 ReguestSignalChannels added and routed from the signals you need to log

  • Optionally, for regular graph image (re)generation to be invoked by CDP, add another LocalComandRun with CommandLine like
    rrdtool graph output.png -w 400 -h 120 -a PNG --start -604800 --end now DEF:signal1=signals.rrd:signal1:MAX DEF:signal2=signals.rrd:signal2:MAX LINE1:signal1#ff0000:"Signal 1" LINE1:signal2#0000ff:"Signal 2"

    and set TriggerOnTimout to the graph update frequency needed

Note: Consult RRDTool manual for further information how to set up and use RRD databases and graphs.

Send Alarm Notifications to Mobile Device

You can send alarm notifications to the mobile device using some appropriate service provider, for example Pushover, like that:

  • Create free (or paid) account on Pushover to get the User Key and the Application API Token/Key from it
  • Create a notification HTTPRequest, like this:
    • Add an HTTPRequest having URL="https://api.pushover.net/1/messages.json" and Method=POST
    • Add 3 RequestSignalChannel<string> channels named user, token and message. Set user channel value to be User Key and token channel value to be Application API Token/Key
    • Add a WWWURLEncodeTranslator<ostream> to form key-value pairs for POST request from these channels
    • Configure also the message channel value, either to be static/same message all the time or by routing its value from some other component of the system
    • Configure appropriate HTTPRequest send triggering (for example using TriggerOnRouting set on some alarm signal)
    • On every HTTPRequest triggered the notification with the message will be sent to the mobile device

SMTP Setup Guide Troubleshooting ExternalControl I/O Request Setup

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