CDP Studio - Configure Mode Manual
The purpose of configure mode is to allow the user to view and modify system configuration by adding or removing items (nodes) to/from configuration, connecting items through routings and setting/monitoring values. There are two main views available in Configure mode. A table based editor of configuration called Table Editor and diagram based view called Block Diagram. Editor Selector on the Configure mode toolbar can be used to switch between the views.
The Configure mode consists of
- Toolbar that contains back and forward buttons, Editor Selector, location bar, Search Filter, and Editor buttons
- Editor area that by default shows Configuration editor
- Project tree with its own Search Filter
- Resource tree with its own Search Filter
- Configuration editor shows the view selected by Editor Selector
Contains resources that that can be added to selected item (node). When adding a resource, the library containing the resource is automatically added as an application dependency and thus deployed together with the application. In cases where resources are only required during run-time, there is a possibility to manually add the library as a dependency without the need to use them beforehand. This can be beneficial when some resources are not used in development phase but become useful in production e.g operators for signals.
Just right click on the top level resource (library) to open up context menu and click "Add as Dependency". Note that all library dependencies that this application has, are shown as bold.
To remove the dependency choose "Remove as Dependency" from the same menu. Be aware that this will fail if the application still has resources it uses from that particular library. All usages are required to be removed first, to be able to remove the dependency.
Block Diagram View
Block Diagram shows a visual representation of the system or configuration and gives a good overview. Systems can be built in the Block Diagram by adding components/blocks and creating connections.
Default setup shows components (non-value items) as blocks. Signals, connectors, parameters, ports etc (value items) are shown as inputs/outputs on the block. Different colors mark different item types. To simplify the overview, only signals, connectors and ports are shown by default. The routing between blocks are shown as connection lines. The inputs to the block are shown on the left and outputs on the right.
When a connections source or destination (sink) is outside the current level, the connection line starts or terminates with a External variable label. The connection label displays the block name where the value(s) are used. To view these specific values, hover over the connection line for the tooltip.
Connections are drawn from left to right and for connections that cannot be drawn in this direction Loopback labels are used. Loopback labels always come in pairs. The loopback labels are used to avoid having back loops. The order of components/objects in their tables decides which connections will use Loopback labels. This is due to the fact that in CDP the processing of components depends on the order they are listed in sidebar. Connections that are made in the same direction as the processing order can be processed in the same cycle. The connection that go in the opposite direction require a separate cycle for each connection in the reverse direction.
It is possible to use manual layout by simply unchecking the Auto Layout checkbox or by dragging components to desired position. You can always click Fit In View to get the whole layout centered and as big as possible. While being in manual layout mode, make sure the component/object order is optimal for data propagation and if needed reorder the components/object in the sidebar. This can be done simply by dragging components/objects in the sidebar up and down. Notice that once auto layout is checked again, all manual layout changes are lost.
To view a specific Component's configuration, select it in the Project tree. To navigate into a block in the Block Diagram, double-click on the block. To navigate out from the block, double-click on the background. To navigate into an Input or Ouput on a block, double-click on the Input or Output pin. It is also possible to navigate to a connection line sources or sinks by double-clicking on the labels representing the sources and sinks.
Creating and Deleting Components and Connections/Routings
Components (blocks) are added from the Resource tree by drag-and-drop or right-click a component and select Add.
The Connections can be created in the Block Diagram by simply hovering over an output, left-click and then drag the mouse pointer to the input of the destination (sink) block.
To make a connection between two blocks on different levels (not in same view), right click on the output, select Copy Path, navigate to the destination block and right click on the input and select Connect....
There is also a way to pin/unpin blocks for easier connecting between different levels. Just choose Pin from block context menu and the block will be present in every view. To unpin use the pinned block context menu or select Unpin All from backgroung context menu.
Deleting an item, simply select the block/line and press Delete on the keyboard or right click and select Delete....
By default, some items (nodes) displayed in Block Diagram are filtered out. To toggle filters, do the following:
- In the Configure mode toolbar click on the filter icon.
- Hide Base Model Items filter. This hides all nodes that are inherited from node's base model except nodes having Important flag (or DisplayHint="Important" in model).
- Hide Internal Items. When enabled, nodes having Internal flag (or DisplayHint="Internal" in model) are hidden from tables.
- Hide Properties. When enabled, Property type values are not shown as Outputs on blocks.
- Hide Parameters. When enabled, Parameter type values are not shown as Input/Output on blocks.
- Hide GUI Connections. When enabled, connections to GUI forms are hidden.
- Show Only Connections. When enabled, when both Input and Output are unconnected that variable is hidden on blocks.
- Show Only Dependencies. When enabled, only single connection line will be shown between any two blocks to indicate dependency.
Some inputs/outputs might have special badges to display additional information about them.
- Push badge means data is pushed instead of pulled.
- Fx badge means the item has operators inside.
Table Editor View
To view a specific Component's configuration, select it in the Project tree. Some objects such as Signals and Parameters will also have more detailed configuration available. To view this information, click the button in front of their name in the section.
The Configure mode toolbar has back and forward navigation buttons as well as a location bar which displays the path of the current selected object. You can select any parent object in the location bar to navigate to it. Selecting the current object however will list all its siblings, allowing quick switching between objects of the same type.
By default, some nodes displayed in Table Editor are filtered out. To toggle filters, do the following:
- In the Configure mode toolbar click on the filter icon.
- Toggle Hide Base Model Items filter. This hides all nodes that are inherited from node's base model except nodes having Important flag (or DisplayHint="Important" in model).
- Toggle Hide Internal Items. When enabled, nodes having Internal flag (or DisplayHint="Internal" in model) are hidden from tables.
To edit a property of an object, click on its table cell and enter a new value. Some types of properties have special editing mechanisms, such as checkboxes, combo boxes or autocompletion. Note that read-only or missing properties will be greyed out and can not be selected.
Tip: You can use searchbox of the section to filter the content based on the input
Multi-row (bulk) edit
Multiple rows of property tables can be changed simultaneously by selecting rows and applying changes to selection at once.
Rows can be selected in many ways:
- by holding down Ctrl key and clicking on name field of row
- by clicking on name field of the range start row and then, holding down Shift key, clicking on the name field of range end row
- by right clicking on name field of any row and by choosing Select All from the context menu
- by clicking on the Name column header current selection will be inverted. F.e. if no rows were previously selected then this will select all rows.
Selected rows will be shown highlighted.
When rows are selected, you can change properties in all of them just by editing the value in one row. Property values in corresponding column in all selected rows will be changed to the same value automatically.
You can rename selected rows by right clicking on the name field of any row and by choosing Rename from the context menu. All rows will be renamed based on the new base name entered (by adding numbers at the end of the new base name).
Note: Multi-row edit will not change read-only values. Also, multi-row does not accept you to enter values that will not fit into all selected rows (f.e. you can not enter negative value into signed type cell in cases when row of unsigned type is in selection).
Copy/paste and export/import of configuration
In case you need to configure set of similar objects (for example multiple signals all having similar operators), you can simplify the task by creating and configuring only one of the objects and then duplicating it with copy and paste functionality.
To copy an object, right click on it in Project tree or Configuration editor section and choose Copy from the context menu. This will copy all changes made to the object (or object tree) to the system clipboard.
Alternatively, you can choose Import/Export->Export... to output these changes to file.
When multiple rows are selected in Configuration editor table, copy or export will apply to all of them.
To paste or import configuration, right click on the object you want to paste or import into in Project tree or Configuration editor section and choose Paste or Import/Export->Import... from the context menu. Alternatively, you can paste or import new member into the object list by clicking on the empty name column on "add new" row (next to the button).
Note: Copy and export will copy only changes to the object model default values. In other words, it will not copy any property or subelement of the object that is not changed by you (compared to the model default value).
This means that default values are not overridden on paste/import destination. For example, if you do Copy on CDPSignal with Input="0" (unchecked) and paste it into a component which contains CDPSignal with same name but has Input="1" (checked), then the paste target signal will remain as Input="1" because Input="0" was CDPSignal default value and therefore was not copied.
On the other hand, if you do Copy on CDPSignal with Input="1" (checked) and paste it into a component which contains CDPSignal with same name but has Input="0" (unchecked), then the paste target signal will become Input="1" as it is not CDPSignal default value and therefore was copied.
You can export large sets of configured objects or object trees into export file for later use with import.
Export file is actually text file that contains lines with configuration changes to be applied. Export file has following columns:
- CDP version number
- object path
- object model name
- object value
You can choose between two export formats:
- Comma separated file (*.csv)
- Tab separated file (*.tsv)
Note: To avoid version conflicts, paste and import actions are version sensitive. So you can not copy/paste or export/import between systems of different CDP versions. If you import or paste from other version, these changes are simply ignored (not applied).
To import configuration from other CDP version you have to review export file manually and alter or remove version number (first column of every line) using text editor.
If copy or import encounters situation where destination object is already existing, then popup message will ask you for conflict resolving strategy to use. There are 4 strategies to choose from:
- Add - will add conflicting object as new object (by adding number at the end of the original name)
- Replace - replace conflicting object (remove original and add new from paste/import)
- Merge - keep conflicting object as is and paste/import content properties or subelements into it
- Skip - do not paste/import conflicting object and its properties nor subelements
Configuring Network Interface
Several NetworkInterfaces can be defined, one for each ethernet adapter, and must have unique names. To give a specific adapter a specified IPAddress, make sure that the MAC attribute is correct, if not, the adapters are assigned in the order they are found by the CDP network-detection algorithm.
If you specify a network address that is not found in a network adapter, CDP will assign it the ip address 127.0.0.1. Subsequent non-existing ip-addresses will each be assigned a unique localhost address.
To change the network interface configuration, open the NetworkInterface property in the configuration editor. In the opened view, click the edit icon and fill in the desired configuration.
- In the Project tree select the application or a component, to which You will be adding subcomponents.
- In Resource tree right click a component that You want to add.
- Select "Add" in the context menu.
Added Components of a system are visible in the Project tree and in the Subcomponents table.
To remove a component from an application, right click its name in the Project tree or in the Subcomponents section and select Delete.... In Configuration editor Sections it is possible to use Shift or Ctrl keys to select multiple names for removal.
The "Activate" value must be set to "1" if the component is to be activated when it is created. A component must be activated to receive messages and run the periodic process. If you set activate to a number greater than 1, this is the number of seconds to pass before the component is activated. If you set activate to 0, the component will start as suspended.
Subcomponents, remote connections, alarms, signals, parameters and properties are all members of the component.
The normal procedure for component configuration is simply to edit the settings for the already defined members. Components will often use relative paths in the configuration, which often means that it is not necessary to edit the component configuration when creating a new instance.
But, it is also possible to add additional members in the component.
A compressed description with a summary of what to be aware of is presented here for the different member types.
Adding Members to a Component
Component Sections which support adding additional members will display an extra row. Here you can input the configuration of the extra member. Clicking the "+" button will add it to the section.
Members can also be added from the Resource tree.
Subcomponents are specified in the Subcomponents section, usually no changes necessary.
Signal routing should be verified and may have to be set up individually for each component instance. In Configure mode, the Issues pane will show all broken routings (when not connected to the system).
Alarms have many configuration setting, pay attention to references to signals or components.
Parameter values should be verified and changed if necessary.
Several additional manuals describe their setup in user manuals. See help mode to find more information about specific IOServers.
Watch list allows quick access to objects like signals, parameters, messages, components, etc. without the need to look for them in system's hierarchy. All objects act as bookmarks and can be navigated to with double click. In addition objects that have a value can be edited in place. Watch list can be found next to Resource tree .
To add an object to Watch list, simply drag any object from Configuration editor and drop it on Watch list. Alternatively you can open context menu by right clicking on an object , selecting "Add to Watch..." and then "Add" .
By running the application on a workstation it is possible to verify that the application performs as expected without having to upload to the controller hardware. This simplifies the process of testing and also allows for testing of the software before the controller hardware is available.
Hardware IO signals can be simulated or, if the hardware I/O is accessible, it is often possible to communicate with the I/O from the workstation as well. Be aware of limited real-time performance when running on Windows platforms and Linux-platforms without Real-time patches and preemptive kernels.
I/O signals can be simulated or overridden manually from the configuration editor.
Adding Applications to the System
To add an application to your system, see the Adding Applications manual.
Route Input Signals
Testing can be performed by creating a simulator component, which reflects the outside world for your component. By changing signal routing it is easy to connect to simulated signals or hardware IO as the testing proceeds.
Add a signal from the Resource tree to one of your components and set its routing property to listen to another application. You also need to set the Input flag of the signal.
Running the System
To run the system, right click on the system name and select Run & Connect from the context menu, see Running and Connecting to the System. Once the connection has been established, the user interface will begin showing real-time changes to the structure and values of your system. Note that some configuration options will no longer be available once the system is connected.
Note: It is also possible to select each individual application to run by right-clicking an application and selecting Run. When all required applications are running, it is possible to right-click on the system and select Connect. This will connect CDP Studio to all the running applications in the selected system.
Real time values of the Application signals.