MATLAB Embedded Coder C-Caller Block: Custom type function variable arguments
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Roy Mathew
el 30 de Nov. de 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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!