simulink scope display blank
14 次查看(过去 30 天)
显示 更早的评论
When I run my Simulink model with the scope open the scope window goes mostly grey and I get the following error output.
No target definition was found. Assuming this will be compiled as a lib used as a referenced model No target definition was found Warning: Error occurred while executing callback: Error using uiservices.getContrastColor (line 8) Simulink model 'mean' was called with incorrect number of arguments
Error in matlabshared.scopes.UnifiedScope/updateDynamicWidgetsControl (line 43) fg = uiservices.getContrastColor(bg);
Error in matlabshared.scopes.UnifiedScope/renderDynamicWidgetsControl (line 37) updateDynamicWidgetsControl(this);
Error in matlabshared.scopes.UnifiedScope/windowMotionCallback (line 8) renderDynamicWidgetsControl(this);
Error in matlabshared.scopes.UnifiedScope>@(varargin)this.windowMotionCallback(varargin{:}) (line 277) this.WindowMotionListener = addlistener(hFig, 'WindowMouseMotion', @this.windowMotionCallback);
this is on a 2016b installation on Windows 7 x64.
Thanks alex
0 个评论
回答(5 个)
David Ding
2017-1-3
Hi Alex,
Without knowing your exact workflow, it is difficult to triage the issue. From the error message you are receiving, it appears that you have created some callback functions in your model that is not passed with the correct number of arguments. You can double check this and see if modifying the callbacks would resolve the issue. If not, if possible, you can share the model and the detailed workflow to reproduce the issue and I will be happy to take a look at it.
Thanks,
David
0 个评论
David Ding
2017-1-4
Hi Alex,
Thank you for sending me the model. I ran it on my machine using R2016b and it seemed to be working, as the scope is displaying a constant signal of value 1.
However, I did notice that there is a callback function in "PostLoadFcn" with code populated inside. As the error is complaining about contents in the callback, I suggest to try and remove the code inside that callback, such that the model does not contain any callback functions and see if that resolves the issue. To access callback functions, follow the steps below:
- Right click on any whitespace in the model
- Select "Model Properties"
- Click on the "Callbacks" tab
- Under the list of model callbacks, any function with an asterisk at the end contains code. Remove all pieces of code from all callback functions
- Click "apply". There should not be any asterisks on any of the callback functions. Then click "okay"
- Save the model. Then, run it.
Hope this helps!
David
0 个评论
David Ding
2017-1-5
Hi Alex,
From your latest information, it appears that the main issue lies in your graphics card. It seems that the hardware configuration you have does not provide the necessary graphical support for displaying the scope. You may try restarting MATLAB in openGL software mode by typing
>> opengl software
Upon starting a new MATLAB session (Windows machine only). If this is not possible or if you continue to see the error, you need to contact your graphics card maker for further assistance.
One way to determine the graphics card information on your machine is to type the following command in MATLAB:
>> opengl info
Thanks,
David
0 个评论
Prashant Arora
2017-1-18
It seems like your model named "mean" is shadowing the MATLAB function "mean". Rename the model to see if the error is resolved.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model, Block, and Port Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!