How do I fix Simulink.DataType object not in scope while using c caller?
이전 댓글 표시
I am using c caller and function used in that is pid controller. While simulating that its showing error like "Unable to resolve 'PID_vars' to a valid type for input port 0 of 'pidexmpl/C Caller'.
Caused by:
Simulink.DataType object 'PID_vars' is not in scope from 'pidexmpl/C Caller'". Can someone tell me how to resolve this error?
댓글 수: 2
Raghava S N
2024년 8월 8일
Hi @AKHILA, could you share the Simulink model you are working with? That would help in debugging your issue.
David Balbuena
2024년 8월 8일
What is PID_vars? Is it a type defined in your external code? If so, you need to represent that in Simulink. The Simulink.importExternalCTypes function can help import that type for Simulink.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Integrate C Code Using C Caller Blocks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!