Pcode execution error while running it
조회 수: 7 (최근 30일)
이전 댓글 표시
When I execute pcode (which is .p), I got the error below.
I used pcode (filename) statement to make .p file.
Anyone knows what the problem is?
Error in sweep_3level_PWM_harmonic (line 44)
run('Grid_side_3_level_anpc_Rectifier_PWM_harmonic_run') - Show complete stack trace
Caused by:
Error using Grid_side_3_level_anpc_Rectifier_PWM_harmonic_run (line 89)
Simulink cannot determine sizes and/or types of the outputs for block 'Grid_side_3_level_anpc_Rectifier_PWM_harmonic/Modulator/MATLAB Function1' due
to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly
specify sizes and/or types for all block outputs. - Show complete stack trace
Error using Grid_side_3_level_anpc_Rectifier_PWM_harmonic_run (line 89)
Error occurred in 'Grid_side_3_level_anpc_Rectifier_PWM_harmonic/Modulator/MATLAB Function1'. - Show complete stack trace
댓글 수: 0
채택된 답변
Walter Roberson
2022년 1월 5일
Normally when your Simulink MATLAB Function Block invokes a function that is .m code, Simulink examines the source code to try to deduce what size and datatype are needed for each of the signals.
When you invoke pcode then Simulink cannot examine the MATLAB code to determine the sizes and data types.
You will need to use the port manager to mark the MATLAB Function Block ports for data type and data size.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!