MATLAB: Question regarding code generation.

code generationsimulinksimulink coderstateflow

Hi,
I have a question regarding code generation.
I have a simulink model which consist of a single stateflow block( my entire logic was done in stateflow) and 5 input ports (passes some input values to the stateflow) and a outport.
currently am interacting with the model using a gui( done using qt). Now I want to send my project to my higher officials,who doesn't have a matlab installed by converting entire model into a standalone exe.
I tried generating a exe from mdl using rsim.tlc. But I’ve no idea how to make my application to receive inputs and give the corresponding output.
This is my first attempt of auto code-generation. Please advice me in this issue.
Thanks n advance…

Best Answer

The rsim.tlc target allows rapid prototyping on a machine that has MATLAB/Simulink installed. Since you need to forward your model to someone who does not have the products, you need to generate standalone C code from your model and then call into that from your GUI.
I would recommend using Embedded Coder (formerly called Real-Time Workshop Embedded Coder) to generate a shared library from your model. See Creating and Using Host-Based Shared Libraries. This will generate an interface for your model such that inputs/outputs and parameters can be passed in from an external application.