Error on opening MATLAB Function block in Simulink

조회 수: 15 (최근 30일)
Tirthankar Chakraborty
Tirthankar Chakraborty 2024년 4월 8일
댓글: Tirthankar Chakraborty 2024년 4월 8일
Whenever I add a MATLAB Function block in a Simulink model and double-click it, instead of a script opening with function y = fcn(u), I get a blank script while the following error/warning message pops up in the MATLAB command window and MATLAB becomes unresponsive.
Warning: Error occurred while executing the listener callback for event MLFB
defined for class slmle.internal.slmlemgr:
Operands to the logical AND (&&) and OR (||) operators must be convertible to
logical scalar values. Use the ANY or ALL functions to reduce operands to
logical scalar values.
Error in slmle.internal.MLFBEditor/callback
Error in slmle.internal.MLFBEditor/init>@(varargin)obj.callback(varargin{:})
Error in slmle.internal.slmlemgr/action
Error in slmle.internal.slmlemgr/init>@(varargin)obj.action(varargin{:})
Error in message.internal.executeCallback
> In slmle.internal.slmlemgr/action
In slmle.internal.slmlemgr/init>@(varargin)obj.action(varargin{:})
In message.internal.executeCallback
In slmle.internal.MLFBEditor/createToolStripContext
In slmle.internal.MLFBEditor/open
In slmle.internal.slmlemgr/open
In slmle.internal.EMLEditorApi/documentOpen
In open_editor (line 72)
In eml_man (line 56)
In eml_function_man>create_ui (line 169)
In eml_function_man (line 26)
In eml_chart_man>create_ui (line 104)
In eml_chart_man (line 20)
In dispatch_task (line 12)
In eml_man (line 66)
In studio_redirect>try_specialized_editor_open (line 761)
In studio_redirect>open_object (line 775)
In studio_redirect (line 33)
In sfprivate (line 15)
In slsf>blk_open_method (line 784)
In slsf (line 55)
This happens only on my PC though. This does not happen when I use a MATLAB Function in someone else's PC.
How do I resolve this issue?
  댓글 수: 1
Ramtej
Ramtej 2024년 4월 8일
Assuming you are getting this error for every MATLAB function block across all Simulink models and the MATLAB function block is valid. The error seems to be quite specific and suggests there might be an issue with your MATLAB installation or configuration since you mentioned that issue is unique to your PC. Reinstalling the MATLAB might fix your issue.

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

채택된 답변

R
R 2024년 4월 8일
Hi Tirthankar,
I encountered a similar problem previously. In my case, the error occured because the path to the Simulink model file included special characters, particularly the '#' symbol. The presence of a hash symbol in the path can cause it to be misinterpreted, resulting in the loss of all information following the hash. I suggest relocating the model files to a directory that does not contain any special characters, with an emphasis on avoiding '#'.
Hoping this resolves the issue!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by