フィルターのクリア

Save simulation data in TargetLink Main Dialog with use of API commands

12 ビュー (過去 30 日間)
Patrik
Patrik 2011 年 6 月 29 日
I´m trying to save my simulations data in TargetLink using API commands. In the GUI, data can be saved by entering the block TargetLink Main Dialog/Simulation.
I know that the data from a simulation should be stored in the TLDS memory, and I need to extract the simulation data. Do anyone know how to save the data by using API commands?
Kindly suggest me some solution for my problem.
Thanks
Patrik
  1 件のコメント
Kaustubha Govind
Kaustubha Govind 2011 年 6 月 29 日
Patrik: You may have better luck on dSPACE forums with this question.

サインインしてコメントする。

採用された回答

Patrik
Patrik 2011 年 7 月 1 日
I got this answear from dSpace:
In general there is no official API avaliable to store TargetLink simulation data. Nevertheless I can provide some simple commands to store data (similar to pressing the Load and Save buttons in the TargetLink Main Dialog).
Save a simulation
>> tlds('simulation no.2', 'save', 'bla')
Saves simulation "simulation no.2" in file "bla.mat". The simulation name is the same as shown in TargetLink Main Dialog on Simulation tab.
Load a simulation
>> tlds(0, 'load', 'bla.mat').
The simulation name is stored in the MAT file. If the same simulation name exists in the simulation list (TargetLink Main Dialog), a new one is generated by default.
Get simulation names
1) Assign simulation to a variable >> MyVar = tlds(0,'get','simulations') 2) Get the name of first simulation >> MyVar{1}.label
The MAT file can be loaded into the MATLAB workspace and consists of a single stucture. The component names are meaningful, therefore I guess that a user will find the relevant information very quick in this structure, e.g. logging data.
Please have in mind that the API is undocumented and may change over time without any notification. Use it at your own risk.

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 6 月 29 日
TargetLink uses .mat format to save the data. But it does put all the data in a structure and add some annotations. So you can't use MATLAB save() function to save the data. From its documentation, all the API functions are listed but none seems to be able to do this. So I think there is no API available for end user for the TargetLink Main Dialog block. But do check with dSAPCE tech support to be sure.

カテゴリ

Help Center および File ExchangePrepare Model Inputs and Outputs についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by