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!