Automation Desk Accessing Model Desk
Automation Desk Accessing Model Desk
Accessing ModelDesk
For AutomationDesk 2024‑A
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
Reference Information 23
Automation Blocks................................................................................................. 24
Application........................................................................................................ 24
StartModelDesk................................................................................ ............ 25
CloseModelDesk........................................................................................... 26
ProjectAndExperiment........................................................................... ............ 26
OpenProjectAndExperiment........................................................................... 27
ActivateExperiment....................................................................................... 28
CloseProjectAndExperiment........................................................................... 29
Maneuver.......................................................................................................... 30
ActivateManeuver......................................................................................... 30
DownloadActiveManeuver............................................................................ 31
SaveActiveManeuver..................................................................................... 32
ManeuverControl.................................................................................. ............ 33
StartManeuver.............................................................................................. 33
StopManeuver.................................................................................. ............ 35
ResetVehicle.................................................................................................. 37
GetManeuverState........................................................................................ 38
Road.................................................................................................................. 40
ActivateRoad................................................................................................. 41
DownloadActiveRoad.................................................................................... 41
SaveActiveRoad............................................................................................. 42
Traffic................................................................................................................ 42
ActivateTrafficScenario.................................................................................. 43
DownloadActiveTrafficScenario...................................................................... 44
SaveTrafficScenario........................................................................................ 44
3
May 2024 AutomationDesk Accessing ModelDesk
Contents
Parameter.......................................................................................................... 45
GetScalarParameter....................................................................................... 46
SetScalarParameter........................................................................... ............ 47
GetVectorParameter...................................................................................... 47
SetVectorParameter....................................................................................... 48
GetMatrixParameter...................................................................................... 49
SetMatrixParameter....................................................................................... 50
GetLUT1DParameter......................................................................... ............ 50
SetLUT1DParameter...................................................................................... 51
GetLUT2DParameter......................................................................... ............ 52
SetLUT2DParameter...................................................................................... 53
GetGenericParameterValue............................................................................ 54
SetGenericParameterValue............................................................................ 56
ParameterSet..................................................................................................... 56
ActivateParameterSet.................................................................................... 57
SaveActiveParameterSet................................................................................ 58
DownloadActiveParameterSet....................................................................... 59
DownloadParameterRecord........................................................................... 59
ChangeParameterRecordLink......................................................................... 60
Automation 63
Basics on Automating the Access to ModelDesk............................................ 63
Limitations 65
Limitations When Using the ModelDesk Access Library.................................. 65
Index 67
4
AutomationDesk Accessing ModelDesk May 2024
About This Document
Content This document gives you information on how to access ModelDesk via
AutomationDesk.
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.
5
May 2024 AutomationDesk Accessing ModelDesk
About This Document
Symbol Description
Follows the document title in a link that refers to
another document.
Naming conventions dSPACE user documentation uses the following naming conventions:
Special Windows folders Windows‑based software products use the following special folders:
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
AutomationDesk Accessing ModelDesk May 2024
Basics and Instructions
Basics on ModelDesk................................................................................. 7
General information on ModelDesk.
Basics on ModelDesk
Introduction ModelDesk is a user interface for parameterizing and managing the parameter
sets of ASM models. It contains graphical tools for creating roads and planning
maneuvers, and has parameter pages with illustrations for each modeled
component as an aid to entering parameters.
ModelDesk elements You can group parameterization tasks that belong together in a ModelDesk
project.
7
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
Pool This is the container for all the project-specific files, such as the
parameter files of the simulation models and the ASM environment model files.
These files can be used in each experiment of the project.
Experiment This is the basis for carrying out a parameterization task on one
specific simulation model. To experiment with another simulation model, you
have to add a second experiment to the project.
An experiment defines one or more parameter sets that contain the
parameterization of the simulation model.
8
AutomationDesk Accessing ModelDesk May 2024
Basics on ModelDesk
Road You can create roads with different surfaces, profiles and courses, such
as junctions, with ModelDesk's Road Generator.
Traffic scenario You can create traffic scenarios that define the movements
of fellow vehicles relative to the ASM vehicle with ModelDesk's Traffic Editor.
Activating ModelDesk Although a ModelDesk project can contain several experiments, you can only
elements work with one experiment at a time. To select an experiment for further
processing, you have to activate it. The same applies to roads, maneuvers, traffic
scenarios and parameter sets.
9
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
Automating ModelDesk You can write scripts to control ModelDesk via a COM-based
automation interface. For more details, refer to ModelDesk Automation .
AutomationDesk's ModelDesk Access library uses this interface to provide
automation blocks for some basic ModelDesk features. The blocks offer only
a subset of the automation interface, but additionally, there are blocks in the
ManeuverControl library folder to automate functionality of ControlDesk for
experimenting.
ModelDesk Automation
Features of ModelDesk (ModelDesk Basics )
Library overview AutomationDesk's ModelDesk Access library is grouped in library folders which
represent the elements of a ModelDesk project.
The library folders group the provided automation blocks in the following
categories.
10
AutomationDesk Accessing ModelDesk May 2024
Overview of the ModelDesk Access Library
First activate the environment element you want to work with. Activation
means that the environment element is selected for later downloading and it
is registered as an active element in the ASM environment model configuration.
If you modify an environment element, for example, by using ModelDesk's
automation interface, you can save it by overwriting its former version.
You can download an active element to the simulation platform that is specified
in the active experiment.
Note
Access via Exec block The Python module audmodeldeskaccess provides methods for all automation
blocks except the maneuver control blocks. Each method has the same name
as its block, its arguments correspond to the block’s input data objects, and its
return value corresponds to the output data object.
11
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
Example
import audmodeldeskaccess
MyVehicleMass = \
audmodeldeskaccess.GetScalarParameter( \
"VehicleDynamics.VEHICLE_MASS_AND_ADDITIONAL_LOADS.Const_m_Vehicle")
Demo Projects For an example of automating ModelDesk access, refer to the AutomationDesk
demo project at <DocumentsFolder>\ModelDesk Access.
References
Objective Using AutomationDesk's ModelDesk Access library, you can build a basic
sequence that contains generic steps to automate ModelDesk access.
Generic steps of ModelDesk ModelDesk must be opened and an experiment must be activated for each
access ModelDesk use case. Roads, maneuvers and traffic scenarios can be optionally
activated and downloaded. After testing, for example, by analyzing different
parameter values, ModelDesk must be closed.
Preconditions § ModelDesk as of version 2.5p1 must be installed on the host PC. You need the
same licenses as to execute the tasks manually using ModelDesk.
§ The ModelDesk elements you want to access must exist in the ModelDesk
project.
§ The simulation application that is configured in the ModelDesk experiment
must be loaded to the simulation platform, for example, by using the
automation blocks from the Platform Management library.
§ The following information is required as input data:
§ The name and path of the ModelDesk project file (CDP) you want to open
§ The name of the ModelDesk experiment you want to access
§ The names of the road, maneuver and traffic scenario you want to
download
12
AutomationDesk Accessing ModelDesk May 2024
How to Build a Basic Sequence for Accessing ModelDesk
Note
This will also close a ModelDesk instance that you started manually.
13
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
Result You created a basic sequence to automate the generic steps to access
ModelDesk.
Next steps You can now parameterize your ASM model. Refer to How to Work with
Parameters on page 15.
14
AutomationDesk Accessing ModelDesk May 2024
How to Work with Parameters
Basics on ModelDesk.................................................................................................................. 7
Overview of the ModelDesk Access Library............................................................................... 10
References
ActivateManeuver.................................................................................................................... 30
ActivateRoad............................................................................................................................ 41
CloseModelDesk....................................................................................................................... 26
CloseProjectAndExperiment...................................................................................................... 29
DownloadActiveManeuver........................................................................................................ 31
DownloadActiveRoad............................................................................................................... 41
OpenProjectAndExperiment...................................................................................................... 27
StartModelDesk........................................................................................................................ 25
Objective You can modify and save a parameter set of an ASM model and download it to
the simulation platform with AutomationDesk's ModelDesk Access library.
Access to model parameters Model parameters are not accessed directly on the simulation platform. You can
activate a parameter set to load it to your host PC's memory. There you can
modify the parameters using the automation blocks from the Parameter folder.
Then you can download the active parameter set from the PC's memory to the
simulation platform to parameterize the current simulation application.
Format of parameter values In AutomationDesk, the different model parameter types are represented by
Python tuples, except for Scalars, which are represented as Float values.
15
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
If the parameter type is unknown, you can use the automation blocks
GetGenericParameterValue and SetGenericParameterValue to access
parameters generically.
Preconditions § You have built a basic sequence for accessing ModelDesk. For instructions,
refer to How to Build a Basic Sequence for Accessing ModelDesk on page 12.
§ The parameter set you want to access must exist in the ModelDesk project.
§ The following information is required as input data:
§ The name of the parameter set you want to access and download
§ The addresses of the parameters you want to access
16
AutomationDesk Accessing ModelDesk May 2024
How to Work with Parameters
8 Add an automation block for the required parameter type to your sequence
to write a parameter.
For example, to write a Vector parameter, drag a SetVectorParameter block
from the ModelDesk Access library to the Sequence Builder.
9 Set the block's ParameterAddress data object as a reference to the project-
specific String data object that contains the address of the parameter you
want to write.
10 Set the block's V data object as a reference to the project-specific data
object to store the parameter value you want to write.
In case of one-dimensional look-up tables, in addition, you must
parameterize the x-axis. In case of two-dimensional look-up tables, in
addition, you must parameterize the x- and the y-axis.
11 Drag a DownloadActiveParameterSet block from the ModelDesk Access
library to the Sequence Builder. This downloads the currently active
parameter set to the simulation platform.
Result You created a sequence to automate the reading and writing of a parameter set.
If you access a Vector parameter, the sequence looks like this.
When you run the sequence, the specified parameter set is activated. The
specified Vector parameter is read. After the value is modified, the parameter is
written to the active parameter set, which is then downloaded to the simulation
platform.
17
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
Next steps You can execute ModelDesk maneuvers. Refer to How to Control Maneuvers on
page 18.
Basics on ModelDesk.................................................................................................................. 7
Overview of the ModelDesk Access Library............................................................................... 10
References
ActivateParameterSet............................................................................................................... 57
DownloadActiveParameterSet................................................................................................... 59
GetVectorParameter................................................................................................................. 47
SetVectorParameter.................................................................................................................. 48
Note
Controlling the maneuver The automation blocks to control maneuvers use the following parameters of the
execution maneuver scheduler in the ASM environment model.
18
AutomationDesk Accessing ModelDesk May 2024
How to Control Maneuvers
Note
Tip
Retrieving the maneuver state You can retrieve the state of the maneuver that is currently downloaded to the
simulation platform by using the GetManeuverState automation block. The
following maneuver states are defined.
19
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
20
AutomationDesk Accessing ModelDesk May 2024
How to Control Maneuvers
When you run the sequence, the vehicle is reset and the maneuver is started.
The maneuver's execution state is retrieved and the maneuver is stopped.
Basics on ModelDesk.................................................................................................................. 7
Overview of the ModelDesk Access Library............................................................................... 10
21
May 2024 AutomationDesk Accessing ModelDesk
Basics and Instructions
References
GetManeuverState................................................................................................................... 38
InitMAPort (AutomationDesk Accessing Simulation Platforms )
ResetVehicle............................................................................................................................. 37
StartManeuver.......................................................................................................................... 33
StopManeuver.......................................................................................................................... 35
XIL API (Model Access) (AutomationDesk Accessing Simulation Platforms )
22
AutomationDesk Accessing ModelDesk May 2024
Reference Information
Reference Information
23
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
Automation Blocks
Introduction The Signal-ModelDesk Access library is a custom library. It is write-protected to
prevent modifications to its blocks.
Using ModelDesk Access You can use functions and other definitions of the ModelDesk Access library
library features in Python in Python scripts after you imported the audmodeldeskaccess module to the
scripts currentname space.
Application.............................................................................................. 24
ProjectAndExperiment............................................................................. 26
Maneuver................................................................................................ 30
ManeuverControl.................................................................................... 33
Road....................................................................................................... 40
Traffic...................................................................................................... 42
Parameter................................................................................................ 45
ParameterSet........................................................................................... 56
Application
Introduction The Application folder in the ModelDesk Access library provides blocks to
access the ModelDesk application.
StartModelDesk....................................................................................... 25
To start ModelDesk.
CloseModelDesk...................................................................................... 26
To close ModelDesk.
24
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
StartModelDesk
Graphical representation
Note
Data objects This automation block provides the following data object:
References
CloseModelDesk....................................................................................................................... 26
25
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
CloseModelDesk
Graphical representation
Description This block exits ModelDesk. You can specify whether to save the modifications
made during automated access. If ModelDesk is already closed, AutomationDesk
starts the ModelDesk application in invisible mode to close it correctly
afterwards.
Data objects This automation block provides the following data object:
References
StartModelDesk........................................................................................................................ 25
ProjectAndExperiment
Introduction The ProjectAndExperiment folder in the ModelDesk Access library provides
blocks to access ModelDesk's Project Navigator for managing projects and
experiments.
26
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
OpenProjectAndExperiment..................................................................... 27
To load a project and activate an experiment.
ActivateExperiment.................................................................................. 28
To activate an experiment in the current ModelDesk project.
CloseProjectAndExperiment..................................................................... 29
To close a ModelDesk project.
OpenProjectAndExperiment
Graphical representation
Description This block loads the specified project. If the project contains several experiments,
you can specify which experiment is to be activated. Because you can load only
one project at the same time in ModelDesk, any already loaded project is closed
if it differs from the specified one.You can specify whether to save the project
before it is closed. An already loaded project is not saved and closed if it matches
the specified one, i.e. the project paths are identical. The block then refers to this
project without further actions.
Data objects This automation block provides the following data objects:
27
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
References
ActivateExperiment................................................................................................................... 28
CloseProjectAndExperiment...................................................................................................... 29
ActivateExperiment
Graphical representation
Description This block is used to activate another experiment from the loaded ModelDesk
project. You can specify whether to save the modifications in the currently active
experiment before switching to the new active experiment.
Because the block requires an already loaded project, you have to execute the
OpenProjectAndExperiment block beforehand.
28
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
Data objects This automation block provides the following data objects:
CloseProjectAndExperiment
Graphical representation
Description This block closes the active ModelDesk project. You can specify whether to save
modifications in the project before closing it. If the project is already closed, the
block executes with no action.
Data objects This automation block provides the following data object:
29
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
References
OpenProjectAndExperiment...................................................................................................... 27
Maneuver
Introduction The Maneuver folder in the ModelDesk Access library provides blocks to activate
and download a maneuver.
Note
ActivateManeuver................................................................................... 30
To activate a maneuver.
DownloadActiveManeuver....................................................................... 31
To download the active maneuver to Simulink or the real‑time hardware.
SaveActiveManeuver............................................................................... 32
To save the settings of the active maneuver.
ActivateManeuver
Graphical representation
30
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
Description This block activates the specified maneuver. If the maneuver is not available in
the active experiment, AutomationDesk throws an exception.
The related project and experiment must be activated before you execute this
block.
Data objects This automation block provides the following data object:
References
ActivateExperiment................................................................................................................... 28
DownloadActiveManeuver........................................................................................................ 31
DownloadActiveManeuver
Graphical representation
Purpose To download the active maneuver to Simulink, VEOS or the real‑time hardware.
Description This block downloads to the simulation platform the maneuver that you
activated beforehand by using the ActivateManeuver block.
31
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
References
ActivateManeuver.................................................................................................................... 30
SaveActiveManeuver
Graphical representation
Description This block saves the settings of the maneuver that you activated by using the
ActivateManeuver on page 30 block.
References
ActivateManeuver.................................................................................................................... 30
DownloadActiveManeuver........................................................................................................ 31
32
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
ManeuverControl
Introduction The ManeuverControl folder in the ModelDesk Access library provides blocks to
control maneuver actions such as starting a maneuver.
Note
StartManeuver......................................................................................... 33
To start a maneuver.
StopManeuver......................................................................................... 35
To stop a running maneuver.
ResetVehicle............................................................................................ 37
To reset the vehicle to its initial state.
GetManeuverState.................................................................................. 38
To get the current state of a maneuver.
StartManeuver
Graphical representation
Description This block starts the maneuver that you downloaded to the simulation platform
by using the DownloadActiveManeuver block.
33
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
The block's data objects have preconfigured reference names. You have to add
the referencing data objects to the project as shown below.
Note
Tip
Data objects This automation block provides the following data objects:
34
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
References
DownloadActiveManeuver........................................................................................................ 31
StopManeuver.......................................................................................................................... 35
StopManeuver
Graphical representation
Description This block stops a maneuver that you started by using the StartManeuver block.
35
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
The block's data objects have preconfigured reference names. You have to add
the referencing data objects to the project as shown below.
Tip
Data objects This automation block provides the following data objects:
36
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
References
StartManeuver.......................................................................................................................... 33
ResetVehicle
Graphical representation
Description This block resets the vehicle specified in the ModelDesk maneuver to its initial
state.
The block's data objects have preconfigured reference names. You have to add
the referencing data objects to the project as shown below.
37
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
Tip
Data objects This automation block provides the following data objects:
References
GetManeuverState................................................................................................................... 38
GetManeuverState
Graphical representation
38
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
Description This block reads the current state of the active maneuver.
The block's data objects have preconfigured reference names. You have to add
the referencing data objects to the project as shown below.
Tip
Data objects This automation block provides the following data objects:
39
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
References
StartManeuver.......................................................................................................................... 33
StopManeuver.......................................................................................................................... 35
Road
Introduction The Road folder in the ModelDesk Access library provides blocks to activate and
download a road.
ActivateRoad........................................................................................... 41
To activate a road.
DownloadActiveRoad.............................................................................. 41
To download the active road to the simulation platform.
SaveActiveRoad....................................................................................... 42
To save the settings of the active road.
40
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
ActivateRoad
Graphical representation
Description This block activates the road specified in the current ModelDesk experiment.
Data objects This automation block provides the following data object:
References
DownloadActiveRoad............................................................................................................... 41
DownloadActiveRoad
Graphical representation
Description This block downloads the road that you activated by using the ActivateRoad
block to Simulink, VEOS or the specified real‑time hardware.
41
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
References
ActivateRoad............................................................................................................................ 41
SaveActiveRoad
Graphical representation
Description This block saves the settings of the road that you activated by using the
ActivateRoad on page 41 block.
References
ActivateRoad............................................................................................................................ 41
DownloadActiveRoad............................................................................................................... 41
Traffic
Introduction The Traffic folder in the ModelDesk Access library provides blocks to activate
and download a traffic scenario.
42
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
ActivateTrafficScenario............................................................................. 43
To activate a traffic scenario.
DownloadActiveTrafficScenario................................................................ 44
To download the active traffic scenario to the simulation platform.
SaveTrafficScenario.................................................................................. 44
To save the settings of the active traffic scenario.
ActivateTrafficScenario
Graphical representation
Description This block activates the traffic scenario specified in the current ModelDesk
experiment.
Data objects This automation block provides the following data object:
References
DownloadActiveTrafficScenario................................................................................................. 44
43
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
DownloadActiveTrafficScenario
Graphical representation
Description This block downloads the traffic scenario that you activated by using the
ActivateTrafficScenario block to Simulink, VEOS or the specified real‑time
hardware.
References
ActivateTrafficScenario.............................................................................................................. 43
SaveTrafficScenario
Graphical representation
Description This block saves the settings of the traffic scenario that you activated by using
the ActivateTrafficScenario on page 43 block.
44
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
References
ActivateTrafficScenario.............................................................................................................. 43
DownloadActiveTrafficScenario................................................................................................. 44
Parameter
Introduction The Parameter folder in the ModelDesk Access library provides blocks to
manage read values from parameters and to write values to parameters.
GetScalarParameter................................................................................. 46
To read a scalar parameter value.
SetScalarParameter.................................................................................. 47
To write a scalar parameter value.
GetVectorParameter................................................................................ 47
To read a vector parameter value.
SetVectorParameter................................................................................. 48
To write a vector parameter value.
GetMatrixParameter................................................................................ 49
To read a matrix parameter value.
SetMatrixParameter................................................................................. 50
To write a matrix parameter value.
GetLUT1DParameter................................................................................ 50
To read a one‑dimensional look‑up table (LUT1D) parameter.
SetLUT1DParameter................................................................................. 51
To write a one‑dimensional look‑up table (LUT1D) parameter value.
GetLUT2DParameter................................................................................ 52
To read a two‑dimensional look‑up table (LUT2D) parameter.
SetLUT2DParameter................................................................................. 53
To write a two‑dimensional look‑up table (LUT2D) parameter value.
GetGenericParameterValue...................................................................... 54
To read a parameter of any type.
45
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
SetGenericParameterValue....................................................................... 56
To write a parameter value of any type.
GetScalarParameter
Graphical representation
Description This block reads the parameter at the specified address and returns its value as
a single float value. If the specified address does not provide a scalar value, an
error message is displayed.
Data objects This automation block provides the following data objects:
References
GetGenericParameterValue....................................................................................................... 54
SetScalarParameter................................................................................................................... 47
46
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
SetScalarParameter
Graphical representation
Description This block writes the specified scalar value to the specified parameter address.
If the parameter is configured for a different data type, an error message is
displayed.
Data objects This automation block provides the following data objects:
References
GetScalarParameter.................................................................................................................. 46
SetGenericParameterValue........................................................................................................ 56
GetVectorParameter
Graphical representation
47
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
Description This block reads the parameter at the specified address and returns its vector
value as a tuple of float values. If the specified address does not provide a vector
value, an error message is displayed.
Data objects This automation block provides the following data objects:
References
GetGenericParameterValue....................................................................................................... 54
SetVectorParameter.................................................................................................................. 48
SetVectorParameter
Graphical representation
Description This block writes the specified vector value as a tuple of float values to the
specified parameter address. If the parameter is configured for a different data
type, an error message is displayed.
Data objects This automation block provides the following data objects:
48
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
References
GetVectorParameter................................................................................................................. 47
SetGenericParameterValue........................................................................................................ 56
GetMatrixParameter
Graphical representation
Description This block reads the parameter at the specified address and returns its matrix
value as a tuple of float values. Each row of the matrix is stored in a separate
tuple. For example, a 3x3 matrix is stored at ((v_a1, v_a2, v_a3), (v_b1, v_b2,
v_b3), (v_c1, v_c2, v_c3)), where a, b, c is the row index and 1, 2, 3 is the
column index. If the specified address does not provide a matrix value, an error
message is displayed.
Data objects This automation block provides the following data objects:
References
GetGenericParameterValue....................................................................................................... 54
SetMatrixParameter.................................................................................................................. 50
49
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
SetMatrixParameter
Graphical representation
Description This block writes the specified matrix value to the specified parameter address
as a tuple of float values. You have to add a separate tuple for each row of
the matrix. For example, a 3x3 matrix is defined by ((v_a1, v_a2, v_a3), (v_b1,
v_b2, v_b3), (v_c1, v_c2, v_c3)), where a, b, c is the row index and 1, 2, 3 is the
column index. If the parameter is configured for a different data type, an error
message is displayed.
Data objects This automation block provides the following data objects:
References
GetMatrixParameter................................................................................................................. 49
SetGenericParameterValue........................................................................................................ 56
GetLUT1DParameter
Graphical representation
50
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
Description This block reads the parameter at the specified address and returns its
one‑dimensional look‑up table (LUT1D) value as two tuples of float values. The
first tuple X provides the values of the x‑axis. The second tuple V provides the
values at the related x position. If the specified address does not provide a LUT1D
value, an error message is displayed.
Data objects This automation block provides the following data objects:
References
GetGenericParameterValue....................................................................................................... 54
SetLUT1DParameter.................................................................................................................. 51
SetLUT1DParameter
Graphical representation
Description This block writes the specified one‑dimensional look‑up table (LUT1D) values to
the specified parameter address by two tuples of float values. The first tuple X
provides the values of the x‑axis. The second tuple V provides the values at the
51
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
Note
Data objects This automation block provides the following data objects:
References
GetLUT1DParameter................................................................................................................. 50
SetGenericParameterValue........................................................................................................ 56
GetLUT2DParameter
Graphical representation
Description This block reads the parameter at the specified address and returns its
two‑dimensional look‑up table (LUT2D) value as three tuples of float values.
The first tuple X provides the values of the x‑axis. The second tuple Y provides
the values of the y‑axis. The third tuple V provides the values at the related
52
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
xy position. If the specified address does not provide a LUT2D value, an error
message is displayed.
Data objects This automation block provides the following data objects:
References
GetGenericParameterValue....................................................................................................... 54
SetLUT2DParameter.................................................................................................................. 53
SetLUT2DParameter
Graphical representation
Description This block writes the specified two‑dimensional look‑up table (LUT2D) values to
the specified parameter address by three tuples of float values. The first tuple
X provides the values of the x‑axis. The second tuple Y provides the values of
the y‑axis. The third tuple V provides the values at the related xy position. If the
parameter is configured for a different data type, an error message is displayed.
53
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
Note
Data objects This automation block provides the following data objects:
References
GetLUT2DParameter................................................................................................................. 52
SetGenericParameterValue........................................................................................................ 56
GetGenericParameterValue
Graphical representation
Description This block reads the parameter at the specified address and returns the
values as a tuple of float values. It also returns the parameter type that is
required to implement postprocessing for reading the returned tuple correctly. A
multi‑dimensional parameter is returned as nested tuples. If the specified address
does not provide a parameter, an error message is displayed.
54
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
Mapping example The following table shows how a specific parameter type
is stored.
Data objects This automation block provides the following data objects:
References
GetLUT1DParameter................................................................................................................. 50
GetLUT2DParameter................................................................................................................. 52
GetMatrixParameter................................................................................................................. 49
GetScalarParameter.................................................................................................................. 46
GetVectorParameter................................................................................................................. 47
SetGenericParameterValue........................................................................................................ 56
55
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
SetGenericParameterValue
Graphical representation
Description This block writes the specified tuple values to the specified parameter address.
The tuple structure must follow the rules described in the description of the
GetGenericParameterValue block. If the specified values do not match the
type of the specified parameter, an error message is displayed.
Data objects This automation block provides the following data objects:
References
GetGenericParameterValue....................................................................................................... 54
SetLUT1DParameter.................................................................................................................. 51
SetLUT2DParameter.................................................................................................................. 53
SetMatrixParameter.................................................................................................................. 50
SetScalarParameter................................................................................................................... 47
SetVectorParameter.................................................................................................................. 48
ParameterSet
Introduction The ParameterSet folder in the ModelDesk Access library provides blocks to
manage parameter sets.
56
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
ActivateParameterSet.............................................................................. 57
To activate a parameter set.
SaveActiveParameterSet.......................................................................... 58
To save the settings in the active parameter set.
DownloadActiveParameterSet.................................................................. 59
To download the active parameter set to the simulation platform.
DownloadParameterRecord..................................................................... 59
To download a subset of the active parameter set to the simulation
platform.
ChangeParameterRecordLink................................................................... 60
To link a parameter file saved in the ModelDesk project pool to the
specified parameter record.
ActivateParameterSet
Graphical representation
Description This block is used to activate a parameter set from the loaded ModelDesk
project. You can specify whether to save the modifications in a currently active
parameter set before switching to the new one.
Data objects This automation block provides the following data objects:
57
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
References
DownloadActiveParameterSet................................................................................................... 59
SaveActiveParameterSet........................................................................................................... 58
SaveActiveParameterSet
Graphical representation
Description This block saves the settings in the parameter set that you activated by using the
ActivateParameterSet block.
References
ActivateParameterSet............................................................................................................... 57
DownloadActiveParameterSet................................................................................................... 59
58
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
DownloadActiveParameterSet
Graphical representation
Description This block downloads the parameter set that you activated by using the
ActivateParameterSet block to Simulink or the specified real‑time hardware.
References
ActivateParameterSet............................................................................................................... 57
DownloadParameterRecord
Graphical representation
Purpose To download a subset of the active parameter set to the simulation platform.
Description This block downloads a subset of the active parameter set to Simulink or the
specified real‑time hardware. The parameter subset is specified by its main
component name, for example, VehicleDynamics or Drivetrain, and its parameter
record name. A parameter record stores the values of one or more parameter
pages of the specified main component in ModelDesk.
59
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
Tip
You can get the corresponding parameter record name of a parameter page
by choosing Help in its context menu in ModelDesk. dSPACE Help opens
with the reference information of the according parameter page in ASM
Parameters (ModelDesk Parameterizing ).
Data objects This automation block provides the following data objects:
References
ChangeParameterRecordLink.................................................................................................... 60
ChangeParameterRecordLink
Graphical representation
Purpose To link a parameter file saved in the ModelDesk project pool to the specified
parameter record.
60
AutomationDesk Accessing ModelDesk May 2024
Automation Blocks
Description This block makes parameters that are specified in a parameter file available in the
parameter record. The file must be available in the Pool of the active ModelDesk
project.
Tip
You can get the corresponding parameter record name of a parameter page
by choosing Help in its context menu in ModelDesk. dSPACE Help opens
with the reference information of the according parameter page in ASM
Parameters (ModelDesk Parameterizing ).
Data objects This automation block provides the following data objects:
References
DownloadParameterRecord...................................................................................................... 59
61
May 2024 AutomationDesk Accessing ModelDesk
Reference Information
62
AutomationDesk Accessing ModelDesk May 2024
Automation
Automation
Related information The AutomationDesk COM API provides no specific objects for accessing
ModelDesk. You can only use the basic automation features, such as executing a
project via script.
For information on the available objects with their properties and methods, refer
to Basic Interface (AutomationDesk Automation ).
For basic information and instructions, refer to Basics and Instructions on page 7.
63
May 2024 AutomationDesk Accessing ModelDesk
Automation
64
AutomationDesk Accessing ModelDesk May 2024
Limitations
Limitations
Using the blocks of the The automation blocks to control ModelDesk maneuvers are only applicable to
ManeuverControl folder maneuvers running the ASM Vehicle Dynamics model.
Working with maneuvers Up to and including ModelDesk 5.2, you can use the maneuver compatibility
created with ModelDesk 4.6 mode in ModelDesk to work with maneuvers created with ModelDesk 4.6 and
and earlier earlier.
65
May 2024 AutomationDesk Accessing ModelDesk
Limitations
66
AutomationDesk Accessing ModelDesk May 2024
Index
Index
starting 18
A stopping 18
ModelDesk access
accessing ModelDesk
limitations 65
basics 7
ModelDesk Access library 10
ActivateExperiment 28
accessing experiments 12
ActivateManeuver 30
accessing parameter sets 15
ActivateParameterSet 57
building a basic sequence 12
ActivateRoad 41
closing ModelDesk 12
ActivateTrafficScenario 43
configuring the ASM environment model 12
activating
controlling maneuver execution 18
maneuver 12
getting maneuver execution state 18
ModelDesk experiment 12
starting ModelDesk 12
parameter sets 15
working with parameters 15
road 12
ModelDesk experiment
traffic scenario 12
activating 12
ASM vehicle
ModelDesk project
restarting 18
opening 12
AutomationDesk library
modifying
ModelDesk Access 10
parameter sets 15
parameters 15
C
ChangeParameterRecordLink 60 O
CloseModelDesk 26
opening
CloseProjectAndExperiment 29
ModelDesk project 12
Common Program Data folder 6
OpenProjectAndExperiment 27
D P
Documents folder 6
parameter sets
DownloadActiveManeuver 31
activating 15
DownloadActiveParameterSet 59
downloading 15
DownloadActiveRoad 41
modifying 15
DownloadActiveTrafficScenario 44
parameters
downloading
modifying 15
maneuver 12
parameter sets 15
road 12 R
traffic scenario 12 ResetVehicle 37
DownloadParameterRecord 59 road
activating 12
G downloading 12
GetGenericParameterValue 54
GetLUT1DParameter 50 S
GetLUT2DParameter 52 SaveActiveManeuver 32
GetManeuverState 38 SaveActiveParameterSet 58
GetMatrixParameter 49 SaveActiveRoad 42
GetScalarParameter 46 SaveTrafficScenario 44
GetVectorParameter 47 SetGenericParameterValue 56
SetLUT1DParameter 51
L SetLUT2DParameter 53
SetMatrixParameter 50
libraries
SetScalarParameter 47
ModelDesk Access 10
SetVectorParameter 48
limitations
StartManeuver 33
ModelDesk access 65
StartModelDesk 25
Local Program Data folder 6
StopManeuver 35
M T
maneuver
traffic scenario
activating 12
activating 12
downloading 12
downloading 12
getting execution state 18
67
May 2024 AutomationDesk Accessing ModelDesk
Index
68
AutomationDesk Accessing ModelDesk May 2024