Why does Simulink model data plot/recording to workspace variable and scope dispay reset after 1000 data entry points?

9 visualizzazioni (ultimi 30 giorni)
Hi, model is using external DAC for data input into model. All works fine but no matter what sample time I set the ToWorkspace workspace variable only records that last 1000 data entries. These same points are displayed on the model Scope. I've tried changing Model simulation parameters (unchecking Limit data points to last), using different Format (Array, Timeseries etc), simulation run time set to inf. All to no avail. Tried Scope setting to scroll, which makes the display scroll after a while but when save scope data to workspace also set, the named variable only stores the last 1000 points. Any ideas?? Seem to have exhausted all avenues.

Risposte (2)

Swarooph
Swarooph il 1 Ago 2017
Couple of things to try.
Scope has a limit data points to last option. Uncheck this in the Scope configurations.
To Workspace also has a similar option. Double click on the block and ensure it is set to Inf.
The model level parameter called LimitDataPoints is used only when you are logging from the Data Import/Export pane. I believe the local settings of these blocks take precedence in that case.
  1 Commento
Sean
Sean il 2 Ago 2017
Hi, thanks for reply. The couple of things you suggest are good but I've already tried both options as part of earlier work trying to overcome problem. Here's some further details: if I set sample rate to 0.005 (I use variable Ts=0.005 and type Ts in all model blocks and model configuration parameters window) and set the simulation run time to 12 (seconds). If I then stop the simulation at 4 seconds all data is recorded correctly (from Scope and ToWorkspace blocks) and all points are visible on the Scope (assume Scope parameter Time span = 20). If I restart the same simulation but let it run for the 12 sec, when the scope plot reaches 5 sec then the plot starts from 0 again. This cycle repeats until the simulation stops. At which point there is only 2 sec of plot data on the scope and only 2 sec worth of data saved to the ToWorkspace and Scope variables. If I now set the sample rate to 0.02, and leave the run time at 12 everything works as expected (which is what I'd expect as run time is less than 20 seconds (i.e. 0.02*1000=20). However if I now change run time to 35 and also set the Scope Time Span parameter to a value grater than 35, then the same issue is observed described earlier. Any help or feedback would be much appreciated, Thanks

Accedi per commentare.


minkow38
minkow38 il 6 Set 2017
Modificato: minkow38 il 6 Set 2017
I think you can try to follow these steps:
The limitating length of 1000 samples is set on "external & signal triggering" window, where you can choose the Duration of a selected signal.

Categorie

Scopri di più su Event Functions in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by