Getting error in MATLAB State flow

3 ビュー (過去 30 日間)
THIRUPURASUNDARI
THIRUPURASUNDARI 2024 年 10 月 2 日
回答済み: Shivam Gothi 2024 年 10 月 2 日
I am getting error in MATLAB state flow regarding unresolved symbol and one dimensional vector .but when resolve the symbol i am getting extra input ports from the state flow ,and i am not having any about the one dimensional vector error in output port .I am requesting ,can anyone give solution to my problem.=== Simulation (Elapsed: 1 sec) ===
Error:Chart 'main_project__revised/P_T_Scr_Drc_Ats_State' has unresolved symbols.
Error:Compilation of model 'main_project__revised' failed while trying to resolve underspecified signal dimensions.
Caused by:
Chart 'main_project__revised/P_T_Scr_Drc_Ats_State' has unresolved symbols.
Error in port widths or dimensions. 'Output Port 1' of 'main_project__revised/P_T_Scr_Drc_Ats_State/P_T_scr_drc_sus_err_pend' is a one dimensional vector with 1 elements.
Suggested Actions:
Enable 'warning' or 'error' diagnostics for the list of underspecified signal dimensions.

回答 (1 件)

Shivam Gothi
Shivam Gothi 2024 年 10 月 2 日
As per my understanding, you are trying to resolve the error "Unresolved symbols" in simulink "state flow" block, but trying to do so, introduces an extra input port to the "state-flow block" which is not desirable.
Cause of error:
Double click on the "chart" block and Navigate to the "Modelling" tab. Inside the "modelling" tab, select "Symbols pane" option which will evantually open the "symbols pane" on the right side of the window as shown below.
when you click on "resolve undefined symbols" icon in the "Symbols pane", the simulink automatically assigns a "TYPE" to it.
In your case, the "type" property of undefined symbol might have been set to "Input Data". This is the reason behind an additional "input" port being created on the state-flow.
solution:
As shown in the below figure, set the "type" property of the unresolved symbol to "local data"
By configuring the "TYPE" of a variable as "local data",that variable becomes "local" within the block and it will be seen only inside the "chart" block. Now you observe that the input port will not be there in your state-flow.
I hope this helps !

カテゴリ

Help Center および File ExchangeData Specification Basics についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by