|
Generate C-code for embedded controllers.

Generate Matlab / Simulink S-functions.
Or generate code for Real Time Linux or your own target.

|
The Real Time Toolbox provides you with C-code generation tools
and templates for all kinds of different targets and platforms.
With 20-sim you are able to generate C-code as well as MATLAB
code for every 20-sim model that you have created, whether it
is a continuous or discrete-time model. The C-code can be created
for several targets, like MATLAB Simulink, but also for Rapid
Prototyping (RP) systems and Hardware-In-the-Loop (HIL) simulations.
Matlab Simulink
Generating C-code for use in MATLAB Simulink also includes a
submodel block with input and output terminals. 20-sim uses the
MEX-compiler, to compile this code directly into an S-function.
These S-functions can also be used in the Real Time Workshop in
order to generate code for a specific platform, for instance xPC
Target.
C-Code
20-sim can generate standalone C-code for use in C and C++ programs.
The generated C-code is supplied with several fixed step simulation
algorithms to assure that it will run in real-time. The Euler
and RungeKutta methods are supported by default.
Templates
All C-code templates are open and can be adapted by the user
to assign compilers, run ftp-sessions and automate almost everything
between the 20-sim code generation and the actual running of the
code on a (remote) machine. During C-code generation support code
is generated for 20-sim operators like matrix calculations and
trigonometric functions.
Hardware-in-the-loop and rapid prototyping
You can use the generated C-code to do HIL simulations. 20-sim
has a template that coordinates the C-code generation for the
RTLinux software of CosateQ GmbH, which is based on RTAI. This
make the template easily adaptable for other versions of RTLinux.
The communication with the encoder cards and DA-convertors is
performed by drivers from the open source Comedi library. The
scope functionality in 20-sim allows you to display encoder and
output data.
In general, generated C-code can be used for every other HIL
or RP environment. Using the 20-sim code generation template,
you can specify your code format, add your own libraries, define
your compiler settings, and describe your own interface and I/O.
|