How do I fix Simulink.DataType object not in scope while using c caller?
Ältere Kommentare anzeigen
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 Kommentare
Raghava S N
am 8 Aug. 2024
Hi @AKHILA, could you share the Simulink model you are working with? That would help in debugging your issue.
David Balbuena
am 8 Aug. 2024
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Integrate C Code Using C Caller Blocks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!