0% found this document useful (0 votes)
9 views

Automation Desk Accessing Motion Desk

The document provides instructions for accessing and automating MotionDesk using AutomationDesk 2024-A, including contact information for dSPACE support and recommendations for software updates. It outlines the basics of MotionDesk, including its features for visualizing mechanical movements, and details on how to animate scenes within MotionDesk. Additionally, it includes information on the MotionDesk Access Library and the necessary steps to create automation sequences for animating experiments.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Automation Desk Accessing Motion Desk

The document provides instructions for accessing and automating MotionDesk using AutomationDesk 2024-A, including contact information for dSPACE support and recommendations for software updates. It outlines the basics of MotionDesk, including its features for visualizing mechanical movements, and details on how to animate scenes within MotionDesk. Additionally, it includes information on the MotionDesk Access Library and the necessary steps to create automation sequences for animating experiments.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

AutomationDesk

Accessing MotionDesk
For AutomationDesk 2024‑A

Release 2024-A – May 2024


How to Contact dSPACE
Mail: dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
Tel.: +49 5251 1638-0
E-mail: [email protected]
Web: https://www.dspace.com

How to Contact dSPACE Support


If you encounter a problem when using dSPACE products, contact your local dSPACE
representative:
§ Local dSPACE companies and distributors: https://www.dspace.com/go/locations
§ For countries not listed, contact dSPACE GmbH in Paderborn, Germany.
Tel.: +49 5251 1638-941 or e-mail: [email protected]

You can also use the support request form: https://www.dspace.com/go/supportrequest. If


you are logged on to mydSPACE, you are automatically identified and do not have to add
your contact details manually.

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.

Software Updates and Patches


dSPACE strongly recommends that you download and install the most recent patches
for your current dSPACE installation. Visit https://www.dspace.com/go/patches for the
software updates and patches themselves and for more information, such as how to
receive an automatic notification when an update or a patch is available for your dSPACE
software.

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.

© 2017 - 2024 by:


dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany

This publication and the contents hereof are subject to change without notice.

AURELION, AUTERA, ConfigurationDesk, ControlDesk, MicroAutoBox, MicroLabBox,


SCALEXIO, SIMPHERA, SYNECT, SystemDesk, TargetLink, and VEOS are registered
trademarks of dSPACE GmbH in the United States or other countries, or both. Other
brand names or product names are trademarks or registered trademarks of their respective
companies or organizations.
Contents

Contents

About This Document 5

Basics and Instructions 7


Basics on MotionDesk..................................................................................... 7
Overview of the MotionDesk Access Library..................................................... 8
How to Animate a MotionDesk Scene........................................................... 10

Reference Information 15
Automation Blocks................................................................................................. 16

Application........................................................................................................ 16
StartMotionDesk........................................................................................... 16
CloseMotionDesk.......................................................................................... 17

ProjectAndExperiment........................................................................... ............ 18
OpenProjectAndExperiment........................................................................... 19
CloseProjectAndExperiment........................................................................... 20

WindowManagement........................................................................................ 21
SelectViewMode........................................................................................... 21

SimulationManagement..................................................................................... 22
StartAnimation.............................................................................................. 22
StopAnimation.............................................................................................. 23

Automation 25
Basics on Automating the Access to MotionDesk........................................... 25

Limitations 27
Limitations When Using the MotionDesk Access Library................................. 27

Index 29

3
May 2024 AutomationDesk Accessing MotionDesk
Contents

4
AutomationDesk Accessing MotionDesk May 2024
About This Document

About This Document

Content This document gives you information on how to access MotionDesk via
AutomationDesk.

Required knowledge Working with AutomationDesk requires:


§ Basic knowledge in handling the PC and the Microsoft Windows operating
system.
§ Basic knowledge in developing applications or tests.
§ Basic knowledge in handling the external device, which you control remotely
via AutomationDesk.

dSPACE provides trainings for AutomationDesk. For more information, refer to


https://www.dspace.com/go/trainings.

Symbols dSPACE user documentation uses the following symbols:

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 MotionDesk
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:

%name% Names enclosed in percent signs refer to environment variables for


file and path names.

<> Angle brackets contain wildcard characters or placeholders for variable


file and path names, etc.

Special Windows folders Windows‑based software products use the following special folders:

Common Program Data folder A standard folder for application-specific


