simulink scope display blank
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (5)
David Ding
el 3 de En. de 2017
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 comentarios
David Ding
el 4 de En. de 2017
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 comentarios
David Ding
el 5 de En. de 2017
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 comentarios
Prashant Arora
el 18 de En. de 2017
It seems like your model named "mean" is shadowing the MATLAB function "mean". Rename the model to see if the error is resolved.
0 comentarios
Ver también
Categorías
Más información sobre Model, Block, and Port Callbacks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!