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

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

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

<strong>Using</strong> <strong>the</strong> <strong>AMESim</strong> <strong>MATLAB</strong>/<strong>Simulink</strong> <strong>Interface</strong>are possible using lines 1 and 3 in simulink.make.<strong>Using</strong> Unix:If your model includes Fortran code simulink.make probably needs to be altered byadding a 3 rd line specifying <strong>the</strong> additional libraries needed. An example on such a line is:-L/opt/SUNWspro/SC3.0.1/lib -lF77 -lsunmathThis is highly system dependent and you probably need to ask your system administratorfor <strong>the</strong> libraries used on your computer. If many users are using Fortran it is probably agood idea to let your system administrator change <strong>the</strong> simulink.make in <strong>the</strong> standard area($AME/lib/simulink.make).Ano<strong>the</strong>r reason to add a 3 rd line is if your submodels use user written utilities or o<strong>the</strong>rnon-standard files or libraries; this would typically be a change that you would dolocally. For instance, if you would like to include a library called libmyfuncs.a which isstored in /home/my_name/library add <strong>the</strong> following line:-L/home/my_name/library –lmyfuncsIf <strong>the</strong>re already is a 3 rd line in simulink.make, for instance for using Fortran, add yourfiles at <strong>the</strong> beginning of <strong>the</strong> line as in:-L/home/my_name/library -lmyfuncs -L/opt/SUNWspro/SC3.0.1/lib-lF77 -lsunmath<strong>Using</strong> Windows:A reason to add a 3 rd line is if your submodels use user written utilities or o<strong>the</strong>r nonstandardfiles or libraries; this would typically be a change that you would do locally.For instance, if you would like to include a library called myfuncs.lib which is stored inC:\home\my_name\library add <strong>the</strong> following line:or-link -libpath:C:\home\my_name\library myfuncs.libC:\home\my_name\library\myfuncs.libEach <strong>AMESim</strong> model ‘remembers’ which simulink.conf was specified when it wascreated. This means that for any new simulation, <strong>the</strong> corresponding simulink.make will beused. Hence, it is necessary to rebuild <strong>the</strong> special icon created for <strong>the</strong> <strong>AMESim</strong>/<strong>Simulink</strong>interface, if you wish your model to use a different simulink.make.6

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

Saved successfully!

Ooh no, something went wrong!