A.3 Preparing for installation
After installing the required tools and libraries (see above) and extracting
the archive with the distribution of
fsc2 go into the newly created
directory `fsc2'. Now you have to set up
fsc2 for your system and
requirements. You can use two methods. You either edit the `Makefile'
directly and change the variables at its top. Alternatively, go into the
`machines' subdirectory and copy the file `template.nowhere' to a
file with the fully qualified hostname of your machine (i.e. its full name,
including the domain name - but please make also sure that your machine has a
domain name set!) as its name. Now edit this file and it will automatically
get evaluated during the make process. This is probably more convenient: when
you edit the `Makefile' you will have to do it again each time you
install a new version. In contrast the file in the `machines'
subdirectory can just be copied from an existing installation to a new version
and everything should stay the same.
Now follows a description of all the variables that can be set to change
fsc2 is created and installed (which is more or less identical
to the comments in the Makefile as well as the template for the machine
file in the 'machine' directory):
fsc2 and all auxiliary files needed will be installed below
`/usr/local/' (in `/usr/local/bin/', `/usr/local/lib/fsc2/',
`/usr/local/info/' and `/usr/local/share/doc/'). To change this
location edit the lines defining the variable
prefix in the
`Makefile' or the file you're setting up for your machine.
If you're on a rather old system that doesn't support linker version scripts
(probably on a system with a 2.0 or 2.2 kernel) you may need to define the
The next two variables,
GROUP, will be used when
setting the owner of all the files that will be installed as well as its
group. See the preceeding section for all the details and security
DEF_INCL_DIR sets a default directory for
include files (see the documentation for the
directive for details).
The next lines are for setting the GPIB library that you are going to use.
You may set the first variable,
GPIB_LIBRARY, either to
for the old Linux Lab Project library
for the updated version of the Linux Lab Project library, now hosted on SourceForge
for the newer National Instruments library (but up until know I haven't got that to work correctly),
for the old National Instruments library (you can distinguish them from the include file they install, if it's `ni488.h' then it's the newer version, if it's `ugpib.h' it's the older one)
for the library I wrote for some ISA GPIB cards
if you don't use any GPIB cards
In the last case (i.e. if
GPIB_LIBRARY is set to
fsc2 won't be able to run experiments requiring devices that are
controlled via the GPIB bus (but you still can test such
programs). Use this option only if you either want to built a test version or
if all your devices are controlled via other means (i.e via serial ports, are
PCI or ISA cards, Rulbus devices or are controlled via the LAN).
If you use the SourceForge or the Linux Lab Project driver and library you
also may have to define the name of the GPIB card as it is set in the GPIB
configuration file by defining the variable
If you use the National Instruments GPIB driver you can set the location where
fsc2 will expect the GPIB configuration file, `gpib.conf' via
GPIB_CONF_FILE (this is only needed for the National
Instruments library, in all other cases
fsc2 doesn't need to know
about this file). But usually there is no reason to change the default value,
which is `/etc/gpib.conf'.
For the new National Instruments library you can also set the variable
GPIB_CIB_FILE. If this is set the
Makefile will try to link
against this file (normally it's called
cib.o). By linking in this
file the dynamic library (libgpibapi.so) will only be loaded when the first
call is made into the library, otherwise the library gets loaded on start
of the program. To be able to link the file in the exact location of the
file is needed and must be set by the variable
fsc2 may write out information about the activity on the
GPIB bus into a log file. You can change the default log file
q`/tmp/fsc2_gpib.log' to something appropriate for your setup by setting
GPIB_LOG_FILE (if it's not set logs will be written to
GPIB_LOG_LEVEL is set to
OFF). You can also set
the verbosity of the logs by changing the variable
HIGH (logs everything including messages sent over the bus)
MEDIUM (logs function calls and errors),
LOW (the default, just
logs errors) or
OFF (no logging ta all). Please note that the file can
get rather large, so better have it on a partition where there is a lot of
free space. In order not to have it grow indefinitely each time a new
experiment is started the log file is truncated to zero length, so it contains
only information about the last experiment you run.
If the header files for the GPIB library aren't in either '/usr/include'
or '/usr/local/include' you will have to tell
fsc2 where to look for
them by setting the variable GPIB_HEADER_DIR accordingly.
With the variable
WITHOUT_SERIAL_PORTS you can set if modules
controlled via serial ports (or via USB-serial converters) are to
created. If this variable is not set (i.e. serial port suppor is
enabled) the next three variables,
SERIAL_LOG_LEVEL allow finer-grained
SERIAL_LOCK_DIR must be a string with the name of the
UUCP type lock files for the serial ports are
created (there is a convention that programs opening a serial port
create such a lock file that contains the process ID (PID) of the
program as a decimal ASCII number, so that other programs can check if
the port is already in use and by whom). According to version 2.2 of
the Filesystem Hierarchy Standard this directory should be
`/var/lock', but on old systems also `/usr/spool/locks' and
`/usr/spool/uucp' were commonly used, so this can be adjusted via
this variable. If you don't want lock files for the serial port to be
created simply don't define this variable. A possible problem arises
if you use programs creating lock files not in the HDB UUCP format
(the PID being stored in a ten byte string, left-padded with spaces
and with a trailing newline). In this case
fsc2 will not try to
remove stale lock files and instead print an error message to the
terminal that the lock file has to be removed manually.
fsc2 may write out information about the activity
on the serial ports into a log file. You can change the default log
file `/tmp/fsc2_serial.log' to something appropriate for your
setup via the variable
SERIAL_LOG_FILE (if it's not set logs
will be written to stderr unless
SERIAL_LOG_LEVEL is set to
OFF). You can set the verbosity of the logs by changing the
SERIAL_LOG_LEVEL to either
everything including messages passed between the computer and the
MEDIUM (logs function calls and errors),
(the default, just logs errors) or
OFF (no logging at all).
Please note that the file can get rather large, so better have it on a
partition with enough free space. In order not to have it grow
indefinitely each time a new experiment is started the log file is
truncated to zero length, so it contains only information about the
last experiment you run.
If there are devices controlled via LAN also a log file will get
generated for keeping track of the communications. Again, you can
change the default log file `/tmp/fsc2_lan.log' to something else
via the variable
LAN_LOG_FILE (if it's not set logs will be
written to stderr unless
LAN_LOG_LEVEL is set to
You can set the verbosity of the logs by changing the variable
LAN_LOG_LEVEL to either
HIGH (logs everything including
data exchanged over the network),
MEDIUM (logs function calls
LOW (the default, just logs errors) or
(no logging at all).
EDITOR variable you can set the editor that gets invoked
fsc2 by default when the user clicks on the
or wants to send a bug report. The user can still override this setting by
EDITOR environment variable.
By setting the variable
BROWSER you can select the default browser
to use when the
Help button gets pressed and the manual is to be shown.
Currently supported are netscape, mozilla, firefox,Opera, konqueror,
galeon, lnyx and w3m (but a user can still override this by setting an
environment variable named '
WITH_RS_SPEC10 variables are only needed when
support for the National Instruments 6601 GPCT card, the National Instruments
PCI-MIO-16E-1 card, the Meilhaus Electronic 6000 or 6100 DAC card, the Wasco
WITIO-48 DIO card or the Roper Scientific Spec-10 CCD camera are required. In
these cases the lines where these variables are defined must be uncommented
and the additional variables for the include paths and the exact locations for
the required libraries may have to be changed. Please see the comments in the
`Makefile' or the template file in the `machines' directory for
details. Please note that defining
WITH_RS_SPEC10 will lead to a few
warnings during the compilation of the corresponding module of
since the header files for the PVCAM library for the Roper Scientific Spec-10
CCD have some issues I can't do anything about.
Moreover, support for the National Instruments PCI-MIO-16E-1 and the
6601 GPCT cards, the Meilhaus ME6000 and ME6100 DAQ and the Wasco
WITIO-48 DIO card requires that the drivers and libraries for the
cards (which are part of
fsc2) are already successfully install,
otherwise the corresponding modules can't be built. For support for
the Roper Scientific CCD Spec-10 camera the PVCAM library supplied by
Roper Scientific is required and also must be installed together with
its header files before you should try to compile
WITH_HTTP_SERVER variable tells if support for the web server
should be built into
fsc2. Just comment out the line and the web server
won't be available. If the web server gets included into
fsc2 the next
DEFAULT_HTTP_PORT, determines on which port the web server
will listen for incoming connections by default (use a number above 1023,
lower numbered ports are only accessible by programs with root privileges). A
reasonable choice is 8080.
NO_MAIL can be defined if you don't wish that an email
gets send automatically to me (or someone else adjustable via the variable
MAIL_ADDRESS, so below) in case the program crashes.
fsc2 will try to send mails through the standard
mail system, i.e.
sendmail or one of the possible replacements.
If you don't have
sendmail or a replacement installed but want
to send mail anyway you can built
fsc2 to use its built-in mail
transport agent. For this define the variable
you're on a IPv6 network please also define the variable
The final variable to be set,
MAIL_ADDRESS, is the email address of the
person that will receive bug reports and notifications if
crashes. Usually, you should not change this variable except when you apply
changes to the program on your own. In this case sending these kind of mails
to me obviously doesn't make too much sense... Another obvious reason for
changing it would be that the machine isn't connected to the internet.
|• Device setup|
A.3.1 Device setup
For each device there exists a configuration file in the `config' subdirectory. In some cases you don't have to change anything there, but e.g. for devices controlled via a serial port by may have to set the number of the port in the device's configuration file and for devices controlled via the LAN its IP number. There are also a number of modules with support for several models of a certain device and in this case typically the models type must be set correctly. Please take the time and have a look at the configuration files for all devices you're planning to use, the adjustable parameters should be documented clearly in the individual files.
This document was generated by Jens Thoms Toerring on October, 4 2009 using texi2html 1.78.