External Mode scope traces (Simulink)
2 views (last 30 days)
Show older comments
Why does data not show up on a scope in External Mode, in a simple Real-Time Windows Target application (in Simulink)?
First data appeared only for the first 0.9 seconds (and reset after that), but now I don't see any data at all. I've set the total samples to 1e6 in Code->External Mode Control Panel-->Signals&Triggering, but no data shows up on the scope while running.
Sampling time is 1e-4, and sim time is 0.8 seconds, so something should show up...
0 Comments
Answers (1)
Jan Houska
on 22 Aug 2014
One of possible explanations would be that the data are out of range of the Scope block. If in doubt, please use a To Workspace block (or set up the Scope so that it stores its data to workspace) and analyze the data in the workspace. This way, you will be able to see even any infinities or NaNs your model may produce.
And, please try to keep the Duration parameter at a reasonable value. 0.8 seconds at 1e-4 sample time is 8000 samples, so you may want to set Duration to 10000 or maybe, say, even to 50000 to be extra safe, but not to 1e6. The memory for these buffers is real-time accessible non-swappable memory which is quite a precious resource. Overallocating it by such a huge margin only reduces the overall performance and does not help anything.
2 Comments
Jan Houska
on 25 Aug 2014
Just tested your model, I'm able to see the data on both the Scope and in the workspace. You are saying that you used to get the values but now you don't - any idea about what has changed in the meantime?
See Also
Categories
Find more on Target Computer Setup in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!