필터 지우기
필터 지우기

Problem with simulink waitbar

조회 수: 6 (최근 30일)
Samah EL QASSAH
Samah EL QASSAH 2017년 9월 28일
편집: Walter Roberson 2017년 10월 3일
Hi,
I tried to simulate the simulink waitbar model:
I get this error:
How do I run the simulink-waitbar?

답변 (2개)

Walter Roberson
Walter Roberson 2017년 9월 28일
Embedded packages do not support MATLAB graphics. Most of them support graphics only through blocks that are specific to the target. For example for Raspberry Pi, the only supported graphics is through a block that can only present images, so all output has to be "drawn" into an image to be displayed to the user.
  댓글 수: 2
Samah EL QASSAH
Samah EL QASSAH 2017년 9월 29일
how can I exploit the waitbar and see the results. How to proceed? Because when I run the Simulink model or even the .m file I get this error. I don't understand why?
Walter Roberson
Walter Roberson 2017년 9월 29일
Which MATLAB version are you using? "Embedded MATLAB Function block" (in your diagram) was renamed to "MATLAB Function Block" as of R2011a.
(Embedded) MATLAB Function Blocks run in interpreted mode when Acceleration mode is 'Normal', but for all other acceleration modes, some degree of optimization is done. If the Acceleration mode is 'Accelerator' it is possible to call upon interpreted MATLAB functions but only if you code specially. For all of the other Acceleration modes, only the functions supported for Code Generation are supported.
You should really only be using an Embedded MATLAB Function Block for code that you intend to eventually run on an external ("embedded") device -- a device that might not even have an operating system or any graphics capabilities.
I would suggest that your "waitbar" would be better served by using a Scope block on a signal that indicates the fraction done.

댓글을 달려면 로그인하십시오.


Samah EL QASSAH
Samah EL QASSAH 2017년 10월 3일
Thank you Walter for your reply.
I have the version Matlab R2013a.
I didn't understand everything you wrote about acceleration but I want in a first place to turn the model I found on this link:
https://www.mathworks.com/matlabcentral/fileexchange/9738-simulink-waitbar
I have changed nothing in the template or in the .m file. I want to see the results but I get an error I don't know if it's related to the version I have or I missed something.
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 10월 3일
편집: Walter Roberson 2017년 10월 3일
If you are deploying to hardware then you cannot use that FEX submission. That submission is only for use with fully simulating everything on the host in "Normal" accelerator mode.
I recommend that you ignore that FEX submission and change to using a scope block on a signal that you create that indicates how far along you are.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by