Callback evaluation error using Simulink Masked Subsystem Dialog Callbacks
이전 댓글 표시
I am using dialog callbacks to validate data entry, As an example I have created a subsystem containing a Gain block with parameter G and entered the following in subsystem mask, parameters, dialog callback;
if str2num(get_param(gcb, 'G'))<0 error('Gain is negative.') end
now when I enter a negative value for the Gain I get the following;
--> Error evaluating 'MaskCallback' callback of Subsystem block (mask) '<a href="matlab:open_and_hilite_system ('untitled/Subsystem')">untitled/Subsystem</a>'. --> Gain is negative
Can anyone tell me why I get the error evaluating the callback?
I am running R2011a on Mac OS X Mountain Lion
Thanks
댓글 수: 3
Kaustubha Govind
2012년 11월 9일
AFK, that is the format in which errors thrown from the the mask callback. Perhaps you could submit an enhancement request if you'd like them to be reported differently?
Chris Emerson
2012년 11월 14일
Kaustubha Govind
2012년 11월 15일
Chris: Yes, I think your error message is appended to a standard message.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Subsystems에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!