RD Controls Software Release Note 76.2
SWIC Scanner Setup[1] (SwicSetup)
John DeVoy
May 28, 1996
[1]
SwicSetup
is an X Window application
that allows an operator to set and save the
parameters for a
SWIC scanner.
The program maintains a file containing a list
of all known SWICs.
The preferred parameters for each SWIC are stored in the file.
The user may browse the list,
optionally modifying the saved parameters for particular SWICs.
A SWIC scanner may be rebooted by sending the saved parameters down to the scanner,
or by sending a completely different set of parameters.
The program displays a single main screen,
divided into three sections:
-
The left side of the screen contains
the list of known SWICs.
Exactly one of these SWICs is selected at all times;
the parameters and readings for this SWIC are displayed in the other two
sections of the main screen.
The user may add a new SWIC to the list by typing the name into the text field
and then pressing the
``add''
button.
A SWIC may be deleted from the list by dragging it to the garbage can
button
.
-
To the right of the list,
is a panel
(the file panel)
showing the saved parameters for the selected SWIC.
The user may use the controls to modify the parameters,
and press the
``set''
button to save the changes.
Note:
Nothing is saved until the
``set''
button is pressed.
Each control has two text fields:
the one to the left or below the control indicates the current saved value.
The one that is on the control indicates any pending changes made by the user.
The
``set''
button causes the pending changes to be saved to the file.
The
``reset''
button causes all pending changes to be cleared.
-
On the right side of the screen
is a panel
(the device panel)
showing the current reading from
(the scanner associated with)
the selected SWIC.
The user may use the controls to modify the settings,
and press the
``set''
button to send the changes to the scanner.
Note:
Nothing is sent until the
``set''
button is pressed.
Like the file panel,
each control has two text fields:
one to indicate the current reading from the scanner,
and the other to indicate any pending settings.
The
``set''
button causes the pending settings to be sent to the scanner.
The
``reset''
button causes all pending changes to be cleared,
and the scanner to be re-read.
The arrow buttons,
when pressed,
either cause the current saved parameters to be sent to the scanner
(right pointing arrow),
or the current reading from the scanner to be saved to the file
(left pointing arrow).
A list of the controls on the two panels:
-
Mode:
An option menu that determines whether the scanner is to be put in store or display mode.
-
# Scans:
A slider controlling the number of scans to be taken by the scanner.
The range is from one to ten.
-
Vertical and Horizontal Gain:
Option menus that control the vertical and horizontal gains.
Possible values are the powers of two, from one to 2048.
-
Hold and Charge Time:
Option menus that control the hold and charge times.
Possible values range from 1/16 millisecond to 256/60 second.
For the hold time,
the value
``External''
is also available.
-
Polarity:
An Option menu controlling the polarity
(either positive or negative).
-
Bar-Dot Mode:
An Option menu controlling the display mode of the scanner's video output.
-
Clear and Start events:
Option menus that control the clear and start times for the scanner.
The allowable events are:
41, A2, A3, A4, 45, 46 and 33
(or T1 through T6, and T11).
-
Cable TV channel:
A text field that allows the user to specify the channel on which the scanner's
video output is displayed.
This text field does not appear on the device
(right side)
panel,
since it does not correspond to any parameter that can be sent to the scanner.
-
Display Scans:
A set of ten toggle buttons that control which scans are displayed on the scanner's video output.
If a toggle button is pressed in,
then that scan will be shown.
-
Vertical and Horizontal Markers:
A set of ten text fields
(five vertical, and five horizontal)
that determine where the markers are to go on the scanner's video output.
A range of one to forty-eight is allowed for each text field.
If a text field is blank, then no marker is shown.
-
Name:
A text field that determines the text that is to be shown on the scanner's video output.
Up to three lines with sixteen characters each may be specified.
-
High Voltage:
A text field that determines
the value that should be used to set the high voltage device associated with the SWIC.
-
Position:
An option menu that is used to control the position of a motor-driven SWIC.
The possible values are
``in'',
or
``out''.
If the SWIC is not motor-driven,
then setting the position to
``out''
will force the high voltage to be
zero
.
-
Scanner:
A text field that specifies the name that should be used for the scanner associated with the SWIC.
The default is to use the name of the SWIC with an
``S''
appended.
This text field does not appear on the device
(right side)
panel.
-
Type:
An option menu that is used to tell the program whether or not the SWIC is motor-driven.
This option menu does not appear on the device
(right side)
panel.
-
High Voltage Device:
A text field that specifies the name that should be used for the high voltage device associated with the SWIC.
The default is to use the name of the SWIC with an
``HV''
appended.
This text field does not appear on the device
(right side)
panel.
-
Or'ed SWICs...:
This button pops up a dialog box with which the user may specify the names of up to
two
other SWICs that share the same scanner.
If any one of these SWICs is set
``in''
(or a non-zero high voltage, for non-motor SWICs)
then the other SWICs are set
``out''
(or the high voltage set to zero).
This button does not appear on the device
(right side)
panel.
Starting
To run SwicSetup,
select
``SWIC Setup''
(item 149)
from the diagnostic menu,
or type
``run epicure_programs:swicsetup''
in any DECterm or DCL window.
Note that SwicSetup requires that the user have privilege to use
test-camac, and be able to make settings to the high voltage devices and
SWIC motors.
The program assumes that the logical
``RDCS$SWICSCANNER_DB''
points to a file in which the list of known SWICs
and their preferred settings is stored.
By default,
this logical is defined in the system logical table.
The user may redefine the logical
(in the process or job table)
if a different file needs to be used
(e.g., for testing).
Quitting
To exit SwicSetup,
select
``Exit''
from the
``File''
pull-down menu.
Selecting A SWIC
To select a SWIC,
select the name of the swic from list of SWICs on the left side of the main screen
(use the scroll bar, if necessary, to make it visible).
Or,
type the name of the SWIC into the text field below the list,
and press the
``add''
button.
Note: When a new SWIC is selected,
any pending changes to the previously displayed SWIC are forgotten.
When the SWIC is selected,
the saved parameters will be displayed in the left
(file)
panel,
and the data from the scanner,
high voltage device and motor
(if applicable)
will be read and displayed in the right
(device)
panel.
Adding A SWIC
To add a new SWIC to the list,
Type the name of the SWIC into the text field below the list,
and press the
``add''
button.
If the SWIC is already in the list,
then this is the same as selecting
it
(or, in other words, the program will not put a SWIC into the list more than once).
The new SWIC will be provided with a set of default
parameters
.
The file is automatically updated when the list is modified.
Deleting A SWIC
To delete a SWIC from the list,
either:
select the SWIC, and then press the garbage can button,
or
click on the name of the SWIC with the middle mouse button,
and drag it to the garbage can.
The file is automatically updated when the list is modified.
Saving Parameters to the File
To save a SWIC's parameters to the file
(or modify any existing parameters),
first select the desired SWIC.
Then use the controls in the left (file) panel
to make any desired changes.
Then press the
``set''
button to save the changes.
Alternatively:
After selecting the SWIC,
one may save
the current reading from the scanner, high voltage device and
motor (if applicable)
by pressing the left arrow button between the two panels.
It is not necessary to press the
``set''
button in this case.
Sending Parameters to a Scanner
To send a new set of parameters to a scanner, high voltage device and motor (if applicable),
first select the desired SWIC.
Then use the controls in the right (device) panel
to make any desired changes.
Then press the
``set''
button to send the new settings.
Alternatively:
After selecting the SWIC,
one may send
the current saved values
by pressing the right arrow button between the two panels.
It is not necessary to press the
``set''
button in this case.
Note that every time the
``set''
button is pressed,
even if only a few parameters have changed,
the scanner is rebooted,
and a complete set of data is sent down.
Device Names
There are three names associated with any given SWIC:
-
The base name.
This is the name that goes in the list of SWICs,
and if the SWIC is motor-driven,
will be used as as the name of the device that controls the position of the SWIC.
-
The scanner name.
This is the name of the scanner associated with the SWIC.
By default the scanner name is the base name of the SWIC, with an
``S''
appended.
The user may override this default by typing a name into the scanner text field
in the left panel of the main screen.
-
The high voltage device name.
This is the name of the high voltage device associated with the SWIC.
By default the high voltage device name is the base name of the SWIC, with an
``HV''
appended.
The user may override this default by typing a name into the high voltage device text field
in the left panel of the main screen.
Or'ed SWICs
The user may specify that a SWIC shares its scanner with up to two other SWICs
by selecting that SWIC,
and then pressing the
``Or'ed SWICs''
button
in the left panel of the main screen.
The dialog box will contain two text fields, into
which the user may type the name(s) of the other SWIC(s).
Press the
``set''
button to save the changes.
Repeat the above with each of the shared SWICs.
When a SWIC is set
``in''
(or the high voltage is set to non-zero, if it is a non-motor SWIC),
then any other SWIC(s) that share the scanner is automatically set to
``out''
(or the high voltage set to zero).
Keywords:
RDCS,
SWIC,
Beamline,
tuning,
X
Distribution: normal
Security, Privacy, Legal
rwest@fsus04.fnal.gov