Callback evaluation error using Simulink Masked Subsystem Dialog Callbacks

11 ビュー (過去 30 日間)
Chris Emerson
Chris Emerson 2012 年 11 月 9 日
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 件のコメント
Chris Emerson
Chris Emerson 2012 年 11 月 14 日
OK thanks, I was only expecting to see '--> Gain is negative' on the error dialog, maybe this has already been 'enhanced' with the additional text?!
Kaustubha Govind
Kaustubha Govind 2012 年 11 月 15 日
Chris: Yes, I think your error message is appended to a standard message.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSubsystems についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by