External Mode scope traces (Simulink)

조회 수: 1 (최근 30일)
John
John 2014년 8월 21일
댓글: Jan Houska 2014년 8월 25일
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...

답변 (1개)

Jan Houska
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
John
John 2014년 8월 22일
편집: John 2014년 8월 22일
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 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 CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by