Secondary Beam Line Control System: Available Programs
In List 1 follows an enumeration and short descriptions of the programs (Optima et al. for
Windows) available on all 7 area PCs. They are all programmed in C++ using the WIN32-API
and an own static class library [MyWPP.Lib, subset of Blaise Computing's WIN++ for MS
Windows 3.1 (1991) ported to WIN32]. In order to add some additionally needed
functionality to the WIN32-API, a few DLLs (Direct Link Libraries) have been created
(see List 2). All presented programs and libraries run currently under
Windows XP Professional.
Optima Program (OptaIP32.Exe). This program allows the user to bring up an
arbitrary experimental rate provided by the user to a maximum by changing the
settings of magnetic elements, slits and/or other elements of a secondary beam line according to a script file given to the program as input. When
running, some output is displayed in three different windows of which one is graphical with
auto scaling capabilities (see Fig.2, 30 kB).
The input script file can be created or modified either with a simple text
editor or with a special GUI editor (see Fig.3, 21 kB).
Combi Control Program (CoCoIP32.Exe). This program is specially designed for
collecting more information about the current status of power supplies controlled via
ROAD-C combi devices (DAC, ADC, remote switch and some diagnostics are in the same plug-in
unit). Besides switching on and off the main power for the devices one has also the
possibility to set a value, to increment or decrement it or to inspect each meaningful bit of
the status word of a selected power supply. All devices of a secondary beam line having a combi are
listed in a so called combo-box and may be selected by double-clicking at the desired name
(see Fig.4, 20 kB).
Magnet Cycling Program (MaCyIP32.Exe). Up to 20 magnets may be
simultaneously passed through a programmable magnetic field cycling process.
The input for the program is a selectable script file, which contains 1 line
for each of the chosen magnets. Each input line may contain a series of up to
10 pairs of time and DAC-setting-values placed behind the name of the respective
device. Once started, the progress of the cycling process - displayed as current
settings and trend plots - is shown in 2 windows (a text and a graphic one).
A typical output for a single magnet cycling process is shown in
Fig.10 (17 kB).
Interactive CAMAC Command Program (ICCTCP32.Exe). This program represents a
debugging tool for CAMAC experts. It allows to perform interactively all possible Camac
commands (single or in a loop). The most general commands like Dataway Z, C, I etc. may
be done directly by clicking at a reserved button
(see Fig.5, 22 kB). A list of up to 10 commands may be typed in, stored or loaded from disk file. When
executed, besides the data input/output also Q and X are displayed for each Camac transfer.
The data representation may be chosen to be binary, octal, decimal or hexa-decimal.
All commands are recorded and may be reviewed on demand via a special window. An
initialization of the Kinetics KS-3989 Camac Serial Crate Controller may also
be performed (with some diagnostic output).
2-Dim Scan Program (2DScIP32.Exe). This program is capable of
measuring and displaying experimental rates as a function of 2 varied device
settings. During the data taking scans the rate profiles for each setting of the
second device are plotted in a graphic window (similar to Optima). At the end,
the result may be viewed via a contour, lego or surface plot. The input of the
program is given via a script file which looks similar to one for the program
Optima with only 2 devices to optimize. A picture of a test run is shown in
Fig.11, (34 kB).
Serial Port I/O-Handler (RS23232.Exe). This program runs only on the server PC
and is called by CAMAC32.DLL in order to execute the requested serial I/Os for the Kinetics
3989 RS-232 Crate Controller (see Fig.8, 14 kB).
When RS23232.Exe is started it shows up in the task bar as a red icon
(see Fig.9, 9 kB) which has an extended
system menu for requesting some extra information. No special driver is required to
perform a RS232-I/O, because the serial port is supported by all Windows APIs. With a
baud rate of 19200, up to 50 Camac cycles per second can be executed, which is sufficient
for all available programs.
Test Program for Camac Server (Client32.Exe). This program which runs in a DOS
box allows the user to test all features of the Camac Server interactively.
To learn more about the commands
this program understands see Table 1 in the Client/Server dialog
section. If a command is typed in, which the server does not understand, then the typed
in command is just prompted.
Watchdog (Watchdog.exe).Also this program runs only on the server PC
and is started automatically at boot time (short cut in the startup folder).
List 2:
Camac Library (Camac32.Dll). This library is used by
Server32.Exe and contains all routines for performing the Camac-I/Os of the above
described programs. When initialized, it reads in the database
(DEVICE.LIS) in order to learn about the addresses, mode bits etc. of all devices.
A new initialization (over the network) is triggered each time when the
Set Point Program is exited and restarted. This is important to
know when changing the DEVICE.LIS on the server in order to make the newly
typed in data effective.
If a reservation unit (REMOD) is present in the crate and included in the DEVICE.LIS,
then an arbitration between the different programs and a second computer connected via
a second crate controller is performed.
User Drawn Button Library (Usrbtn32.Dll). This library contains some bitmaps and
routines for drawing buttons and patterns to give the dialog boxes of all above described
programs the look similar to programs built with the old 16bit Borland bwcc-library
independent of the brand name of the newly used 32bit C/C++ compiler.
Analog Meter (Anamtr32.Dll). The source code of this DLL has been extracted
form "Windows Programmierbuch" (Sybex 1992) by Marcellus Bucheit and ported to the WIN32
API. This DLL is used by the application program Proton Accelerator Status
to display the different beam currents with the help of an analog meter.
Colored Button (Colrbt32.Dll). This DLL is needed for producing buttons with
arbitrarily colored faces, shades, highlights and fonts. It's utilized with the
Setpoint Program for enhancing in different blues the device
which has the input focus and to show in red the name of the currently loaded disk file.