12.07.2015 Views

Using the AMESim MATLAB/Simulink Interface - NUPET

Using the AMESim MATLAB/Simulink Interface - NUPET

Using the AMESim MATLAB/Simulink Interface - NUPET

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Using</strong> <strong>the</strong> <strong>AMESim</strong> <strong>MATLAB</strong>/<strong>Simulink</strong> <strong>Interface</strong><strong>Using</strong> Windows:echo %<strong>MATLAB</strong>%This should result in something like:C:\<strong>MATLAB</strong>6p5being printed on screen. If <strong>the</strong> environment variable is not set, %<strong>MATLAB</strong>% is printed andyou need to set <strong>the</strong> <strong>MATLAB</strong> environment variable to point to <strong>the</strong> <strong>MATLAB</strong> installationdirectory. This can be done from <strong>the</strong> Windows Control Panel.Ano<strong>the</strong>r important point is that your path must contain <strong>the</strong> directory:%windir%\System32where %windir% is <strong>the</strong> Windows installation directory (a typical value for %windir%is C:\WINNT). You can check <strong>the</strong> content of your path by typing <strong>the</strong> command belowand you can change it from <strong>the</strong> Windows Control Panel:echo %Path%2.4. Configuration filesThis section is intended to advanced users only. It can be skipped at a first reading.The configuration files for <strong>the</strong> <strong>AMESim</strong>/<strong>Simulink</strong> interface supplied with a standard<strong>AMESim</strong> installation assumes that all functions are written in C and that no extra librarieswith user written functions are needed. If you write your submodels in Fortran or you usenon-standard libraries in your model, some changes to <strong>the</strong> standard distribution files areneeded. These changes can as all <strong>AMESim</strong> configurations be performed in two ways:globally for all users, or locally for <strong>the</strong> current directory (for a particular project).The files that can be customized are simulink.conf and simulink.make. They normally existin <strong>the</strong> $AME/lib or (%AME%/lib) directory. For global customization, <strong>the</strong>y should beedited <strong>the</strong>re. Your system administrator should normally handle this. For localconfiguration, copy <strong>the</strong>se files to your project directory and make <strong>the</strong> necessary changes to<strong>the</strong>se files. <strong>AMESim</strong> looks in <strong>the</strong> current directory before looking in <strong>the</strong> standard area($AME/lib or %AME%/lib), any changes made to <strong>the</strong> local files will <strong>the</strong>refore override <strong>the</strong>global configuration. The file simulink.conf contains instructions on which files are to beused to create <strong>the</strong> S-Function for <strong>Simulink</strong>. This means that if you decide to make any localconfigurations this file must be edited, o<strong>the</strong>rwise <strong>the</strong> global configuration will be used. Thestandard simulink.conf is shown in <strong>the</strong> following frame.4

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

Saved successfully!

Ooh no, something went wrong!