Configuration#
Handel .ini files contain all the information needed to restore a system to an exact known configuration across program invocations and different host computers. A typical use case is to optimize a configuration for a particular detector type and spectrometer using XIA software such as ProSpect, and then save the system for later use in loading into your own application via Handel. See System functions for the APIs used to load and save .ini files.
Handel uses the standard .ini file format of bracketed section headings
(ex. [Section]
) followed by name-value pairs that define information for that
section. Handel extends this format by allowing multiple aliases
to be specified under a single section heading. Each alias and its
information is surrounded by the START \#n
and END \#n
keywords. A comment line is denoted by a “*” character at the start of a
line.
The allowed section headings are
“detector definitions”,
“firmware definitions” and
“module definitions”.
Additionally, there is a section heading called “default definitions” that is generated by Handel. Users who are creating an .ini file from scratch should not include the “default definitions” section. Furthermore, the default_chan{n} value, in the “module definitions” section should also be left out since Handel will generate it automatically.
Detector#
[detector definitions]
START #1
alias = detector1
number_of_channels = 1
type = reset
type_value = 10.0
channel0_gain = 6.6
channel0_polarity = +
END #1
START#2
alias = detector2
number_of_channels = 1
etc..
END #2
... START #3 etc...
Firmware#
[firmware definitions]
* This firmware definition uses an FDD
START #1
alias = firmware1
filename = saturn_std.fdd
num_keywords = 0
END #1
* This firmware definition uses PTRRs
START #2
alias = firmware2
ptrr = 0
min_peaking_time = .25
max_peaking_time = 1.25
fippi = fxpd0g.fip
dsp = saturn.hex
num_filter = 2
filter_info0 = 2
filter_info1 = 2
ptrr = 1
min_peaking_time = 1.251
max_peaking_time = 5.0
fippi = fxpd2g.fip
dsp = saturn.hex
num_filter = 2
filter_info1 = 2
filter_info1 = 2
END #2
... START #3 etc...
Module#
[module definitions]
START #1
alias = module1
module_type = saturn
number_of_channels = 1
interface = epp
epp_address = 0x378
channel0_alias = 0
channel0_detector = detector1:0
channel0_gain = 1.0
firmware_set_all = firmware1
END #1
... START #2 etc...
Linux USB2 Support#
Handel USB2 support on Linux uses libusb 0.1. You can check that the device has been
found using the lsusb
command.
user@example:~$ lsusb | grep 10e9
Bus 001 Device 003: ID 10e9:0b01 Cypress EZ-USB
Most systems restrict access to the device to the root user by default. The quickest
way to get up and running is to add your users to the plugdev
group. Be aware that
this may give them access to all USB devices. Then update your udev rules to provide
access. For example,
SUBSYSTEM=="usb",ATTRS{idVendor}=="10e9",ATTRS{idProduct}=="0b01",MODE="0660",GROUP="plugdev"
See ./redist/drivers/usb2/linux/99-xia-usb.rules
in the handel source repository
for more options.
Monitoring USB Transfers#
It may be helpful in debugging to monitor USB transfers. This is easy if your system includes usbmon and you have access to an administrator account.
mount -t debugfs none_debugs /sys/kernel/debug
modprobe usbmon
cat /sys/kernel/debug/usb/usbmon/1u | sed -n -e "s/^[a-f0-9]\+ [0-9]\+//p"
Once the cat command executes you’ll be able to see the USB communication traffic:
S Co:1:003:0 s 00 09 0001 0000 0000 0
C Co:1:003:0 0 0
Serial Port#
Handel v1.2.19 and later includes a serial port implementation built
on termios. This interface is experimental but does pass all microDXP
tests in XIA’s testing. To use it, edit the module definition in your
.ini file to set the interface to “serial”. Instead of defining
com_port as you would for the Windows serial interface, locate the
device in /dev
and put this file in the device_file setting. Here is
a full sample module definition:
[module definitions]
START #0
alias = module1
module_type = udxp
interface = serial
device_file = /dev/ttyS1
baud_rate = 230400
number_of_channels = 1
channel0_alias = 0
channel0_detector = detector1:0
firmware_set_chan0 = firmware1
default_chan0 = defaults_module1_0
END #0