Exporting the Simulink scope data to the Matlab Workspace in the CarSim environment

3 views (last 30 days)
Hi,
I am facing a problem in exporting the simulink scope data to the Matlab workspace in the CarSim environment. I have a simulink model which I am accessing it through carsim (Run Control with Simulink-Send to Simulink). Before I run the simulation, I ensure that I select the export the scope data option to the Workspace. But after the simulation is over, I don't see my exported scope data in the Matlab workspace. I need to get the data in the Workspace to better analyze and plot according to my requirement. I am using the Matlab 2015b version.
I am also sending you the snapshot of the issue that I am facing for better understanding. Kindly help me in this regard.
  2 Comments
Samatha Aleti
Samatha Aleti on 16 Oct 2019
By default, logged data will be saved as an object by name “out” which holds “ScopeData”. Can you just make sure if an object by name “out” is logged into workspace.
Subrat Kumar Swain
Subrat Kumar Swain on 19 Oct 2019
Thank you so much for the much valuable suggestion. I tried out by saving the data by the name ScopeData in Matlab Simulink open under the CarSim Environment. However, the file doesn't get exported to the Matlab Workspace. However, if the same simulink file is open in the Matlab Environment, the data gets exported to the Workspace. But the Simulink file open in CarSim environment faces this issue.
However, after doing a little bit of research, I figured out the solution how to export the data to the Matlab Workspace. Here are the steps I followed to get my data in the Workspace.
Steps to save the Matlab Scope data working under CarSIM
1. It is important to provide the path of the current CarSim Data Directory in the Models Simulink Screen in the CarSim GUI.
2. Right click on the signal going to the scope and select the Log Selected Signals option
3. After the simulation is over, go to the Simulation Data Inspector near the Simulink Time slot and export the data to the CarSim Data directory.

Sign in to comment.

Answers (0)

Categories

Find more on Prepare Model Inputs and Outputs in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!