MATLAB Embedded Coder C-Caller Block: Custom type function variable arguments
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
i want to use my C-Code in MATLAB Embedded Coder. I currently use the C-Caller Block to integrate my C-Code respective my C-functions. The problem is that I use custom data types for function arguments and the "Block Parameters: C Caller" does not recognise my function. When I change the function argument in my C-Code to e.g. int the C-Caller Block immediately shows up the function. How to avoid that issue?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/787320/image.png)
Thank you and kind regards
Clemens
0 commentaires
Réponses (1)
Roy Mathew
le 30 Nov 2021
C Caller directly calls the function from Simulink. So, the inputs to the function must be simulink compatible. If any of the inputs of the C Function cannot be mapped to a simulink supported type, then the function will not show up.
Alternatively, you can use the C Function block, which allows you freedom in calling functions that are directly unsupported in Simulink.
https://www.mathworks.com/help/simulink/ug/call-and-integrate-external-c-algorithms-into-simulink-using-c-function-blocks.html
0 commentaires
Voir également
Catégories
En savoir plus sur Naming Conventions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!