External Mode scope traces (Simulink)
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Jan Houska
2014-8-22
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 个评论
Jan Houska
2014-8-25
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?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!