Problem with "To Workspace" with Real-Time

2 views (last 30 days)
holyhope
holyhope on 2 Mar 2011
Hi all, i have a problem: I use the block "To Workspace" for save my simulink data but every 10 second they reset. I use a sample-time of 0.01
I try: (1)-Change "limit data point to last" from "inf" to "100000"
(2)-Decimation from "1" to "10" or "100"
(3)-use multi-input or single-input (enter with a "mux" of 4 data or enter with a single line with 1 data)
(4)-change input data-type
(5)-use to-file (but didn't work with real-time workshop)
(6)-Save data from Scope but they reset every 10 seconds too
(7)-change between "array" - "structure" - "structure with time"
(8)-modify "save-option" and more other in Simulation ---> Configuration Parameters ---> Data Import/export
*** BUT No result... Reset every 10 second***
If I change sample-time from "0.01" to "0.1" it reset every 100 seconds. (it is strange because sample "0.01" with decimation of "10" reset every 10 seconds not every 100 seconds). This is the only way for increase the reset-time but sample rate of 0.1 is too slow...
Important: DO NOT SAVE LAST 10 seconds but it RESET every 10 second: if i interrupt simulation at time "18.000" second i have the data between second #10 and second #18 (with sample "0.01" and decimation "1" I have 800 date) NOT between second #8 and second #18.
I need store data and I have no other idea... what I can try? If it isn't possibile store data with "to workspace" what i can do? Thare are any "S-function" that work with "Real-Time-Workshop" for store date? I hope someone can help me...
Many Thanks
Massimiliano
  2 Comments
Sebastian
Sebastian on 2 Mar 2011
Can you describe the context a bit more? It looks like you are generating some sort of real-time code from your model. Is that running on your host machine then?
Are you for example running your model in External Mode? If so, then maybe you need to tweak the settings in the Tools -> External Mode Control Panel -> Signal & Triggering
holyhope
holyhope on 2 Mar 2011
Thanks!!!
I modify setting in:
Tools -> External Mode Control Panel -> Signal & Triggering
and now work! (apparently!)
Many Thanks

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!