Borrar filtros
Borrar filtros

Simulink: How do you send a function call to another model?

11 visualizaciones (últimos 30 días)
Thomas MacGregor
Thomas MacGregor el 5 de Nov. de 2021
Respondida: Fangjun Jiang el 9 de Nov. de 2021
Is it possible to send a function call signal into another model? For example, I have a Matlab function that has some function call outputs, and I want to call a chart or a function that is housed in a seperate model
If i tried this though, I ge the following error: Function-call port of block 'untitled1/Chart' is connected to 'untitled1/In1' which does not produce a function-call signal. Blocks that can produce function-call signals include Stateflow charts, root-level Inport blocks with parameter 'Output function call' selected, or S-functions.
How can i send this function call into the model block like shown above?

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 9 de Nov. de 2021
In this case, double click the "In1" Inport block inside the referenced model, check the "Output function call" option under the "Signal Attributes" tab.
I am not sure if you can create a function-call output using the MATLAB Function block though. Try the Function-call Generator block first.

Categorías

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

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by