How to use global variable in MATLAB discrete-event system block (not MATLAB Function Blocks)?

1 回表示 (過去 30 日間)
I want to use global variable in a way like Resource Scheduling Using MATLAB Discrete-Event System and Data Store Memory Blocks. Like the following: After defining the parameter in a Data Store Memory block and declare the corresponding parameter in a MATLAB Discrete-Event System block, that block can access the value. But I can't implement this feature in my project. I have looked up a lot of information, but none of it has helped. Please help me solve this problem. Thanks!
The data store memory can relate to the MATLAB Discrete-Event System block
The information from the diagnostic viewer is:
Warning:System object ignores the global variable 'BoardDataCollectionProcessBoxDatum1' added during 'DatumEntry' execution. The global variable is either not declared in 'DatumEntry' or is declared while using the MATLAB debugger.
  1 件のコメント
YOUNG
YOUNG 2024 年 8 月 7 日
'DatumEntry' is the function in the upper class of the class that I want to use the global variable.

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

採用された回答

Fangjun Jiang
Fangjun Jiang 2024 年 8 月 7 日
  2 件のコメント
YOUNG
YOUNG 2024 年 8 月 8 日
編集済み: YOUNG 2024 年 8 月 8 日
It can not work. Can you explain the warning information I provided?
YOUNG
YOUNG 2024 年 8 月 8 日
編集済み: YOUNG 2024 年 8 月 8 日
It seems that I have to declare the global variable in some specific simevents function.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeClassical Control Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by