Change update rate of Simulink Real-time Instrument Panel

11 ビュー (過去 30 日間)
Thomas Marullo
Thomas Marullo 2014 年 3 月 20 日
回答済み: Thomas Marullo 2014 年 3 月 21 日
I am playing with the new Simulink Real-Time Instrument Panel and linking instruments to signals and parameters from a model. When I run the panel, it updates at 1 second. Is it possible to change this update rate so I get a smoother interface to work with? It is very clunky to move a dial and see the response in an indicator or gauge update 1 time a second.

採用された回答

Thomas Marullo
Thomas Marullo 2014 年 3 月 21 日
Well, I restarted Matlab and the model and now everything works smoothly. Not sure what went wrong. Thanks everyone. I think the problem fixed itself.

その他の回答 (3 件)

Mag
Mag 2014 年 3 月 21 日
The instruments update at 20 frames per second, not sure how you concluded 1 time a second. One reason why an instrument may appear to update not very smoothly if the signal of real time application itself is updating at slow rate. In this case, it would make no difference how fast the instruments updates.
Are you by any chance running anything else that is communicating to the target at the same time while running the instrument panel, for example are you connecting and running the Simulink model using the Simulink External mode interface as well?

Suneesh
Suneesh 2014 年 3 月 20 日
編集済み: Suneesh 2014 年 3 月 21 日
The default refresh rate is 50 milliseconds. From my experience this is seen in practice too. This may however be hampered if you are running either a complicated model or if you have a lot of applications running on the host PC. I recommend experimenting with the shipped demo 'xpcosc' which is a simple model. If you still see issues with performance then perhaps you could contact technical support.
Also, the instruments have a property called 'UpdateFrameRate' which is set to 50 by default, indicating the 50ms I mentioned above. Do check this value for your instruments as well.

Thomas Marullo
Thomas Marullo 2014 年 3 月 21 日
My model is running at 0.001. The Instrument Panel I designed it rudimentary with 2 knobs, 2 fluid gauges and a numeric indicator. The knobs works smoothly and I have it bound to a Constant Value. The problem seems to be with this binding. When I move the knob and observe my output (which is just a simple product) the value steps instead of changing smoothly. I checked the UpdateFrameRate and it is 50 for that object. I checked all the sample rates in my model and it is SingleTasking at 0.001.

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by