program data that is used by all users.
%PROGRAMDATA%\dSPACE\<InstallationGUID>\<ProductName>
or
%PROGRAMDATA%\dSPACE\<ProductName>\<VersionNumber>

Documents folder A standard folder for application‑specific files that are


used by the current user.
%USERPROFILE%\Documents\dSPACE\<ProductName>\<VersionNumber>

Local Program Data folder A standard folder for application-specific


program data that is used by the current user.
%USERPROFILE%\AppData\Local\dSPACE\<InstallationGUID>\
<ProductName>

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.

dSPACE Help (Web) Independently of the software installation, you can


access the Web version of dSPACE Help at https://www.dspace.com/go/help.
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.

6
AutomationDesk Accessing MotionDesk May 2024
Basics and Instructions

Basics and Instructions

Where to go from here Information in this section

Basics on MotionDesk................................................................................ 7
Provides general information on MotionDesk.

Overview of the MotionDesk Access Library............................................... 8


Provides general information on the features of the MotionDesk Access
library.

How to Animate a MotionDesk Scene..................................................... 10


Instructions on how to animate the scene of a MotionDesk experiment.

Basics on MotionDesk

Introduction General information on MotionDesk.

Note

Due to the discontinuation of MotionDesk with Release 2024-A, the


MotionDesk Access library will be removed with AutomationDesk 2025-B.

Features of MotionDesk MotionDesk is a dSPACE software for visualizing the movement of mechanical
objects, such as car components or robot arms, in a virtual 3-D world.

It contains graphical tools for arranging static and movable objects in animatable
scenes.

The movement of objects during the animation can be controlled online by a


running simulation application or offline by reading motion data from a motion
data file (MDF).

7
May 2024 AutomationDesk Accessing MotionDesk
Basics and Instructions

MotionDesk elements Project You can group visualization tasks that belong together in a
MotionDesk project.

Experiment This is the basis for carrying out an animation of one specific
scene. To experiment with another scene, you have to add a second experiment
to the project.

Scene The scene of an experiment specifies the static and movable objects
that exist in the experiment's virtual world.
You can add 3-D objects to a scene from a library and parameterize them via
their properties. Via the Data Stream property, you can connect a movable
object to a data stream.
Additionally, you can add observers to a scene, each one specifying a certain
viewpoint within the scene. You select up to four viewpoints to be displayed in
parallel during the animation of the scene.

Activating MotionDesk Although a MotionDesk project can contain several experiments, you can only
experiments work with one experiment at a time. To select an experiment for further
processing, you have to activate it.

Automating MotionDesk You can write scripts to control MotionDesk via a COM-based automation
interface. The AutomationDesk MotionDesk Access library uses this interface
to provide automation blocks for some basic MotionDesk features. The blocks
offer only the subset of the automation interface that is necessary to animate an
experiment's scene.

Demo projects For an example of a MotionDesk project, refer to


<RCP_HIL_InstallationPath>\Demos\MotionDesk.

Overview of the MotionDesk Access Library

Introduction Note

Due to the discontinuation of MotionDesk with Release 2024-A, the


MotionDesk Access library will be removed with AutomationDesk 2025-B.

The MotionDesk Access library is implemented as a custom library. This means


that you can manage it like any other custom library. For example, you can open,
close, export and import it. You can read the library's Python source code in the
audmotiondeskaccess Python module at the library's top level.

8
AutomationDesk Accessing MotionDesk May 2024
Overview of the MotionDesk Access Library

Library overview The blocks of the library are grouped in folders which represent the object that
the blocks deal with.

Application This folder provides automation blocks to start and close


MotionDesk. You can specify to save all project files when you close MotionDesk.

ProjectAndExperiment This folder provides automation blocks to open and


close a MotionDesk project and to activate and close an experiment in it.

WindowManagement This folder provides an automation block to specify


whether an animation is displayed in a window or in full screen.

SimulationManagement This folder provides automation blocks to control


the animation of the activated experiment's scene.

For detailed information on the automation blocks, refer to Automation Blocks


(AutomationDesk Basic Practices ).

Access via Exec block The audmotiondeskaccess Python module provides methods for the
MotionDesk Access automation 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.

Example
import audmotiondeskaccess
audmotiondeskaccess.OpenProjectAndExperiment( \
ProjectFile, "Experiment_002", SaveActiveProject="True")

Demo projects For an example of automating MotionDesk access, refer to the AutomationDesk
demo project at <DocumentsFolder>\MotionDesk Access.

Related topics HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

References

Automation Blocks (AutomationDesk Basic Practices )

9
May 2024 AutomationDesk Accessing MotionDesk
Basics and Instructions

How to Animate a MotionDesk Scene

Objective You can animate the scene of a MotionDesk experiment.

Generic steps MotionDesk must be opened and an experiment must be activated.

Then the contained scene can be animated. The movement of its objects can
be controlled offline by reading a motion data file (MDF) or online by a running
simulation.

After the use case is finished, MotionDesk must be closed.

Preconditions § MotionDesk must be installed on the host PC. You need the same licenses as
to execute the tasks manually with MotionDesk.
§ The MotionDesk experiment must be completely specified, including the
scene, views and selected data source, so that it is ready to be animated.
§ If the MotionDesk experiment is configured to get the motion data from
a running simulation, the related simulation application must be loaded to
a registered platform and started. You can implement this, for example,
by using automation blocks from the XIL API Convenience library. For
instructions, refer to How to Download and Start a Simulation Application
(AutomationDesk Accessing Simulation Platforms ).
§ If the MotionDesk experiment is configured to get the motion data from an
MDF file, this file must exist.
§ The following information is required as input data:
§ The name and path of the MotionDesk project file (CDP) you want to open
§ The name of the MotionDesk experiment you want to access

Method To animate a MotionDesk scene


1 Add the following data objects to your project to parameterize the input
data:
§ A File data object
In the Data Object Editor, parameterize the File data object with the file
name and path of the project file (CDP) of the MotionDesk project you
want to open.
§ A String data object
Parameterize the String data object with the name of the experiment you
want to activate.
2 From the Library Browser, drag a StartMotionDesk block from the
MotionDesk Access library to the Sequence Builder to get an instance of
MotionDesk. If MotionDesk is already running, the existing instance is used.
By default, the block's Visible data object is set to True. This causes the
graphical user interface of MotionDesk to be displayed.
3 Drag an OpenProjectAndExperiment block to your sequence. This opens
the specified project, activates the specified experiment and displays the
unanimated experiment's scene.

10
AutomationDesk Accessing MotionDesk May 2024
How to Animate a MotionDesk Scene

4 In the Data Object Editor, set the block's ProjectFile and InitialExperiment
data objects as references to the project-specific File and String data objects
that contain the MotionDesk project file and the experiment name.
5 Drag a StartAnimation block to your sequence. This starts displaying the
scene that is contained in the currently activated experiment.
6 Add the blocks to be executed during the animation, i.e., your use case, to
the sequence.
7 Drag a StopAnimation block to your sequence. This stops the animation.
8 Drag a CloseProjectAndExperiment block to your sequence. This closes
the active experiment and the MotionDesk project. The display of the scene
ends.
9 Drag a CloseMotionDesk block to your sequence. This closes the existing
MotionDesk instance.

Note

This will also close a MotionDesk instance that you started manually.

Result You created a sequence to animate the scene of a MotionDesk experiment.

The resulting sequence looks like this:

11
May 2024 AutomationDesk Accessing MotionDesk
Basics and Instructions

When you run the sequence, a MotionDesk instance is created or accessed to


open the specified project and to activate the specified experiment. Then the
contained scene is animated as specified in the experiment.

In this example, the ExecuteDuringAnimation block represents your use case.


After this block is executed the animation is stopped. MotionDesk access is
finished by closing the project with its experiment and by closing MotionDesk.

12
AutomationDesk Accessing MotionDesk May 2024
How to Animate a MotionDesk Scene

Tip

In this example, the duration of the animation is determinated by the


time that is needed to process the ExecuteDuringAnimation block. The
duration can be controlled in the following ways:
§ For a fixed duration of the animation, you can add a Sleep block to the
ExecuteDuringAnimation block and specify the duration in the Sleep
block's Time data object.
§ For a duration of the animation that depends on variables of the
running simulation application, you can use the blocks of the XIL API
Convenience library to read the variable values. For more information,
refer to Accessing Simulation Platforms via the XIL API Convenience
Library (AutomationDesk Accessing Simulation Platforms ).
§ For a duration of the animation that depends on parameters of
Automotive Simulation Models (ASM) of the running simulation
application, you can use the blocks of the ModelDesk Access library
to use the variable values. For more information, refer to AutomationDesk
Accessing ModelDesk .

Related topics Basics

Basics on MotionDesk................................................................................................................. 7
Overview of the MotionDesk Access Library................................................................................ 8

References

CloseMotionDesk..................................................................................................................... 17
CloseProjectAndExperiment...................................................................................................... 20
OpenProjectAndExperiment...................................................................................................... 19
StartAnimation......................................................................................................................... 22
StartMotionDesk...................................................................................................................... 16
StopAnimation......................................................................................................................... 23

13
May 2024 AutomationDesk Accessing MotionDesk
Basics and Instructions

14
AutomationDesk Accessing MotionDesk May 2024
Reference Information

Reference Information

15
May 2024 AutomationDesk Accessing MotionDesk
Reference Information

Automation Blocks
Introduction The Signal-MotionDesk Access library is a custom library. It is write-protected to
prevent modifications to its blocks.

Using MotionDesk Access You can use functions and other definitions of the MotionDesk Access library
library features in Python in Python scripts after you imported the audmotiondeskaccess module to the
scripts current namespace.

Where to go from here Information in this section

Application.............................................................................................. 16

ProjectAndExperiment............................................................................. 18

WindowManagement.............................................................................. 21

SimulationManagement.......................................................................... 22

Application
Introduction The Application folder in the MotionDesk Access library provides blocks to
access the MotionDesk application.

Where to go from here Information in this section

StartMotionDesk..................................................................................... 16
To start MotionDesk.

CloseMotionDesk.................................................................................... 17
To close MotionDesk.

StartMotionDesk

Graphical representation

16
AutomationDesk Accessing MotionDesk May 2024
Automation Blocks

Purpose To start MotionDesk.

Description This block creates an instance of MotionDesk. If a MotionDesk process is already


running, the existing process is used. You can specify to open MotionDesk in
visible or invisible mode.

Note

If MotionDesk is not available, for example, if it is not installed,


AutomationDesk throws an exception.

Data objects This automation block provides the following data object:

Name In / Out Data Type Default Value Description


Visible In String "True" Lets you specify the visible mode of the application:
§ True
MotionDesk starts with the user interface displayed.
§ False
MotionDesk starts in hidden mode.

Related topics Basics

Basics on MotionDesk................................................................................................................. 7

HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

References

CloseMotionDesk..................................................................................................................... 17

CloseMotionDesk

Graphical representation

Purpose To close MotionDesk.

17
May 2024 AutomationDesk Accessing MotionDesk
Reference Information

Description This block exits MotionDesk. You can specify whether to save the
modifications made during automated access. If MotionDesk is already closed,
AutomationDesk starts the MotionDesk application in invisible mode to close it
correctly afterwards.

This block also closes an MotionDesk instance, if it was opened manually.

Data objects This automation block provides the following data object:

Name In / Out Data Type Default Value Description


SaveAll In String "True" Lets you specify whether to save your modifications:
§ True
Modifications are saved before closing MotionDesk.
§ False
Modifications are discarded without confirmation.

Related topics Basics

Basics on MotionDesk................................................................................................................. 7

HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

References

StartMotionDesk...................................................................................................................... 16

ProjectAndExperiment
Introduction The ProjectAndExperiment folder in the MotionDesk Access library provides
blocks to access MotionDesk's projects and experiments.

Where to go from here Information in this section

OpenProjectAndExperiment..................................................................... 19
To load a project and activate an experiment.

CloseProjectAndExperiment..................................................................... 20
To close a MotionDesk project.

18
AutomationDesk Accessing MotionDesk May 2024
Automation Blocks

OpenProjectAndExperiment

Graphical representation

Purpose To load a project and activate an experiment.

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 MotionDesk, any already loaded project is closed,
even if it is identical to the one to be started. You can specify whether to save
the project before it is closed.

If you have not used the StartMotionDesk block beforehand, MotionDesk is


automatically started in invisible mode.

If the specified project file is not available, AutomationDesk throws an exception.

Data objects This automation block provides the following data objects:

Name In / Out Data Default Description


Type Value
ProjectFile In File "" Lets you specify the MotionDesk project file (CDP) to be
loaded.
InitialExperiment In String "" Lets you optionally specify the experiment to be activated.
SaveActiveProject In String "True" Lets you specify whether to save an already loaded project if
it differs from the specified one.
§ True
Modifications in the already loaded project are saved.
§ False
Modifications in the already loaded project are discarded.

Related topics Basics

Basics on MotionDesk................................................................................................................. 7

HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

19
May 2024 AutomationDesk Accessing MotionDesk
Reference Information

References

CloseProjectAndExperiment...................................................................................................... 20

CloseProjectAndExperiment

Graphical representation

Purpose To close a MotionDesk project.

Description This block closes the active MotionDesk 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:

Name In / Out Data Type Default Description


Value
Save In String "True" Lets you specify whether to save modifications in the active
experiment and project before closing it.
§ True
Modifications are saved.
§ False
Modifications are discarded.

Related topics Basics

Basics on MotionDesk................................................................................................................. 7

HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

References

OpenProjectAndExperiment...................................................................................................... 19

20
AutomationDesk Accessing MotionDesk May 2024
Automation Blocks

WindowManagement
Introduction The WindowManagement folder in the MotionDesk Access library provides
blocks to control the appearance of MotionDesk's animations.

SelectViewMode

Graphical representation

Purpose To select the size of the displayed animation.

Description This block lets you specify whether an animation is displayed in a window or in
full screen.

Before you execute this block, the related project and experiment must be
activated by using the OpenProjectAndExperiment block and the experiment's
scenes must be loaded.

Data objects This automation block provides the following data object:

Name In / Out Data Type Default Value Description


MainWindowMode In String "Normal" Lets you select one following view modes:
§ Normal
Animations are displayed in a window.
§ FullScreen
Animations are displayed in full screen.

Related topics References

OpenProjectAndExperiment...................................................................................................... 19
Sleep (AutomationDesk Basic Practices )
StartAnimation......................................................................................................................... 22

21
May 2024 AutomationDesk Accessing MotionDesk
Reference Information

SimulationManagement
Introduction The SimulationManagement folder in the MotionDesk Access library provides
blocks to control the execution of MotionDesk's animations.

Where to go from here Information in this section

StartAnimation........................................................................................ 22
To start an animation.

StopAnimation........................................................................................ 23
To stop a running animation.

StartAnimation

Graphical representation

Purpose To start an animation.

Description This block starts the animation of the experiment that you opened before by
using the OpenProjectAndExperiment block.

Data objects None

Related topics HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

References

StopAnimation......................................................................................................................... 23

22
AutomationDesk Accessing MotionDesk May 2024
Automation Blocks

StopAnimation

Graphical representation

Purpose To stop a running animation.

Description This block stops an animation that you started by using the StartAnimation
block.

Data objects None

Related topics HowTos

How to Animate a MotionDesk Scene...................................................................................... 10

References

StartAnimation......................................................................................................................... 22

23
May 2024 AutomationDesk Accessing MotionDesk
Reference Information

24
AutomationDesk Accessing MotionDesk May 2024
Automation

Automation

Basics on Automating the Access to MotionDesk

Introduction AutomationDesk provides a COM‑based API to automate the handling of


AutomationDesk.

Related information The AutomationDesk COM API provides no specific objects for accessing
MotionDesk. 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.

25
May 2024 AutomationDesk Accessing MotionDesk
Automation

26
AutomationDesk Accessing MotionDesk May 2024
Limitations

Limitations

Limitations When Using the MotionDesk Access Library

Required MotionDesk version It is recommended to use MotionDesk 3.5 or later when you want to
remote‑control it via the MotionDesk Access library.

27
May 2024 AutomationDesk Accessing MotionDesk
Limitations

28
AutomationDesk Accessing MotionDesk May 2024
Index
Index
A
accessing MotionDesk
animating a scene 10
basics 7
libary overview 8
AutomationDesk library
MotionDesk Access 8

C
CloseMotionDesk 17
CloseProjectAndExperiment 20
closing
MotionDesk project 10
Common Program Data folder 6

D
Documents folder 6

L
libraries
MotionDesk Access 8
limitations
MotionDesk access 27
Local Program Data folder 6

M
MotionDesk access
limitations 27
MotionDesk Access library 8
animating a scene 10
closing MotionDesk 10
starting MotionDesk 10
MotionDesk project
closing 10
opening 10

O
opening
MotionDesk project 10
OpenProjectAndExperiment 19

S
SelectViewMode 21
StartAnimation 22
StartMotionDesk 16
StopAnimation 23

29
May 2024 AutomationDesk Accessing MotionDesk
Index

30
AutomationDesk Accessing MotionDesk May 2024

You might also like