Vector: DYNA4¶
Vendor information
Vendor |
Web page |
Product name |
Version |
|---|---|---|---|
Vector Informatik GmbH |
DYNA4 |
From R5 to R10. |
Categories
MDL 🛈 |
APL 🛈 |
BAN 🛈 |
BMA 🛈 |
SVC 🛈 |
DGN 🛈 |
FIU 🛈 |
EES 🛈 |
FCT 🛈 |
DBG 🛈 |
IMG 🛈 |
AUDIO 🛈 |
ENVSIM 🛈 |
ENVCOM 🛈 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Signal recordings 🛈
File format |
Comment |
|---|---|
*.mf4 |
Platform
Operating system |
Support |
|---|---|
Windows |
✓ |
Linux |
Specifics¶
The DYNA4 tool connection with its tooljobs allows loading, parameterizing and starting of Tasks as well as retrieving signal recordings of a simulation.
Setup¶
When starting the TBC, DYNA4 will be started automatically; however, in order to ensure this, some options in the TBC must be set correctly:
- Path to DYNA4 Python API
- DYNA4 R10 and newer
The remote API is provided via a Python wheel and must first be installed manually using the following command. An internet connection is required for this. The
<target_directory>folder specified here, must be entered in TBC for this option. To enable ecu.test to use the DYNA4 remote API,pip installmust be executed for the Python version used by ecu.test which is printet in theecu.test_out.logheader.pip install "path/to/wheel.whl" --target "<target_directory>"The Python wheel is typically located in the DYNA4 installation directory under
DYNAwareProducts/RemoteAPI/dist.- DYNA4 R9 and older
The folder containing the file dyna4_api.py (R8 and R9) or dyna4.py (R7 and older). This is typically located in the DYNA4 installation directory under
DYNAwareProducts/RemoteAPI.
Info
Instead of the file provided, you can also use your own file, modified if necessary.
- XMLRPC API port
Port of DYNA4 XMLRPC API (Default: 10895).
- Project
Name of an existing DYNA4 project. They are available in the DYNA4 workspace under Project Navigator. This project will be loaded by ecu.test after the start of DYNA4.
Usage¶
Job sequence¶
The following should be considered regarding the order of the tool jobs:
Before the simulation can be started with RunTask, a Model Configuration and a Task must be loaded with LoadModelConfiguration and LoadTask.
Before signal recordings can be retrieved with GetSimulationResults, a simulation must have been run with RunTask.
The job LoadTask resets all Task Parameters previously set with SetTaskParameter.
Names of Model Configurations and Tasks¶
For the LoadModelConfiguration and LoadTask jobs, the file path of the artifact to be loaded must be specified. This is the path relative to the artifact specific directory in the Database within the project. For example, when loading the Task MyVehicleProject/Database/Tasks/MyVehicleTasks/MyTask1.task, it would be referenced with “MyVehicleTasks/MyTask1.task”.
Parameterization of Tasks¶
The SetTaskParameter job can be used to change one parameter of the loaded Task. If the Task is selected in the GUI of DYNA4, the specified input fields indicate, which parameters can be varied for the Task. It is important that not only the parameterName is correct, but also that the value of ParameterValue has the right datatype.
Different simulation targets¶
The option Simulation-Target in the TBC sets the platform of the simulation. Depending on the platform, compilation and download might be necessary. The download is implicitly executed during RunTask, while the compilation can be invoked with the Job BuildSimulationTarget.
Limitations¶
Due to a limitation of the DYNA4 interface, it is currently not possible to load new tasks from the project directory. If a task is selected with the tool job LoadTask, this task must have been previously loaded in the currently selected project.
Properties 🛈¶
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
Common |
|||||
Project |
Common |
string |
Name of the DYNA4 project to be loaded at startup |
||
Simulation Target |
Common |
‘DYNA4 Windows Executable’ |
[‘Simulink’, ‘DYNA4 Windows Executable’, ‘CANoe’, ‘dSPACE SCALEXIO’] |
string |
Simulation Target to compile the simulation for |
Execution timeout |
Common |
130 |
int |
Time in seconds to wait for API response during simulation run |
|
Tool connection |
|||||
Path to DYNA4 Python API |
Tool connection |
string |
Path to the DYNA4 remote API. Since DYNA4 R10 the remote API wheel has to be installed manually. Specify the path where the “dyna4_api” package is installed. As of DYNA4 R8 the remote API file is installed in the subdirectory “DYNAwareProducts\RemoteAPI” of the DYNA4 installation. In previous versions it needs to be extracted from the DYNA4 help. |
||
Path to the MATLAB installation |
Tool connection |
string |
Path to the MATLAB installation directory |
||
XMLRPC API port |
Tool connection |
10895 |
int |
Port on which the DYNA4 XMLRPC API is available |
|
Always start DYNAanimation |
Tool connection |
☑ |
bool |
Always start DYNAanimation when simulation starts |
|
Close DYNA4 when disconnecting |
Tool connection |
☐ |
bool |
Close running DYNA4 instance when configuration is deactivated |
|
Timeout for tool call ❲in sec.❳ |
‘600’ |
string |
Timeout after which a tool call is aborted. |
Jobs 🛈¶
BuildSimulationTarget¶
Builds the selected Simulation Target. Only supported for DYNA4 Windows Executable, CANoe, dSPACE SCALEXIO.
DownloadTargetModel¶
Downloads the target code. Afterwards a full assignment of the model parameters is performed. If no download is necessary for the current simulation target only the parameter assignment is executed.
GetSimulationResults¶
Retrieve results of the last simulation
LoadModelConfiguration¶
Loads or activates model configuration in DYNA4
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
ModelConfiguration |
string |
Name of the DYNA4 Model Configuration |
LoadTask¶
Loads task into DYNA4 and resets previously set task parameters
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
TaskName |
string |
Task name |
RunTask¶
Starts execution of the loaded Task in DYNA4
SetTaskParameter¶
Set parameters for current Task
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
ParameterName |
string |
Name of the task parameter |
|||
ParameterValue |
object |
Value of the Task Parameter |