- c
- s1, a nested bus with:
- a
- b
Load large bus data in Simulink Rapid Accelerator mode
2 views (last 30 days)
Show older comments
I am trying to run a Simulink simulation in Rapid Accelerator mode, while reading in logged bus data from a previous run. The saved data is 1.65 GB. I've tried using fromWorkspace blocks to load the data in, which works for smaller chunks of data but when I try to load in the entire 1.65 GB in Rapid Accelerator mode, it gives this warning with the subsequent error "Warning: Variable 'parameters' was not saved. For variables larger than 2GB use MAT-file version 7.3 or later." and "Error:An error occurred while attempting to connect to the Rapid Accelerator target for the model 'ModelName': 'Parameter MAT file must contain a 'parameters' field (matGetVariable)'".
I switched to trying to use root-level input ports to load the bus data in. This works in normal mode, and I don't get any warnings/errors when running this in Rapid Accelerator mode for my entire data set. However, in Rapid Accelerator mode, the signals that are loaded in from the root-level input ports contain no real data, just 0's for every entry in the bus data.
I see that the documentation says this: "You cannot use input ports to import buses in external modes. To import bus data in rapid accelerator mode, use Dataset format" but I am using the Simulink.SimulationData.Dataset function to create the input data (that I then put in Model Settings->Data Import/Export). I don't understand what using the "Dataset" format means then. https://www.mathworks.com/help/simulink/ug/importing-structures-of-matlab-timeseries-objects-for-bus-signals-to-a-root-level-input-port.html#bu10ewv
Any help with either of these issues would be appreciated.
0 Comments
Answers (1)
Anudeep Kumar
on 12 May 2025
Hi Michaela,
I followed the steps outlined in the documentation you shared. I tried the ‘InportLoadingBus’ model from the documentation. From what I understand, the model ‘InportLoadingBus’ contains two Inports: the first accepts non-bus data, while the second is configured for bus data.
For the first input port, a timeseries object is created. For the second, an input structure is built to match the elements of the BusObject, which includes:
Therefore, the in2 object we create needs to reflect this bus hierarchy, containing timeseries or timetable objects for the relevant bus elements, hence the code:
t2 = (1:5)';
d2 = cos(t2);
in2.c = timeseries(d1,t1);
in2.s1.a = timetable(seconds(t2),d2);
Here simulink uses default value for ‘b’ which is zero. Which might be the issue being faced.
The resulting Dataset should have two elements: the first for the non-bus Inport, and the second for the bus Inport.
It’s important to ensure that the structure of the Dataset matches the bus hierarchy, as any mismatch could potentially cause issues.
Additionally, I came across another documentation link that might be helpful:
I hope this information is useful!
0 Comments
See Also
Categories
Find more on Load Signal Data for Simulation 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!