|
Instructions for
using
LabWindows/CVI
This document
describes how to use LabWindows/CVI with current
SpinCore software.
Follow the steps below to run any desired c-program for
any type of
board. In addition, changes can be made to current
programs and new
programs can also be written by including these steps.
- Create a new project in LabWindows/CVI
- Add a c-program to the project by going to
Edit->Add
Files to Project->Source(*.c)... and selecting
the desired program.
- Add the spinapi library by first right clicking on
the
"Source Files" file in the upper left panel and
clicking "Add existing
file...". Browse for the library, spinapi.lib. If
installed in the
default directory, it will be located at
"C:\SpinCore\SpinAPI\dll\spinapi.lib". Select the
file, click Add and
then click OK.
- Disable requiring function prototype option by
first
selecting "Build Options" under the "Options" menu.
Under "C Language Options" there should
be a box that says "Require function prototypes."
Make sure that box is NOT
checked.
- Replace all the system("pause") in the program
with
getchar(). LabWindows/CVI will give an error when
trying to run
system("pause") and using getchar() does the same
thing.
- Try to run the program. LabWindows/CVI will ask
for the
location of spinapi.h. Again if using the default
directory, it will be
located at "C:\SpinCore\SpinAPI\dll\spinapi.h".
Also, if using a RadioProcessor board, it will ask
for the location of the header file for
whichever program is being run. This header file is
located in the
RadioProcessor file which is located at
"C:\SpinCore\SpinAPI\RadioProcessor" if using the
default directory.
- If the error, "Illegal type for symbol 'main' " is
returned
when trying to run the program, replace the main
parameter "const char
**argv" with "char* argv[]" and it should work.
|