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 CenterFile Exchange에서 Data Specification Basics에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by