VisSim/C-Code
Introduction
VisSim/C-Code lets you automatically generate ANSI C code from a VisSim diagram.
The C-Code generator add-on is the heart of VisSim/Embedded Controls Developer. With VisSim/C-Code you can generate code for either the host PC or an embedded target.
Compiled code can increase the speed of simulations by a factor of 10. Code can be targeted to run on a PC or an embedded system. The PC target supports creation of a standalone executable, a DLL to run as block in VisSim, or a "simObject".
A simObject allows you to embed one or more VisSim simulations in your C/C++ application. You control a simObject via the simObject API. A simObject can be instantiated multiple times, allowing multiple copies of a simulation to be run simultaneously. A simObject takes user input, runs to a user specified time, and provides sim output. simObjects can be reset to run again, and will return error strings for the application to use.
Tim Wright of Electronic Concepts and Engineering sees VisSim/C-Code and VisSim/RT as invaluable tools for developing a missile propulsion system. "We used VisSim and VisSim/RT to create a turbo-jet engine simulator, then interface it with the control hardware," explains Wright. "On the controller side, we used VisSim/C-Code to translate the control law into a self-running executable that can be downloaded to a ruggedized PC104-based system."