1
votes

I'm using Sensoray 626 card with simulink real time (rtwin), the problem is that when I try to plot some graph using scope block in real time no more than 800 points are plotted. In other words, it seems that the scope updates the graph by deleting the old points and starting new frame from zero again and again.

I tried to export data to be plotted from simulink to workspace in order to plot it after the real-time simulation is finished but, unfortunately, the same problem occurred. I have got no more than 800 points in workspace (in some attempts I've got less than 200).

The weird thing is that such problem doesn't occur with the same matlab version and with the same pc but using das 1002 card instead. both The scope and save-to-workspace blocks work well.

I'm using matlab 2009 on Windows Xp.

I would have used das 1002 card but it doesn't contain any encoder. PS: solver configuration was properly set , necessary libraries were loaded.

Any help that can solve this problem would be appreciated.

thanks in advance.

solver configuration

solver

scope properties

simple simulink example

1
question was edited ^_^Hashem Ghanem

1 Answers

1
votes

The Scope is only able to display an amount of samples equal to external mode buffer length. So please go to Tools->External Mode Control Panel->Signal & Triggering and check the Duration parameter there. I'd bet it is 1000, so 1000 samples at 0.001 s sampling rate gives the 1 second of data you get. If you want more, try to increase this number.