Main Content

Rapid-Prototyping Deployment

Build, validate, refine, and test generated executables

Choose from several deployment approaches based on application requirements, prototyping or production environment, and your current phase of the development process. If want to run fast, standalone simulations, such as batch or Monte Carlo simulations on your development computer, build an executable with the rapid simulation (RSim) target. Another method of accelerating simulations is to generate an S-function block for use in another model. In addition to improving simulation speed, this approach reuses code and protects intellectual property.

With an external mode simulation, you create a communication channel between your development computer and a target processor that runs the executable file created by the code generation and build process. Through the communication channel, you can modify parameter values for the target program, and monitor and store signal data from the target program.

If real-time response is critical, build and deploy an executable program. Build the program from a component that controls a system or from a model that represents a system being controlled. In the component case, you build, deploy, and tune code as it runs on a real-time simulator or microprocessor. For a test environment, you build and download an executable program to a model to a hardware-in-the-loop (HIL) simulation platform. After setting up the environment, run the executable program to validate the system or control unit in real time.


expand all

target.APIDescribe API details
target.APIImplementationDescribe API implementation details
target.BoardProvide hardware board details
target.BuildDependenciesDescribe C and C++ build dependencies to associate with target hardware
target.CommandCapture system command for execution on MATLAB computer
target.CommunicationInterfaceDescribe data I/O details for target hardware
target.CommunicationProtocolStackDescribe communication protocol parameters
target.LanguageImplementationProvide C and C++ compiler implementation details
target.ObjectBase class for target types
target.ProcessorProvide target processor information
target.CommunicationChannelDescribe communication channel properties
target.RS232ChannelDescribe serial communication channel
target.TCPChannelDescribe TCP communication properties
target.ExternalModeRepresent external mode protocol stack
target.ExternalModeConnectivityBase class for external mode connectivity options
target.XCPDescribe XCP protocol stack for target hardware
target.XCPExternalModeConnectivityRepresent connectivity options in external mode protocol stack
target.XCPPlatformAbstractionSpecify XCP platform abstraction layer for target hardware
target.XCPSerialTransportRepresent XCP serial transport protocol layer
target.XCPTCPIPTransportRepresent XCP TCP/IP transport protocol layer
target.XCPTransportBase class for XCP transport protocol layer


expand all

rsimgetrtpGlobal model parameter structure
rsimsetrtpparamSet parameters of rtP model parameter structure
extmodeBackgroundRunPerform external mode background activity
extmodeEventExternal mode event trigger
extmodeGetFinalSimulationTimeGet final simulation time for external mode platform abstraction layer
extmodeInitInitialize external mode target connectivity
extmodeParseArgsExtract values of configuration parameters supported by external mode abstraction layer
extmodeResetReset external mode target connectivity
extmodeSetFinalSimulationTimeSet final simulation time in external mode platform abstraction layer
extmodeSimulationCompleteCheck that external mode simulation is complete
extmodeStopRequestedCheck whether request to stop external mode simulation is received from model
extmodeWaitForHostRequestWait for request from development computer to start or stop external mode simulation
rtiostreamtestTest custom rtiostream interface implementation


targetManage target hardware and build tool information


Run on Custom HardwareRun external mode simulations


Generated S-FunctionRepresent model or subsystem as generated S-function code


Rapid Prototyping Considerations

Rapid Simulation

Reusable Component Deployment

External Mode Simulation

HIL Simulation