Main Content

Rapid-Prototyping and Production 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 program 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. If code reuse or intellectual property protection is a primary goal, build a shared library (.dll, .so, or .dylib) to deploy.

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 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.

You also have the option of building an executable program that you can download to target hardware for real-time rapid prototyping or production. The executable program can be a standalone program that you integrate with an external real-time executive or operating system. Standalone executable programs require minimal updates to adapt to target hardware.

Functions

expand all

buildStandaloneCoderAssumptionsCreate application to check code generator assumptions
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

Apps

Run on Custom HardwareRun external mode simulations

Topics

Rapid Prototyping Considerations

Choose an External Code Integration Workflow

For application integration points, characterize external code, identify code generation integration requirements, and choose a workflow.

Check Code Generation Assumptions

Use standalone workflow to check code generator assumptions.

Deploy Algorithm Model for Real-Time Rapid Prototyping

Deploy algorithm model for testing in real time.

Package Generated Code as Shared Libraries

Generate a shared library version of model code for your development platform.

Untrusted Custom Code, Custom Targets, and Callbacks

Use of untrusted custom code entails risk.

Rapid Simulation

Accelerate, Refine, and Test Hybrid Dynamic System on Host Computer by Using RSim System Target File

Accelerate simulation of a model in nonreal-time on your development computer.

Reusable Component Deployment

Accelerate Simulation, Reuse Code, or Protect Intellectual Property by Using S-Function Target

Generate a shared library from a model or subsystem that you can load dynamically into another application.

Interface to a Development Computer Simulator By Using a Shared Library

Generate a shared library that you can load dynamically into another application.

Generate S-Function from Subsystem

Apply Generate S-Function operation to create an S-Function from a subsystem block.

External Mode Simulation

External Mode Simulations for Parameter Tuning and Signal Monitoring

Tune parameters and monitor signals through communication channel between development computer and target hardware.

External Mode Simulation by Using XCP Communication

Run external mode simulations that use an XCP communication channel.

Graphical Controls for XCP External Mode Simulations

Hardware tab and External Mode Control Panel controls for XCP external mode simulations.

Customize XCP Slave Software

Customize XCP slave software for target hardware.

External Mode Simulation with TCP/IP or Serial Communication

Run external mode simulations that use a TCP/IP or serial communication channel.

Create a Transport Layer for TCP/IP or Serial External Mode Communication

Create custom low-level communications layer to support an external mode connection to your custom target.

Hardware-In-the-Loop (HIL) Simulation

Deploy Environment Model for Real-Time Hardware-In-the-Loop (HIL) Simulation

Deploy environment model for testing in real time.

Production Deployment

Generate Main Program for Deployment to Bare Board Target

Configure model for producing an example main program.

Deploy Generated Standalone Executable Programs To Target Hardware

Generate standalone executable programs that do not require an external real-time executive or operating system.

Deploy Generated Component Software to Application Target Platforms

Run an executable program with a target support package for Linux®, Microsoft® Windows®, or Wind River® VxWorks® operating systems.

Featured Examples