How to pass C-structures as output for using Legacy code?

hi I have written a C-function that renders a user-defined structure as the output.
How should I pass this as the ouput of a simulink block generated using the Legacy Code tool?

Antworten (1)

Kaustubha Govind
Kaustubha Govind am 3 Okt. 2012

0 Stimmen

Structures are basically called Bus signals in Simulink. You might need to a define a Simulink.Bus object to match the definition of your structure, and specify that bus type as the S-functions output datatype. According to this page, the demo 'sldemo_lct_bus_script' is an example of using Legacy Code Tool with a bus input/output - hopefully, going through that example will help you get started.

Kategorien

Mehr zu Block and Blockset Authoring finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 3 Okt. 2012

Community Treasure Hunt

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

Start Hunting!

Translated by