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

3 visualizaciones (últimos 30 días)
Bob Gastineau
Bob Gastineau el 3 de En. de 2020
Respondida: Ganesh Regoti el 14 de En. de 2020
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.

Respuestas (1)

Ganesh Regoti
Ganesh Regoti el 14 de En. de 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!

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by