How do I create an output port for a C caller block?

1 view (last 30 days)
I have having issue when adding a point variable to a function that is used in c caller.
If I set this variable as an output using the block paramers dialog block, I get a compiler error that it does not know the size of the data type.
If I try to set the size = 1, it always reverts the size back to -1.
I need to get resolution on this issue ASAP.
thanks.

Answers (1)

Ganesh Regoti
Ganesh Regoti on 14 Jan 2020
Hi,
As per my understanding, you are creating a point variable in the function and trying to return it. But it is not possible as of now. Instead you can do the following
  1. Send the point variable as a argument to the function.
  2. In block parameters of Caller block, change the scope of the variable to InputOutput format.
CCaller block -> block parameters -> Port Specification -> Scope
  1. Refresh the caller block, the input and output ports get updated.
Hope this helps!

Categories

Find more on Simulink Functions in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!