Framework - CDP Core
Overview - Control Design Platform
CDP is an acronym for 'Control Design Platform'. It is the middleware that provides the base objects and infrastructure in CDP Systems. CDP Studio is the front-end for managing CDP Systems. The whole package is referred to as CDP Studio. It was initially designed for implementation of advanced signal processing and regulator algorithms, such as control of multivariable and nonlinear systems, and has since been proven in multiple application areas.
CDP is configuration-driven. When an application starts up, it creates the Application object, which reads and configures the rest of the objects in the application. After all the objects in the application have been configured, they are activated, and the components' state-machines start running at their respective frequencies. When a system is running, the CDP subsystem takes care to deliver values and messages to the correct components at the correct time.
Since components of the same priority are run sequentially, the developer must not do blocking operations (e.g. waiting for some data to arrive) in the process functions, as this will negatively impact other components. This means that any operations that take a significant amount of time relative to the component frequency shoud be handled in a separate thread. See OSAPITask and OSAPIThread for more information on how to do this. Typically, all blocking I/O in CDP is performed in threads inside IOServer components.
An IOServer is a component that knows how to transform CDP data to and from some protocol implemented by some (hardware) device. Developers can create their own IOServers, or use pre-made CDP IOServers (available in Resource tree). Examples of protocols used in pre-made CDP IOServers, are CANopen, Modbus, I2C, NMEA, SNMP and generic binary UDP protocols.
The StudioAPIServer is used by CDP Studio to communicate values to and from a CDP system. It uses Google protobuf (Protocol Buffers) on top of websockets to expose CDP data. A pre-made Semantic UI example that interfaces the StudioAPIServer is available and can be added to the application by running a Wizard. Implementations of StudioAPI are available in java, c++ and javascript.
Development
CDP Applications are developed in two ways.
- The simplest way is to use CDP Studio Configure Mode to set up a system based on ready-made components. Add different models from the Resource tree into the application, and they will be instantiated as components.
- The other possibility is to program new functionality into libraries, like state transitions and what to do in the different states. The libraries are collections of components and objects that are available in the Resource tree in Configure mode.
When components are added to the applications, properties can be configured. Configuration is done in the Configuration editor. To configure the Routing-property on CDPSignals, type in the path from where you want to fetch the data values (e.g. applicationname.componentname...signalname). When running the application, CDP will automatically connect to other applications/components as long as they are on the same network.
Note: Signal update rate:
If the component requesting a signal runs at e.g. 5Hz, and the component updating the requested signal runs at 10Hz, the signal-packet will be sent with 5Hz frequency.
If the component requesting a signal runs at e.g. 20Hz, and the component updating the requested signal runs at 10Hz, the signal-packet will be sent with 20Hz frequency, but the values will not change values faster than 10Hz.
The maximum frequency a signal-packet can be sent with, is limited by the fs of the CDP component MessengerIOServer. The default fs of MessengerIOServer is 10Hz, but will be increased automatically if needed (currently up to max 10000Hz), and may also be reduced down again (not lower than 10Hz).
GUI
In CDP Studio Design Mode, User Interfaces can be edited using Drag and Drop. GUI properties and svg styling can be used to change the look and feel of this Qt-based GUI. Other GUIs are supported through the StudioAPI, these GUI's can use the StudioAPI to retrieve and set values and structural elements. The pre-made StudioAPI web-server example can be used as a starting-point for making a full-fledged HTML5 GUI that can make your system accessible on all modern devices.
Testing
A system can be manually tested during development and commissioning. Manual testing is easily done through the Configure mode. Run the system locally or remotely, and connect to it. Values will now be available to inspect and change, and data can be graphed and examined in Analyze mode. See also CDP Messagelog for information about application console output.
CDP applications provide a way to do simple debugging using a web browser. Look for "StudioAPIServer: CDP Browser available at http://127.0.0.1:7689/browse" in the Application Output pane, to get the correct URL. Read more in the CDP Browser manual.
Debugging
The integrated debugger makes it possible to attach and debug local or remote applications, step through the code and inspect and change the variables to verify that the software performs the function it was designed for. See Debug Mode Manual.
See also
Contents
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.