External Mode scope traces (Simulink)

2 Ansichten (letzte 30 Tage)
John
John am 21 Aug. 2014
Kommentiert: Jan Houska am 25 Aug. 2014
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...

Antworten (1)

Jan Houska
Jan Houska am 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 Kommentare
John
John am 22 Aug. 2014
Bearbeitet: John am 22 Aug. 2014
EDIT: see attached simple Constant to Workspace model, which does not output values to the workspace.
When sending to workspace, only a single floating point number is sent-- I used get arrays, but no longer. Similarly, nothing shows up on displays either, although they used to -- they always just read 0. The data is in range: simple things like unit constants, Sine waves, etc. I know there are proper values because I'm outputting analog values that are changing with the Sine wave.
Jan Houska
Jan Houska am 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?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by