12.07.2015 Views

Developement Of An Instrument Landing Simulation ... - Cal Poly

Developement Of An Instrument Landing Simulation ... - Cal Poly

Developement Of An Instrument Landing Simulation ... - Cal Poly

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5. Create the .dll. dll's stand for dynamic linked libraries. You'll find them everywhere on any computer.Basically, a .dll links code to other files. For our case we need to link the simulink diagram to the sourcecode. Here's how to create a dll.5a. Open Matlab. Go to directory in Step 1. NOTE: Model and source code do not have to be in the samedirectory, but for this case it's better to have them in the same directory. Type "pwd" at the commandprompt to make sure the path is set to your working directory.5b. At the command prompt type: mex -setup. This will bring up the DOS window.5c. Select Watcom C/C++ compiler, version 10.6, location c:/watcom, [y] or return.5d. Type "cmex" and the name of the C-source file that you wish to create the dll from. Make sure that thedirectory shown at the command prompt is where the source code file is located. Then type exit to close theDOS window.ie. D:\Projects\Test> cmex timestwo.c6. Now you've linked the simulink block diagram to the source file and your ready to run the simulation.Source Code:timestwo.c C file written in S-Function format that multiplies the input by 2. (Pretty hefty file for a simplefunction)xtwo.mdl Simulink block diagram that graphically displays the user's input and the produced output.57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!