ControlDeskCustomization
ControlDeskCustomization
Customization
For ControlDesk 2024‑A
To access the Web version of this document, click the following link or scan the QR code:
https://www.dspace.com/dspace-help/fGRG3
To access the Web version, you must have a mydSPACE account. For more information on the
mydSPACE registration process, refer to https://www.dspace.com/faq?097.
How to Contact dSPACE
Mail: dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
Tel.: +49 5251 1638-0
E-mail: info@dspace.de
Web: https://www.dspace.com
If possible, always provide the serial number of the hardware, the relevant dSPACE License
ID, or the serial number of the CmContainer in your support request.
Important Notice
This publication contains proprietary information that is protected by copyright. All rights
are reserved. The publication may be printed for personal or internal use provided all the
proprietary markings are retained on all printed copies. In all other cases, the publication
must not be copied, photocopied, reproduced, translated, or reduced to any electronic
medium or machine-readable form, in whole or in part, without the prior written consent
of dSPACE GmbH.
This publication and the contents hereof are subject to change without notice.
Contents
3
May 2024 ControlDesk Customization
Contents
Reference Information 69
Preview Features Page................................................................................... 69
Glossary 71
Index 109
4
ControlDesk Customization May 2024
About This Document
Symbol Description
Indicates a hazardous situation that, if not avoided,
V DANGER
will result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V WARNING could result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V CAUTION could result in minor or moderate injury.
Indicates a hazard that, if not avoided, could result in
NOTICE
property damage.
Indicates important information that you should take
Note
into account to avoid malfunctions.
Indicates tips that can make your work easier.
Tip
Indicates a link that refers to a definition in the
glossary, which you can find at the end of the
document unless stated otherwise.
Follows the document title in a link that refers to
another document.
Naming conventions dSPACE user documentation uses the following naming conventions:
5
May 2024 ControlDesk Customization
About This Document
Special Windows folders Windows‑based software products use the following special folders:
Tip
Tip
Tip
Accessing dSPACE Help and After you install and decrypt Windows‑based dSPACE software, the
PDF files documentation for the installed products is available in dSPACE Help and as PDF
files.
dSPACE Help (local) You can open your local installation of dSPACE Help:
§ On its home page via Windows Start Menu
§ On specific content using context-sensitive help via F1
PDF files You can access PDF files via the icon in dSPACE Help. The PDF
opens on the first page.
6
ControlDesk Customization May 2024
About This Document
7
May 2024 ControlDesk Customization
About This Document
8
ControlDesk Customization May 2024
Basics and Instructions
9
May 2024 ControlDesk Customization
Basics and Instructions
Introduction You can use ControlDesk events to create a project automatically when
ControlDesk starts up.
Demo script You can use the Started application event available the User event context ,
for example, to create a project automatically when ControlDesk starts up.
Using the demo to create To create a project automatically when ControlDesk starts up, perform the steps
a project when ControlDesk below:
starts up 1. In ControlDesk, run the script with the -install argument.
The -install argument inserts the code for project creation in the
user event context of ControlDesk's event configuration as a new event
handler . The event handler is activated.
10
ControlDesk Customization May 2024
Creating a Project When ControlDesk Starts Up
2. Close ControlDesk.
3. Restart ControlDesk.
When ControlDesk starts up, a default project is created.
Tip
References
11
May 2024 ControlDesk Customization
Basics and Instructions
Newly created projects mirror this structure and can be customized to your needs
this way. This customization can be helpful for using ControlDesk project folders
in parallel with other applications and to organize project files to your needs.
Default project template The default structure of ControlDesk projects is as described in Hierarchical
project structure (ControlDesk Project and Experiment Management ).
Modifying a project template The ControlDesk Template Editor lets you modify a project template in the
following ways:
§ Add, rename, or delete folders in the template structure.
§ Set file types to be shown in folders in the Project pane .
§ Set templates for the current user or all users.
§ Change folder names and their order according to specific naming
conventions.
§ Reset the project template to default.
Scope of project templates ControlDesk can read from two different template files:
§ Current user template: The current user template is located in the Local
Program Data folder under ControlDeskTemplate_Eng.xml. This file is
prioritized.
§ All-users template: The all-users template is located in the Common Program
Data folder under ControlDeskTemplate_Eng.xml. This file is used if a
current user template is not found.
As the template structure is stored within the project upon creation, you cannot
apply a template to a pre-existent project.
Applying a modified template After modifying a project template you need to restart ControlDesk and create a
new project for the template to take effect.
12
ControlDesk Customization May 2024
Modifying a Project Template
13
May 2024 ControlDesk Customization
Basics and Instructions
Introduction You can customize ControlDesk's ribbon by adding custom ribbon controls.
You have to link each custom ribbon control to a Python extension script ,
which allows you to add custom functions based on ControlDesk's automation
interface to the user interface.
As an example, the illustration below shows the Project custom ribbon tab
inserted before the View ribbon tab. The Project tab has two custom ribbon
groups, each of which contains various ribbon controls.
14
ControlDesk Customization May 2024
Customizing the Ribbon via Extension Scripts
Ribbon controls The illustration below shows all the available ribbon controls and their display
style:
§ Buttons and toggle buttons can have icons. The toggle buttons in the
illustration above are in the 'on' state.
§ Check boxes and radio buttons cannot have icons.
§ Split buttons and menu buttons have submenus.
A split button consists of two elements:
§ The upper element directly invokes a function.
Customization via extension The custom function to be carried out when the user invokes a custom ribbon
scripts control usually is implemented in a Python extension script. Extension scripts
are executed automatically when ControlDesk starts up and have full access to
ControlDesk's automation interface.
15
May 2024 ControlDesk Customization
Basics and Instructions
The configuration file must reference the extension script and the custom UI
extension file. Refer to XML Configuration Files (ControlDesk Automation ).
Example The following listing shows how to make the ControlDesk Signal
Editor ribbon invisible as an example:
Application.MainWindow.Ribbon.SetTabVisibility("ControlDeskNG.TabSignalEditor",False)
Examples
References
Getting the To get the RibbonTabExample started, perform the following steps:
RibbonTabExample started 1. Create the following folder if it does not yet exist:
%USERPROFILE%\Documents\dSPACE\
ControlDesk\2024‑A\ExtensionScripts
16
ControlDesk Customization May 2024
Customizing the Ribbon via Extension Scripts
ControlDesk now provides the Project custom ribbon tab before the View
built‑in ribbon tab. See the following illustration:
Understanding the example EXTSCRIPT configuration file The listing below shows the
RibbonTabExample.extscript configuration file. It references the extension
script and the custom UI extension file.
<?xml version="1.0" encoding="UTF-8"?>
<ExtensionScripts xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xsi:noNamespaceSchemaLocation="ExtensionScripts.xsd">
<PythonScript RelativePath="RibbonTabExample\RibbonTabExample.py" />
<CustomUI RelativePath="RibbonTabExample\RibbonTabExample.xml">
</ExtensionScripts>
17
May 2024 ControlDesk Customization
Basics and Instructions
class ApplicationEvents(object):
"""Defines the event sink for the application events.
def OnCommandExecuted(self, Command, Selection):
"""This method will be called if a command has been executed by the user.
Syntax : Obj.OnCommandExecuted()
Parameters : Command - object - The command that has been executed.
Selection - object - The currently selected objects.
Description : This method will be called if a command has been executed by the user.
Return Value: -
"""
Command = Dispatch(Command)
if Command.Key == "RibbonTabExample.ButtonProjectExperiment":
AddProject()
AddExperiment()
elif (...)
def AddProject():
(...)
def AddExperiment():
(...)
if __name__ == "__extension__":
# Advise event class.
ApplicationWithEventSink = DispatchWithEvents(Application, ApplicationEvents)
(...)
References
Introduction Describes the schema of the custom UI extension file, which is an XML file
specifying a custom ribbon extension.
customUI root element The custom UI extension file must contain the customUI root element with one
ribbon element. The ribbon element must contain a tabs element with at
least one tab element.
18
ControlDesk Customization May 2024
Customizing the Ribbon via Extension Scripts
tab element The custom UI extension file must contain at least one tab element.
A tab element specifies either a new custom ribbon tab or a built-in ribbon tab
that you want to customize.
Attribute Description
key The unique key of the ribbon tab.
(Mandatory) § If the user interface does not yet contain a ribbon tab with the specified key attribute, a new
custom ribbon tab is created.
§ If the user interface already contains a ribbon tab with the specified key attribute, this ribbon
tab is referenced. All the other tab attributes are ignored.
To get the keys of the built-in ribbon tabs, refer to Built-in tabs and their keys.
The attribute must be specified as a string value.
insertBefore The unique key of the ribbon tab that will be located to the right of the new custom ribbon tab.
(Optional) To get the keys of the built-in ribbon tabs, refer to Built-in tabs and their keys.
If you do not specify this attribute, the new custom ribbon tab will be inserted to the right of the
rightmost ribbon tab.
The attribute must be specified as a string value.
caption The title of the ribbon tab.
(Optional) This attribute must be specified if you specify a new custom ribbon tab.
The attribute must be specified as a string value.
keytip The keyboard tip1) of the ribbon tab.
(Optional) If you do not specify this attribute, a default keyboard tip is selected.
The attribute must be specified as a string value.
visible The initial visibility of the ribbon tab.
(Optional) If you do not specify this attribute, the ribbon tab is visible (default = True).
The attribute must be specified as a Boolean value.
1) A keyboard tip is a shortcut key active and displayed on the ribbon when the user
presses the Alt key.
19
May 2024 ControlDesk Customization
Basics and Instructions
Built-in tabs and their keys The table below shows ControlDesk's
built-in ribbon tabs and their keys to be used in connection with the
insertBefore attribute.
group element The custom UI extension file must contain at least one tab element with at least
one group element.
A group element defines a new custom ribbon group to be added to the related
ribbon tab.
20
ControlDesk Customization May 2024
Customizing the Ribbon via Extension Scripts
Attribute Description
key The unique key of the custom ribbon group.
(Mandatory) The attribute must be specified as a string value.
insertBefore The unique key of the ribbon group that will be located to the right of the new ribbon group.
(Optional) To get the keys of the built-in ribbon groups, refer to Built-in groups and their keys.
If you do not specify this attribute, the new custom ribbon group will be inserted to the right of the rightmost
ribbon group.
The attribute must be specified as a string value.
caption The title of the ribbon group.
(Mandatory) The attribute must be specified as a string value.
visible The initial visibility of the ribbon tab.
(Optional) If you do not specify this attribute, the ribbon tab is visible (default = True).
The attribute must be specified as a Boolean value.
icon The path to the icon file1) relative to the path of the custom UI extension file.
(Optional) The icon file is displayed if there is not enough space for the ribbon group and it needs to be compressed.
The illustration below shows the compressed Working Area ribbon group and the related icon file as an
example:
Built-in groups and their keys The table below shows ControlDesk's
built-in ribbon groups and their keys to be used in connection with the
insertBefore attribute.
21
May 2024 ControlDesk Customization
Basics and Instructions
Ribbon control elements A group element can contain any sequence of the following ribbon controls:
§ button element
§ toggleButton element
§ checkBox element
§ radioButton element
§ menu element
A menu element can contain any ribbon control elements.
§ splitButton element
A splitButton element has a submenu providing ribbon control elements.
Description Tooltip
22
ControlDesk Customization May 2024
Customizing the Ribbon via Extension Scripts
Attribute Description
key The unique key of the ribbon control.
(Mandatory) The attribute must be specified as a string value.
caption The title of the ribbon control.
(Mandatory) The attribute must be specified as a string value.
tooltip The title of the ribbon control's tooltip.
(Optional) The attribute must be specified as a string value.
description The description of the ribbon control's tooltip.
(Optional) The attribute must be specified as a string value.
icon The path to the icon file1) relative to the path of the custom UI extension file.
(Optional) The attribute must be specified as a string value.
keytip The keyboard tip2) of the ribbon control.
(Optional) If you do not specify this attribute, a default keyboard tip is selected.
The attribute must be specified as a string value.
style The display style of the ribbon control.
(Optional) The following styles are available:
§ automatic: The style is selected automatically.
§ text: Only the title of the ribbon control is displayed.
§ icon: Only the icon of the ribbon control is displayed.
§ icontext: The title is displayed on the right side of a 16x16 icon.
§ bigicontext: The title is displayed below a 32x32 icon.
If you do not specify this attribute, the ribbon control style is automatic.
The attribute must be specified as an enumeration value.
visible The initial visibility of the ribbon control.
(Optional) If you do not specify this attribute, the ribbon tab is visible (default = True).
The attribute must be specified as a Boolean value.
enabled The initial state of the ribbon control (enabled or disabled).
(Optional) If you do not specify this attribute, the ribbon tab is enabled (default = True).
The attribute must be specified as a Boolean value.
checked This attribute is available only for the following ribbon control elements:
(Optional) § toggleButton element
§ checkBox element
§ radioButton element
The initial on/off state of the ribbon control element.
Note
When you click a ribbon control element, its on/off state does not change. You can change the state via tool
automation only.
The listing below shows an example:
Application.MainWindow.CustomCommands["ExampleCustomUI.Button"].IsChecked = True
If you do not specify this attribute, the ribbon control is off (default = False).
The attribute must be specified as a Boolean value.
1) PNG or BMP file. Icon files should be transparent and have a size of 16x16 or
32x32 pixels.
2)
A keyboard tip is a shortcut key active and displayed on the ribbon when the user
presses the Alt key.
23
May 2024 ControlDesk Customization
Basics and Instructions
Label element A group element can contain any sequence of label elements.
Attribute Description
caption The text of the label in the ribbon.
(Mandatory) The attribute must be specified as a string value.
Separator element A group element can contain any sequence of separator elements.
Examples
24
ControlDesk Customization May 2024
Extending the Context Menu of Elements
Introduction ControlDesk's automation interface provides events that let you extend the
context menu of certain elements such as experiments, variable descriptions,
or layouts.
§ You can extend the context menu of file-type elements in the Project pane
that are represented by files such as:
§ Data sets
§ Experiments
§ Layouts and instruments
§ Measurement data files
§ Projects
§ Python scripts
§ Signal description sets
§ Variable descriptions
§ You can extend the context menu of the following elements:
§ Nodes in the Bus Navigator pane
§ Nodes in the Variables pane
Note
25
May 2024 ControlDesk Customization
Basics and Instructions
Events for extending the ControlDesk's automation interface provides the following events that allow you
context menu of elements to extend the context menu of elements:
§ The ContextMenuOpening event lets you specify the entries in the context
menu.
§ The CommandExecuted event lets you specify the command(s) to be carried
out.
Example The listing below shows how to extend the context menu of elements in the
Project pane:
§ Via the ContextMenuOpening event:
§ The Print Selection command is added to the context menu of all the
elements in the Project pane.
§ The Custom Instrument Commands submenu is added to the context
menu of instruments. The submenu structures the context menu extension
hierarchically. The submenu contains the Bring To Front command.
§ Via the CommandExecuted event, the commands to be carried out are
specified:
§ When you invoke the Print Selection command, the name of the selected
element or file is printed to the Interpreter pane.
§ When you invoke the Bring To Front command, the instrument selected in
the layout is brought to the front.
import win32com.client
import dspace.com
def On_Application_ContextMenuOpening(Menu, Selection):
"""
Syntax : On_Application_ContextMenuOpening
Purpose:
Parameters: Menu, Selection
"""
print"On_Application_ContextMenuOpening"
Menu.AddSeparator()
Cmd = Menu.AddCommand()
Cmd.Key = "PrintSelection"
Cmd.Caption = "Print Selection"
if len(Selection) > 0:
ComIdentity = dspace.com.GetComIdentity(Selection[0])
if ComIdentity.startswith("IVi") and ComIdentity.endswith("Instrument"):
Menu.AddSeparator()
SubMenu = Menu.AddSubMenu("Custom Instrument Commands")
Cmd = SubMenu.AddCommand()
Cmd.Key = "BringToFront"
Cmd.Caption = "Bring To Front"
26
ControlDesk Customization May 2024
Extending the Context Menu of Elements
HowTos
Example overview What you will learn The example shows you:
§ How to add a new command to the context menu of each layout in a project
via the ContextMenuOpening event.
§ For layout files in the Project pane, the new context menu command is
called Create Recorder from Layout(s).
§ For layouts in the working area, the new context menu command is called
Create Recorder from Layout.
§ How to specify the new context menu command via the CommandExecuted
event.
§ New recorders are created in the measurement configuration named after
the selected layouts.
27
May 2024 ControlDesk Customization
Basics and Instructions
§ Signals are added to the new recorders. Each recorder gets the signals that
are connected to the instruments of the associated layout.
Refer to the following illustration (for an animated graphic, refer to dSPACE
Help):
Tip
28
ControlDesk Customization May 2024
Extending the Context Menu of Elements
Adapting the script to your The following listing shows the flags you can change in the script to adapt it to
requirements your requirements.
#--------------------------------------------------------------------
# Define global flags used in this demo. This flags could be changed.
#--------------------------------------------------------------------
# Defining whether the layouts which are closed should be closed again after processing.
CloseLayouts = True
# Defining whether only measurement variable should be added to a recorder.
OnlyMeasurementsVariables = False
# Defining whether an existing recorder will be removed and a new one will be created.
OverwriteExistingRecorder = True
# Defining whether all log informations should be written to log.
Verbose = False
Adding a new command to The following listing shows you how to add a new command to the context
the context menu menu of a layout in the working area or a layout file in the Project pane.
§ If you open a context menu of layout in the working area, the command
Create Recorder for Layout is added.
§ If you open a context menu of a layout file in the Project pane, the command
Create Recorder from Layout(s) is added because multiple selection is
possible.
class ApplicationEvents(object):
(...)
def OnContextMenuOpening(self, menu, selection):
"""This method will be called, if a context menu has been opened by the user.
"""
menu = Dispatch(menu)
selectionCount = len(selection)
layoutCount = 0
layoutFilesCount = 0
# Analyse the content of the selection.
for item in selection:
(...)
if dspace.com.GetComIdentity(item) == "IXaLayoutDocument":
layoutCount = layoutCount + 1
elif dspace.com.GetComIdentity(item) == "IXaFile" and item.Type == Enums.FileType.Layout:
layoutFilesCount = layoutFilesCount + 1
# Choose which context menu must be extended.
if layoutCount > 0 and layoutCount == selectionCount:
# This is a context menu inside a layout.
menu.AddSeparator()
CommandCreateRecorderFromLayout = menu.AddCommand()
CommandCreateRecorderFromLayout.Key = COMMANDKEYCREATERECORDERFROMLAYOUT
CommandCreateRecorderFromLayout.Caption = "Create Recorder from Layout"
(...)
elif layoutFilesCount > 0 and layoutFilesCount == selectionCount:
# This is a context menu on experiment layout documents.
menu.AddSeparator()
CommandCreateRecorderFromLayout = menu.AddCommand()
CommandCreateRecorderFromLayout.Key = COMMANDKEYCREATERECORDERFROMLAYOUTS
CommandCreateRecorderFromLayout.Caption = "Create Recorder from Layout(s)"
29
May 2024 ControlDesk Customization
Basics and Instructions
Creating new recorders when The following listing shows you how to create new recorders for one ore
the command is executed more selected layouts or layout files when the new context menu command
is executed.
COMMANDKEYCREATERECORDERFROMLAYOUT = "CreateRecorderFromLayout.CommandCreateRecorderFromLayout"
COMMANDKEYCREATERECORDERFROMLAYOUTS = "CreateRecorderFromLayout.CommandCreateRecorderFromLayouts"
(...)
class ApplicationEvents(object):
(...)
def OnCommandExecuted(self, command, selection):
"""This method will be called, if a command has been executed by the user."""
(...)
if command.Key == COMMANDKEYCREATERECORDERFROMLAYOUT:
CreateRecorderFromLayouts(selection)
elif command.Key == COMMANDKEYCREATERECORDERFROMLAYOUTS:
CreateRecorderFromLayoutFiles(selection)
(...)
def CreateRecorderFromLayout(layout):
"""This function creates a recorder for the given layout document."""
global CurrentRecorder
recorderName = layout.Name
(...)
# Add the recorder.
(...)
CurrentRecorder = Application.MeasurementDataManagement.Recorders.Add(recorderName)
(...)
def CreateRecorderFromLayouts(layouts):
# Iterate through the layouts.
(...)
for layout in layouts:
(...)
CreateRecorderFromLayout(layout)
(...)
def CreateRecorderFromLayoutFiles(layoutFiles):
"""This function creates recorders for all given layout files."""
(...)
for layoutFile in layoutFiles:
(...)
# Get/Open the layout document and process the layout.
layout = layoutFile.Open()
(...)
# Create the recorder from the layout
CreateRecorderFromLayout(layout)
Adding signals to the new The command iterates over all instruments and connected variables of the
recorders selected layouts to add all relevant signals to the related recorders.
import LayoutManagementLib
COMMANDKEYCREATERECORDERFROMLAYOUT = "CreateRecorderFromLayout.CommandCreateRecorderFromLayout"
COMMANDKEYCREATERECORDERFROMLAYOUTS = "CreateRecorderFromLayout.CommandCreateRecorderFromLayouts"
(...)
class ApplicationEvents(object):
(...)
def CreateRecorderFromLayout(layout):
"""This function creates a recorder for the given layout document."""
(...)
# Iterate over the instruments of the layout.
LayoutManagementLib.IterateConnectedVariables(layout, OnConnectedVariable, WriteLogEntry, WriteErrorEntry)
(...)
30
ControlDesk Customization May 2024
Extending the Context Menu of Elements
EXTSCRIPT XML configuration The listing below shows the XML configuration file that references the extension
file example script and the ContextMenuExample.xml file:
References
31
May 2024 ControlDesk Customization
Basics and Instructions
User functions ControlDesk allows you to embed external applications or additional functions
as user functions. A user function is available in the Automation ribbon as a
button in the User Functions ribbon group.
For example, you can add the CalDemo ECU to ControlDesk as a user function
and assign a drive image as the user function button.
Executable files When you specify an executable file, ControlDesk starts the
corresponding application in a separate process. Files with the EXE, COM, or BAT
extension, for example, are executable files.
32
ControlDesk Customization May 2024
Adding User Functions to ControlDesk
Python scripts When you specify a PY or PYC file, ControlDesk runs it in the
Interactive Interpreter (see Interpreter (ControlDesk Automation )).
Note
References
Objective ControlDesk lets you start executable files and Python scripts from within
ControlDesk.
33
May 2024 ControlDesk Customization
Basics and Instructions
Tip
Result You have added an external program or a script as user function. A new button
with the specified icon appears in the Automation – User Functions ribbon
group.
References
34
ControlDesk Customization May 2024
Customizing Instrument Handling
Introduction You can add a Python script to an instrument or layout. This lets you extend
the functionality of the instrument or layout via the ControlDesk automation
interface.
You can use the events of an instrument or layout by integrating Python event
handler code in the instrument or layout script.
35
May 2024 ControlDesk Customization
Basics and Instructions
Tutorial video
Adding Python Code
to customize
This video shows you how to add a Python script to an instrument
the instrument.
To watch this video, click the following link or scan the QR code:
https://www.dspace.com/dspace-help/KrcKK
Script storage Instrument and layout scripts are stored together with the related instrument or
layout: For example, when you export an instrument containing an instrument
script, the exported instrument keeps the custom functionality.
This allows you, for example, to create custom instrument libraries with the
extended functionality.
Script execution Instrument scripts and layout scripts are executed automatically each time
the instrument or layout is initialized. An instrument is initialized, for example,
when the layout in which it is contained is opened.
Instrument and layout scripts are executed in a common Python interpreter that
is independent of the ControlDesk Internal Interpreter and that runs in a
separate process.
The common interpreter ignores Python search paths specified on the Python
Interpreter page. As an alternative, specify additional search paths directly in
the Python installation to make them accessible to the common interpreter.
Printing script outputs Printing script outputs to the Interpreter pane To print instrument or
layout script outputs to the Interpreter pane, you have to use the automation
of the Internal Interpreter .
The following listing shows an example:
Application.Interpreter.InteractiveWindow.Exec("print('Hello World.')")
36
ControlDesk Customization May 2024
Customizing Instrument Handling
Editing Python scripts with You can edit a Python script for an instrument or layout in ControlDesk's Code
the Code Editor Editor. The Code Editor offers a template containing the events of the selected
instrument or layout.
For details on the commands and buttons, refer to Code Editor Dialog
(ControlDesk Instrument Handling ).
Examples
References
37
May 2024 ControlDesk Customization
Basics and Instructions
Videos
Changing the Camera Distance via an Instrument Script (2:24) in dSPACE Help
Stopwatches (4:06) in dSPACE Help
Introduction The stopwatches in the Instrument Selector are examples for extending
instrument functionality via instrument scripts.
Tutorial video
Stopwatches
This video shows you how to extend instrument functionality via instrument
scripts. The stopwatches in the Instrument Selector are used as examples.
To watch this video, click the following link or scan the QR code:
https://www.dspace.com/dspace-help/nQN69
Basics on ControlDesk's The Stopwatches category in the Instrument Selector provides analog and
stopwatches digital stopwatches with and without lap time function.
See the following illustration (for an animated graphic, refer to dSPACE Help).
38
ControlDesk Customization May 2024
Customizing Instrument Handling
Example: Digital Stopwatch The following example shows how instrument scripts are used for the Digital
Stopwatch.
Start (Multiswitch ) To start the stopwatch To check whether the instrument's active state is changed, and to set
via the attached the clock_controller.Value to a specific value.
instrument script. Script excerpt:
def OnActiveStateChanged(self, sender, oldState):
if self.on_state is not None and self.on_state.IsActive:
self.clock_controller.Value = 0.0
39
May 2024 ControlDesk Customization
Basics and Instructions
Reset (Multiswitch ) To reset the stopwatch To check whether the instrument's active state is changed, and to set
via the attached the clock_controller.Value to a specific value.
instrument script. Script excerpt:
def OnActiveStateChanged(self, sender, oldState):
if self.on_state is not None and self.on_state.IsActive:
self.clock_controller.Value = 2.0
Digital clock (Static Text ) To display the current ‑ (no script attached)
time, which is calculated
by the script added to
the Clock controller.
Accessing the instrument To access the instrument scripts attached to a stopwatch, place the stopwatch
scripts on a layout, click a single instrument of the stopwatch in the Instrument
Navigator and open the attached script via the Properties pane.
References
Videos
40
ControlDesk Customization May 2024
Customizing Instrument Handling
Introduction The following example is based on the Instrumentation Demo. The example
visualizes the vertical movement of a mass connected to a spring.
The goal of this example is to show how to change item properties using an
instrument script . The movement of items in this example is not related to the
value change of connected variables, but is calculated by the instrument script
that is added to a Push Button.
The following illustration shows the result of the demo (for an animated graphic,
refer to dSPACE Help).
Instruments The example uses the following instruments. Both instruments are combined in
an instrument group.
Push Button The Push Button has a button labeled Start/Stop Simulation
to start or stop the simulation.
An instrument script is added to the Push Button. When you click the button, the
instrument script is executed.
41
May 2024 ControlDesk Customization
Basics and Instructions
3-D Viewer The 3-D Viewer visualizes the anchor, the spring and the mass.
Starting the simulation When you click the Start/Stop Simulation button, the ButtonClicked event
occurs and the OnButtonClicked function is executed.
According to the following script, a thread is started to execute the run function.
class SimulationTimer(Thread):
(…)
def __init__(self, func, interval):
"""Initialize the timer.
func: the function called by the timer
interval: the interval in seconds between function calls
"""
Thread.__init__(self)
self.func = func
self.interval = interval
self.finished = Event()
self.daemon = True
def cancel(self):
"""Cancel the timer.
"""
self.finished.set()
42
ControlDesk Customization May 2024
Customizing Instrument Handling
def run(self):
"""Run the timer.
"""
pythoncom.CoInitialize()
while True:
self.finished.wait(self.interval)
if self.finished.is_set():
break
self.func()
pythoncom.CoUninitialize()
Single simulation step As part of a single simulation step, the simulation_step function is called to
calculate the vertical displacement of the mass relative to the default position.
The simulation_step function calls the set_values function to calculate
the positions of the spring and the mass depending on the displacement
length_delta.
else:
self.simulation_timer.cancel()
self.simulation_timer = None
43
May 2024 ControlDesk Customization
Basics and Instructions
@locking
def set_values(self, length_delta):
(…)
demo = self.demo_instrument
(…)
spring = demo.Items.PointLines[0]
mass = demo.Items.PointLines[1]
# Remove the points of the spring and the mass
spring.Points.Clear()
mass.Points.Clear()
# Define arrays to save the positions of the spring points
spring_x = []
spring_y = []
spring_z = []
# Define various helpful variables
spring_end_y = self.spring_length_base_position + length_delta
point_count = math.floor((2 * math.pi * self.windings_count) / self.spring_angle_increment)
y_value = self.spring_ypos_anchor
y_increment = (self.spring_ypos_anchor - spring_end_y) / point_count
spring_angle = 0
spring_radius = 1
# Calculate the positions of the spring points and add them to the arrays
for i in range(point_count):
spring_x.append(math.sin(spring_angle) * spring_radius)
spring_y.append(y_value)
spring_z.append(math.cos(spring_angle) * spring_radius)
spring_angle += self.spring_angle_increment
y_value -= y_increment
# Add two additional points to the spring
spring_x.append(0)
spring_z.append(0)
spring_y.append(spring_y[-1])
spring_x.append(0)
spring_z.append(0)
spring_y.append(spring_y[-2] - 2)
# Define arrays to save the position of the mass
mass_x = [0]
mass_y = [spring_y[-1] - .4]
mass_z = [0]
# Use the arrays to add the points to the spring and the mass
spring.Points.AddRange(spring_x, spring_y, spring_z)
mass.Points.AddRange(mass_x, mass_y, mass_z)
Avoid item flickering via When you start the simulation using the previously shown instrument script, the
locking decorator spring and the mass flicker.
While calculating the position values for the items, there is a brief period of time
when all position values are cleared and both point lines are not visible. The
repeated appearance and disappearance of the point lines lead to flickering. To
fix this, the locking decorator is defined to lock the instrument until the new
points are added. The locking decorator is applied to the set_values function.
Whenever the function is called, the 3-D Viewer will lock before executing the
function and unlock afterwards.
44
ControlDesk Customization May 2024
Customizing Instrument Handling
def locking(func):
(…)
def wrapper(*args, **kwargs):
self_obj = args[0]
instr = self_obj.demo_instrument
try:
instr.Lock()
func(*args, **kwargs)
finally:
instr.Unlock()
return wrapper
Stopping the simulation When you click the Start/Stop Simulation button while a simulation is running,
the following script is executed as a part of the OnButtonClicked function.
elif self.simulation_timer is not None:
self.simulation_timer.cancel()
self.simulation_timer.join()
self.simulation_timer = None
self.set_values(0)
The script cancels the simulation thread and resets the spring and the mass to
their default position.
Examples
References
Videos
Changing the Camera Distance via an Instrument Script (2:24) in dSPACE Help
45
May 2024 ControlDesk Customization
Basics and Instructions
Introduction To extend the functionality of an instrument, you can add various types of
custom properties to it.
Custom properties are user-defined properties that you add to an instrument via
tool automation. Custom properties are part of the instrument.
You can trigger the execution of an instrument script , which contains the
extended instrument functionality, by changes of the custom property.
46
ControlDesk Customization May 2024
Customizing Instrument Handling
Workflow for instrument To extend the functionality of an instrument via custom properties, perform the
customization following steps:
1. Add a custom property to the instrument via an automation script or via the
Interpreter.
Refer to Adding and Configuring Custom Instrument Properties on
page 49.
2. Configure the custom property.
Refer to Adding and Configuring Custom Instrument Properties on
page 49.
3. Add an instrument script to the instrument, and trigger the
script execution by changes of the custom property via the
OnCustomPropertyChanged event.
Refer to Triggering Instrument Script Execution by Custom Property Changes
on page 53.
Types of custom instrument Each custom property has a specific type, such as String or Collection.
properties
The following table shows the available custom property types, and the related
enumeration values.
47
May 2024 ControlDesk Customization
Basics and Instructions
48
ControlDesk Customization May 2024
Customizing Instrument Handling
The following illustration shows an example in which the names of the custom
properties contain the type of the custom property.
Example: Map instrument ControlDesk provides the Map instrument that uses a number of custom
properties.
References
Introduction You can extend the functionality of an instrument by adding custom properties
to it.
49
May 2024 ControlDesk Customization
Basics and Instructions
Adding custom properties You add custom properties via the Add method of the instrument's
CustomProperties interface.
The following line shows how to add the Default Color property to an
instrument. The enumeration value '6' stands for the Color property type.
NewProperty = Instrument.CustomProperties.Add(6, 'Default Color')
The following illustration shows the resulting Default Color custom property.
50
ControlDesk Customization May 2024
Customizing Instrument Handling
Configuring properties You can use the properties or methods of the CustomProperties interface to
configure a custom property. The following table shows some examples.
51
May 2024 ControlDesk Customization
Basics and Instructions
You can define a collection of items with the same properties. In the
Properties pane, the user can edit the item list in a dialog.
Collection = instrument.CustomProperties.Add(8,'Items')
# Define a template for the custom properties
Collection.Template.Add(1,'Name')
Collection.Template.Add(3,'Value1')
Collection.Template.Add(3,'Value2')
# Add items to item list
Collection.Items.Add()
Collection.Items.Add()
Collection.Items.Add()
Collection.Items.Add()
# Specify the item's properties
a = Collection.Items[0].Item(1)
a.Value = 54
b = Collection.Items[0].Item(2)
b.Value = -97
52
ControlDesk Customization May 2024
Customizing Instrument Handling
References
Introduction The following example shows you how to the execution of an trigger instrument
script by custom property changes.
Custom property example The example is based on a Variable Array with the Row Background Color
custom property. The property was added to the instrument with the following
code line:
cp = MyVariableArray.Add(6, 'Row background color')
53
May 2024 ControlDesk Customization
Basics and Instructions
The following illustration shows the Row Background Color custom property.
class InstrumentEvents(object):
The following illustration shows the effect on row 1 when the Row Background
Color custom property is changed.
54
ControlDesk Customization May 2024
Customizing Instrument Handling
References
55
May 2024 ControlDesk Customization
Basics and Instructions
Introduction This utility is a MATLAB® script that lets you compare measurement data from
different sources, such as MATLAB® simulations or ControlDesk recordings.
Description The utility lets you import MAT files with measurement data from different
sources, and display the differences in a MATLAB plot chart. For example,
56
ControlDesk Customization May 2024
Utilities and Software Demos
Availability of the utility The utility is available via the dSPACE website. Refer to
http://www.dspace.com/go/utility_cd_plot.
Introduction This utility finds all instruments that are connected to a selected variable.
Description This utility adds a new ribbon group to the Layouting ribbon and a new
command to the context menu of the Variables pane.
Ribbon group The new Find Variable on Layouts ribbon group provides
the following three elements:
§ Find Next
§ Clear Selection
§ Only on active layout
57
May 2024 ControlDesk Customization
Basics and Instructions
Context menu The context menu of the Variables pane provides the
following new commands:
§ Find Variable on Layouts
§ Find Variable on Active Layout (if the Only on active layout checkbox is
selected in the ribbon group)
Availability of the utility The utility is available via the dSPACE website. Refer to
http://www.dspace.com/go/utility_cd_find_var_on_lay.
Introduction This software demo offers a Time Plotter with buttons for changing the display
settings.
Description § You can change the display settings of the Time Plotter via the buttons.
§ You can customize the instrument by changing the instrument script of each
button.
58
ControlDesk Customization May 2024
Utilities and Software Demos
Availability of the software The software demo is available via the dSPACE website. Refer to
demo http://www.dspace.com/go/swdemo_cd_func_timeplt.
HowTos
References
Introduction This software demo offers two instruments that let you go online or offline and
start or stop a measurement, even if ControlDesk is in full-screen mode.
59
May 2024 ControlDesk Customization
Basics and Instructions
The instruments let you use these commands even if ControlDesk is in full-screen
mode.
Availability of the software The software demo is available via the dSPACE website. Refer to
demo http://www.dspace.com/go/swdemo_cd_state_change_instr.
HowTos
Introduction This software demo provides a calculated variable that computes the load rate of
a platform.
60
ControlDesk Customization May 2024
Utilities and Software Demos
Description The following illustration shows an example of using the LoadRate variable in
instruments.
Availability of the software The software demo is available via the dSPACE website. Refer to
demo http://www.dspace.com/go/swdemo_cd_load_rate_val.
Introduction If you have stored CDFX data sets or sub data sets in the file system, this utility
extends the possibilities to use them in ControlDesk.
§ You can replace data sets in ControlDesk with data sets from the file system.
§ You can reload data sets in ControlDesk if you have imported them from the
file system.
61
May 2024 ControlDesk Customization
Basics and Instructions
§ When you start online calibration, ControlDesk checks the originally imported
data set files of involved data sets for changes.
Description This utility adds new commands to the context menu of a data set and to the
ControlDesk ribbon.
Context menu The context menu of a data set is extended by the following
commands.
§ Replace
§ Reload
Availability of the utility The utility is available via the dSPACE website. Refer to
http://www.dspace.com/go/utility_cd_rep_rel_ds.
62
ControlDesk Customization May 2024
Utilities and Software Demos
HowTos
How to Select Additional Data Sets for Downloading on Online Calibration Start
(ControlDesk Calibration and Data Set Management )
Introduction The Adding Signals from Measurement Data Files utility lets you add signals from
measurement data files opened in the ControlDesk Measurement Data Pool to
a plotter if the signals correspond to currently measured signals visualized in that
plotter. You can remove the signals from the plotter later on.
Description The Adding Signals from Measurement Data Files utility makes it easy for you
to compare currently measured signals to the corresponding signals stored in
measurement data files and opened in the ControlDesk Measurement Data
Pool.
Unlike the ControlDesk Switch Data Source command, the Adding Signals
from Measurement Data Files utility lets you compare signals from several
measurement data files at the same time. You can apply the utility to individual
plotters, not to an entire layout.
The utility extends the context menu of the ControlDesk Time Plotter and
the Index Plotter for this purpose by the commands shown in the following
illustration:
63
May 2024 ControlDesk Customization
Basics and Instructions
Only the corresponding signals are added to the plotter, regardless of the other
signals in the measurement data file.
The corresponding signals are visualized on the same y axis as the currently
measured signal.
Availability of the utility The utility is available via the dSPACE website. Refer to
http://www.dspace.com/go/utility_cd_add_signals_from_meas_file.
64
ControlDesk Customization May 2024
Utilities and Software Demos
After utility installation, the context menu of struct variables provides the
following commands:
§ Add Struct Variable to Measurement Signal List
§ Remove Struct Variable to Measurement Signal List
Note
3. Restart ControlDesk.
You have added the utility to your ControlDesk installation.
65
May 2024 ControlDesk Customization
Basics and Instructions
Using the utility Adding a struct variable to the measurement signal list:
ControlDesk adds the variables of the struct to the measurement signal list:
66
ControlDesk Customization May 2024
Utilities and Software Demos
67
May 2024 ControlDesk Customization
Basics and Instructions
68
ControlDesk Customization May 2024
Reference Information
Reference Information
The dialog can be opened via the Options Command (ControlDesk User
Interface Handling ).
Description Preview features are features in an early but completely tested development
stage. They might benefit from user feedback before being finally integrated into
the regular product.
Note
§ The final version of the feature might be incompatible with the preview
version.
§ Do not activate preview features in the operator mode or if you use the
ControlDesk ‑ Operator Version .
Available preview features The Preview Features page lists all available
preview features with short explanations and lets you enable and disable them
via a checkbox.
The following table lists the available preview features grouped by ControlDesk
version:
69
May 2024 ControlDesk Customization
Reference Information
References
70
ControlDesk Customization May 2024
Glossary
Glossary
Introduction Briefly explains the most important expressions and naming conventions used in
the ControlDesk documentation.
Numerics................................................................................................. 72
A............................................................................................................. 72
B............................................................................................................. 73
C............................................................................................................. 74
D............................................................................................................. 78
E............................................................................................................. 82
F.............................................................................................................. 84
G............................................................................................................. 85
H............................................................................................................. 86
I.............................................................................................................. 86
K............................................................................................................. 88
L.............................................................................................................. 88
M............................................................................................................ 89
N............................................................................................................. 93
O............................................................................................................. 93
P............................................................................................................. 94
Q............................................................................................................. 96
R............................................................................................................. 97
S............................................................................................................. 98
71
May 2024 ControlDesk Customization
Glossary
T........................................................................................................... 101
U........................................................................................................... 102
V........................................................................................................... 103
W.......................................................................................................... 105
X........................................................................................................... 106
Numerics
A2L file A file that contains all the relevant information on measurement
and calibration variables in an ECU application and the ECU's communication
interface(s). This includes information on the variables' memory addresses and
conversion methods, the memory layout and data structures in the ECU as well
as interface description data (IF_DATA) .
Application image An image file that contains all the files that are created
when the user builds a real-time application. It particularly includes the variable
description (SDF) file. To extend a real-time application, ControlDesk lets the user
create an updated application image from a data set. The updated application
72
ControlDesk Customization May 2024
B
Bar An instrument (or a value cell type of the Variable Array ) for displaying
a numerical value as a bar deflection on a horizontal or vertical scale.
Bitfield A value cell type of the Variable Array for displaying and editing
the source value of a parameter as a bit string.
Browser An instrument for displaying Web pages and different file types,
e.g., PDF, HTML and TXT files.
73
May 2024 ControlDesk Customization
Glossary
Bus Navigator
§ Bus Navigator in ControlDesk
A ControlDesk component for handling bus messages, such as CAN messages,
LIN frames, and Ethernet packets.
§ Bus Navigator (stand-alone)
A dSPACE software product for handling bus messages, such as CAN
messages, LIN frames, and Ethernet packets.
There are some restrictions when you use the Bus Navigator (stand-alone). For
example, going online and measuring is only supported for bus monitoring
devices.
Using the Bus Navigator (stand-alone) does not require a license for the
ControlDesk main version.
Bus Navigator pane A pane for handling bus messages, such as CAN
messages, LIN frames, and Ethernet packets.
Bus statistics A feature of the Bus Navigator that lets you display
and log statistical information on the bus load during monitoring (of bus
communication) .
74
ControlDesk Customization May 2024
C
conditions, but without having to have a real ECU connected to the PC.
Communication between the CalDemo ECU and ControlDesk can be established
via XCP on CAN or XCP on Ethernet, and UDS on CAN.
Tip
The memory of the CalDemo ECU consists of two areas called memory page .
Each page contains a complete set of parameters, but only one page is accessible
by the CalDemo ECU at a time. You can easily switch the memory pages of the
CalDemo ECU to change from one parameter to another in a single step.
Two ECU tasks run on the CalDemo ECU:
§ ECU task #1 runs at a fixed sample time of 5 ms. In ControlDesk's
Measurement Configuration, ECU task #1 is related to the time-based 5 ms,
10 ms, 50 ms and 100 ms measurement rasters of the CalDemo ECU.
§ ECU task #2 has a variable sample time. Whenever the CalDemo ECU program
is started, the initial sample time is 5 ms. This can then be increased or
decreased by using the dSPACE CalDemo dialog.
ECU task #2 is related to the extEvent measurement raster of the
CalDemo ECU.
The CalDemo ECU can also be used to execute diagnostic services and jobs,
handle DTCs and perform measurement and calibration via ECU diagnostics.
The CalDemo ECU program is run by invoking CalDemo.exe. The file is located
in the .\Demos\CalDemo folder of the ControlDesk installation.
CAN Bus Monitoring device A device that monitors the data stream on a
CAN bus connected to the ControlDesk PC.
The CAN Bus Monitoring device works, for example, with PC-based CAN
interfaces such as the DCI-CAN2 or the DCI-CAN/LIN1 .
The device supports the following variable description file types:
§ DBC
§ FIBEX
§ AUTOSAR system description (ARXML)
75
May 2024 ControlDesk Customization
Glossary
The CANGenerator allows you to use the CAN Bus Monitoring device under
realistic conditions, but without having to have any device hardware connected
to the PC.
The CAN (Controller Area Network) protocol is used for communication between
the CANGenerator and ControlDesk. However, since the CANGenerator runs
on the same PC as ControlDesk, ControlDesk does not communicate with the
device via a real CAN channel, but via a virtual CAN channel implemented on
the host PC.
You can start the CAN generator program by running CANGenerator.exe.
The file is located in the .\Demos\CANGenerator folder of the ControlDesk
installation.
CCP device A device that provides access to an ECU with CCP connected
to the ControlDesk PC via CAN, for example, for measurement and calibration
purposes via CCP (CAN Calibration Protocol) .
Check Button An instrument (or a cell type of the Variable Array ) for
displaying whether the value of a connected variable matches predefined values
or for writing a predefined value to a connected variable.
76
ControlDesk Customization May 2024
C
%PROGRAMDATA%\dSPACE\<ProductName>\<VersionNumber>
Tip
Connection mode dSPACE real‑time systems can be installed within the host
PC or connected to the host via a bus interface and/or via Ethernet. When the
Ethernet is being used, different network clients might exist. The connection
type being used and, in the case of Ethernet, the network client being used,
determine the dSPACE systems that can be accessed.
77
May 2024 ControlDesk Customization
Glossary
Data cursor One or two cursors that are used to display the values of
selected chart positions in a Time Plotter or an Index Plotter .
Data logger signal list A list that contains the variables to be included in
subsequent data loggings on real-time hardware.
78
ControlDesk Customization May 2024
D
79
May 2024 ControlDesk Customization
Glossary
Each device usually has a variable description that specifies the device’s
variables to be calibrated and measured.
Diagnostic job (often called Java job) Programmed sequence that is usually
built from a sequence of the diagnostic service . A diagnostic job is either a
single-ECU job or a multiple-ECU job, depending on whether it communicates
with one ECU or multiple ECUs.
80
ControlDesk Customization May 2024
D
Display An instrument (or a value cell type of the Variable Array ) for
displaying the value of a scalar variable or the text content of an ASCII variable.
Tip
81
May 2024 ControlDesk Customization
Glossary
82
ControlDesk Customization May 2024
E
ECU Image file A binary file that is part of the ECU application . It usually
contains the code of an ECU application and the data of the parameters within
the application. It can be stored as an Intel Hex (HEX) or Motorola S‑Record
(MOT or S19) file.
Error category The error category defines how a signal is disturbed. Which
errors you can create for a signal depends on the connected fault simulation
hardware.
Error type The error type specifies the way an error category – i.e., an
interruption or short circuit of signals – is provided. The error type defines the
disturbance itself.
83
May 2024 ControlDesk Customization
Glossary
Ethernet Bus Monitoring device A device that monitors the data stream on
an Ethernet network connected to the ControlDesk PC.
The device supports the following variable description file type:
§ AUTOSAR system description (ARXML)
Ethernet decoding A feature of the Bus Navigator that lets you view
protocol data and raw data of an Ethernet frame.
Event context The scope of validity of event sources and events . There is
one event handler code area for each event context.
Event handler Code that is executed when the related event occurs.
Extension script A Python script (PY or PYC file) that is executed each time
ControlDesk starts up. An extension script can be executed for all users or
user-specifically.
Fault memory Part of the ECU memory that stores diagnostic trouble code
(DTC) entries with status and environment information.
84
ControlDesk Customization May 2024
G
Firmware update An update for the firmware installed in the board’s flash
memory. Firmware should be updated if it is older than required by the real-time
application to be downloaded.
Fixed axis An axis with data points that are not deposited in the ECU
memory. Unlike a common axis , a fixed axis is specified within a curve or
map . The parameters of a fixed axis cannot be calibrated.
Flash job A specific diagnostic job for flashing the ECU memory. A flash
job implements the process control for flashing the ECU memory, such as
initialization, security access, writing data blocks, etc.
GNSS device A device that provides positioning data from a GNSS receiver
(e.g., a serial GPS mouse) in ControlDesk.
The device that supports various global navigation satellite systems.
85
May 2024 ControlDesk Customization
Glossary
GPX file An XML file that contains geodata, such as waypoints, routes, or
tracks. In ControlDesk, you can import GPX files to visualize GNSS positioning
data in a Map instrument.
Index Plotter A plotter instrument for displaying signals that are measured
in an event-based raster (index plots).
86
ControlDesk Customization May 2024
I
§ Display
§ Fault Memory Instrument
§ Frame
§ Gauge
§ Heading Indicator
§ Hierarchy Array
§ Index Plotter
§ Invisible Switch
§ Knob
§ Multistate Display
§ Multiswitch
§ Numeric Input
§ On/Off Button
§ Push Button
§ Radio Button
§ Selection Box
§ Slider
§ Sound Controller
§ Static Text
§ Steering Controller
§ Table Editor
§ Time Plotter
§ Variable Array
§ XY Plotter
87
May 2024 ControlDesk Customization
Glossary
error messages and standard output during the execution or import of Python
scripts.
Knob An instrument for displaying and setting the value of the connected
variable by means of a knob on a circular scale.
Label list A list of user-defined variables that can be used for saving
connected variables, etc.
LIN Bus Monitoring device A device that monitors the data stream on a LIN
bus connected to the ControlDesk PC.
The LIN Bus Monitoring device works, for example, with PC-based LIN interfaces.
The device supports the following variable description file types:
§ LDF
§ FIBEX
§ AUTOSAR system description (ARXML)
Load type The load type specifies the option to disturb a signal with or
without load rejection.
88
ControlDesk Customization May 2024
M
Tip
Logging (of bus communication) A feature of the Bus Navigator that lets
you log raw bus communication data. You can add logger nodes on different
hierarchy levels of the Bus Navigator tree for this purpose. You can specify
filters to log filtered bus communication. The logged bus communication can be
replayed .
Look-up table A look-up table maps one or more input values to one output
value. You have to differentiate between the following look-up table types:
§ A 1-D look-up table maps one input value to one output value.
§ A 2-D look-up table maps two input values to one output value.
§ An n-D look-up table maps multidimensional table data with 3 or more input
values to one output value.
Look-up table is a generic term for curves and maps .
89
May 2024 ControlDesk Customization
Glossary
§ A 1‑dimensional array containing the axis points for the y‑axis. This array can
also be specified by a reference to a common axis .
§ A 2–dimensional array containing data points. The map assigns one data point
of the array to each pair of x‑axis and y‑axis points.
Maps are represented by the symbol.
Map file A file that contains symbols (symbolic names) and their physical
addresses. It is generated during the build process of an ECU application .
90
ControlDesk Customization May 2024
M
Measurement variable Any variable type that can be measured but not
calibrated.
91
May 2024 ControlDesk Customization
Glossary
Multistate LED A value cell type of the Variable Array and Hierarchy
Array for displaying the value of a variable as an LED state.
92
ControlDesk Customization May 2024
N
Numeric Input An instrument (or a value cell type of the Variable Array )
for displaying and setting the value of the connected variable numerically.
Observing variables Reading variable values cyclically from the dSPACE real-
time hardware and displaying their current values in ControlDesk, even if no
measurement is running. Variable observation is performed without using a
measurement buffer, and no value history is kept.
For platforms that support variable observation, variable observation is available
for parameters and measurement variables that are visualized in single-shot
instruments (all instruments except for a plotter ). If you visualize a variable
in a single‑shot instrument, the variable is not added to the measurement signal
list . Visualizing a parameter or measurement variable in a plotter automatically
adds the variable to the measurement signal list .
ControlDesk starts observing variables if one of the following conditions is true:
§ Online Calibration is started for the platform.
All the parameters and measurement variables that are visualized in single‑shot
instruments are observed.
§ Measurement is started for the platform.
All the visualized parameters and measurement variables that are not
activated for measurement in the measurement signal list are observed. Data
of the activated parameters and measurement variables is acquired using
measurement rasters.
93
May 2024 ControlDesk Customization
Glossary
On/Off Button An instrument (or a value cell type of the Variable Array )
for setting the value of the connected parameter to a predefined value when the
button is pressed (On value) and released (Off value).
Pane A separate area of the ControlDesk user interface that provides access
to a specific component, such as the Bus Navigator.
94
ControlDesk Customization May 2024
P
§ Weak limits
Weak limits designate the value range of a parameter that you should not
cross during calibration. When you cross the value range defined by the weak
limits, ControlDesk warns you.
In ControlDesk, you can edit the weak limits of a parameter within the value
range given by the parameter’s hard limits.
95
May 2024 ControlDesk Customization
Glossary
Push Button An instrument (or a value cell type of the Variable Array ) for
setting the value of the connected parameter by push buttons.
96
ControlDesk Customization May 2024
R
Radio Button An instrument for displaying and setting the value of the
connected parameter by radio buttons.
Record layout A record layout is used to specify a data type and define the
order of the data in the memory of the target system (ECU, for example). For
scalar data types, a record layout allows you to add an address mode (direct or
indirect). For structured (aggregated) data types, the record layout specifies all
the structure elements and the order they appear in.
The RECORD_LAYOUT keyword in an A2L file is used to specify the various record
layouts of the data types in the memory. The structural setup of the various data
types must be described in such a way that a standard application system will be
able to process all data types (reading, writing, operating point display etc.).
Reduction data Additional content in an MF4 file that allows for visualizing
the MF4 file data depending on the visualization resolution. Reduction data
therefore improves the performance of the visualization and postprocessing of
measurement data.
Reference data set A read-only data set assigned to the reference page of a
device that has two memory pages . There can be only one reference data set
for each device. The reference data set is read‑only.
97
May 2024 ControlDesk Customization
Glossary
Note
Replay (of bus communication) A feature of the Bus Navigator that lets
you replay logged bus communication data from a log file. You can add replay
nodes to the Bus Navigator tree for this purpose. You can specify filters to replay
selected parts of the logged bus communication .
SDF file A file that describes a dSPACE simulation application , including the
contained parameters and measurement variables. SDF files are created during
the build process.
98
ControlDesk Customization May 2024
S
Selection Box An instrument for selecting a text-value entry and setting the
respective numerical value for the connected variable.
Signal
§ Representation of a variable measured in a specific measurement raster .
§ Generic term for segment signals and operation signals .
A signal is part of a signal description set which can be displayed and edited
in the working area.
Signal file A file that contains the wiring information of a simulator and that
is part of the standard dSPACE documentation of dSPACE Simulator Full-Size.
Normally, dSPACE generates this file when designing the simulator. Before using
a fault simulation system, users can adapt the signal file to their needs.
Signal Selector A pane of the Signal Editor . The Signal Selector provides
signals and segments for arranging and configuring signal description
sets in the working area .
99
May 2024 ControlDesk Customization
Glossary
Slider An instrument (or a value cell type of the Variable Array ) for
displaying and setting the value of the connected variable by means of a slide.
Standard axis An axis with data points that are deposited in the ECU
memory. Unlike a common axis , a standard axis is specified within a
curve or map . The parameters of a standard axis can be calibrated, which
affects only the related curve or map.
100
ControlDesk Customization May 2024
T
Struct A variable with the struct data type. A struct contains a structured list
of variables that can have various data types. In ControlDesk, a struct variable
can contain either parameters and value blocks or measurement variables and
measurement arrays. ControlDesk supports nested structs, i.e., structs that
contain further structs and struct arrays as elements.
Structs are represented by the symbol.
STZ file A ZIP file containing signal descriptions in the STI format. The STZ file
can also contain additional MAT files to describe numerical signal data.
Sub data set A data set that does not contain the complete set of the
parameters of a platform/device.
Time cursor A cursor which is visible at the same time position in the
following instruments:
§ In all Time Plotters
§ In all XY Plotters
§ In all bus monitoring lists
101
May 2024 ControlDesk Customization
Glossary
You can use the time cursor to view signal values at a specific point in time. If
you move the time cursor, all measured signals and the respective parameters
are updated. Instruments and bus monitoring lists display the values that are
available at the selected time position.
Time Plotter A plotter instrument for displaying signals that are measured
in a time-based raster (time plots).
TRC file A variable description file with information on the variables available
in an environment model running on a dSPACE platform .
Unassigned data set A data set that is assigned neither to the working
page nor to the reference page of a platform/device. An unassigned data set
can be defined as the new working or reference data set. It then replaces the
“old“ working or reference data set and is written to the corresponding memory
page, if one is available on the platform/device.
102
ControlDesk Customization May 2024
V
Tip
A device for which the connection between ControlDesk and the device
hardware currently is interrupted is also set to the 'unplugged' state when
you start online calibration if both the following conditions are fulfilled:
§ The device's Start unplugged property is enabled.
§ The Start online calibration behavior property is set to 'Ignore
differences'.
This is possible for CCP and XCP devices. For details on the two properties
listed above, refer to General Settings Properties (ControlDesk Platform
Management ).
103
May 2024 ControlDesk Customization
Glossary
Variable alias An alias name that lets the user control the property of a
segment by a model parameter of a real-time application.
Vehicle information The ODX database can contain information for one
or more vehicles. Vehicle information data is used for vehicle identification
purposes and for access to vehicles. It references the access paths (logical links)
to the ECUs.
VEOS A simulator which is part of the PC and allows the user to run an
offline simulation application (OSA) without relation to real time.
104
ControlDesk Customization May 2024
W
VEOS platform A platform that configures and controls the offline simulation
application (OSA) running in VEOS and that also provides access to the
application's environment VPU .
Working area An area of the user interface of ControlDesk where you can
edit documents, such as layouts , Python scripts, or signal description sets .
Each document is displayed on a separate page .
Working data set The data set currently residing in the memory of a
platform/device hardware. There can be only one working data set for each
calibration platform/device. The working data set is read/write.
105
May 2024 ControlDesk Customization
Glossary
XCP on CAN device A device that provides access to an ECU with XCP
connected to the ControlDesk PC via CAN. Using the XCP on CAN device, you
can access the ECU for measurement and calibration purposes via XCP (Universal
Measurement and Calibration Protocol).
XCP on Ethernet device A device that provides access to an ECU or
V‑ECU with XCP connected to the ControlDesk PC via Ethernet. The XCP
on Ethernet device provides access to the ECU/V-ECU via XCP (Universal
Measurement and Calibration Protocol) for measurement and calibration
purposes.
106
ControlDesk Customization May 2024
X
XIL mapping file An XML file according to the ASAM XIL standard
that contains, for example, all the information required for variable
mapping (identifier mapping):
§ Framework labels
§ Testbench labels
§ Label mappings
XIL mapping files can be created by different tools in the dSPACE XIL mapping
tool chain, for example, by ConfigurationDesk. In ControlDesk, framework labels
from these files can be used for variable mapping.
107
May 2024 ControlDesk Customization
Glossary
108
ControlDesk Customization May 2024
Index
Index
A
adding a Python script to an instrument or
layout 35
adding custom properties to an instrument 46,
49
adding user functions to ControlDesk 33
B
basics
user functions 32
C
Common Program Data folder 6, 76
context menu of elements
extending 25
custom UI extension file
schema 18
D
Documents folder 6, 81
E
extending the context menu of elements 25
I
instrument
adding a Python script 35
adding custom properties 46, 49
Instrument Selector 87
L
Local Program Data folder 6, 89
M
Measurement Data Pool 90
Messages pane 91
P
Platforms/Devices pane 95
Project pane 96
Properties pane 96
S
schema
custom UI extension file 18
U
user functions 32
109
May 2024 ControlDesk Customization
Index
110
ControlDesk Customization May 2024