About NSLDownloadsDocumentationN e w sModelsContact Info

 



The Neural Simulation Language, Version 3.0.1

C++ Version

MS Windows

 

Download the NSL C++ System Files ( Nsl3.0.zip , Nsl3.0.proj.zip ,Model3.0.zip )

You wil also neead Tcl/Tk Ver. 8.342 (can download at www.scriptics.com )


Installation

  • Install Tcl/Tk (I.E. ActiveTcl8.3.4.2-1-win32-ix86 ) following the corresponding instructions, remember to restart your computer.

  • Make a directory for each of the three zip files, all at the same level, e.g.
    C:\Nsl3.0, C:\Nsl3.0.proj, C:\Model3.0, respectively.

  • Unzip each of the three files into the respective directory.



  • Double click on the nsl.dsp (or nsl.dsw) MS V isual C++ project file in the

  • Nsl3.0.proj directory to initialize the environment.

  • In the "Project" menu select "Add to Project" to add the desired model file.

  • In the "Tools" menu select "Options"; in the popup window select the "Directories" tab;

  • select "Include Files". You must enter the following entries:

    • c:\nsl3.0\nsl\input\incl
    • c:\nsl3.0\nsl\kernel\incl
    • c:\nsl3.0\asl\rts\incl
    • c:\nsl3.0\pc
    • c:\nsl3.0\xnsl\xkernel\incl
    • c:\nsl3.0\xnsl\xkernel\incl\xlib_xlib_incl
    • c:\nsl3.0\xnsl\xkernel\incl\xlib_tcltk_incl
    • c:\nsl3.0\main\incl
    • c:\tcl\include\ (or the \include dir from the tcl installation directory)


  • Then select "Library Files" and specify the Tcl/Tk "lib" directory.


  • Now Rebuild All the project.

  • In the ProjectSettings , on the Link tab add the libraries tcl83.lib and tk83.lib


  • In the menu ProjectSettings, C/C++ tab, add the following on the Preprocessor Definitions textbox: NSL_PC, NSL_TK, NSL_INPUT_FG, NSL_WIN, ASL_FG.


  • Some functions are not fully operational and must be commented (with a // on the line or /* */ ) on the scripts

    • Nsl_tcltkAppInit.c comment #include "redibujo.h" (line 40)
    • Xnsl_Tcltk_Canvas.c comment #include "redibujo.h" (line 18), the methods Refrescar (line 62) and RedibujoProc (line 67)
    • Xnsl_Tcltk_graph.c comment #include "redibujo.h" (line 18)

  • Add to the windows path the route: c:\tcl\Bin (Control panel-> systemProperties->Advanced->EnviromentVariables… -> path->edit)


  • In the "Build" menu select "Build Nsl.exe"

  • The system and model file should compile without errors (do not pay attention to warnings).

Simulation

  • Select from the "Build" menu the "! Execute Nsl.exe" option.

  • A Tcl/Tk window will pop up. You are now ready to load NSL script files.

  • Once the NSL Executive Window has appeared you must load the NSL file you want to execute.


  • First you must get to the directory where the model (the .nsl file) is located, you can do this by using the command cd .. (there must be a space between cd and the ..) and cd dirname (like in MS-DOS),you can also use the command dir to see the files or folders in your current position.


  • Go to the dir model3.0( where are the basic book models) , get to the dir in which the model is, and type: source modelname.nsl, where model name is the name of the model which you are trying to load.


  • In this example , a max selector UI will appear on the screen.


  • Then, to simulate the model on the NSL Executive type: nsl run


  • On the maxselector UI will be shown the results: