RD Controls Software Release Note 112.7
Beam Line Plot
RD Controls Software Release Note 112.7
Beam Line Plot
John DeVoy
Jume 27, 1996
Beam Line Plot
is an X Window application
that displays plots of up to four devices at rates of up to 30 Hz.
The data may be displayed in any of three modes:
- Scroll Mode:
-
In which the devices are plotted against time.
A scroll bar may be used to pan back and forth over the time interval plotted.
The X axis is marked in seconds.
- Cyclic Mode:
-
In which the devices are plotted against the cycle time.
The X axis is marked with both seconds
(since the last reset,)
and
with the phase clock events.
- Scatter Mode:
-
In which the devices are plotted against another device.
The user may choose the device to plot against.
The X axis is marked with the engineering units of the selected device.
Main Screen
The main screen is divided into three areas:
the plot area shows the plot of the data, and the scaling;
the legend area identifes the devices being plotted, and the data rate;
and the control area contains the start and stop controls.
Plot Area
The major feature of the plot area is the graph that contains the actual plot.
To the left of the plot is the scale for the Y axis.
If the devices being plotted are using different scales,
then the labels on the scale will be multi-line;
the first line applies to the first device being plotted,
the second line to the second device, etc.
If the devices are using the same scale,
then the labels will be single line,
with that value applying to each device.
The units are the engineering units of the devices.
Below the plot is the X axis scale.
This is calibrated in seconds
(for scroll and cyclic modes,)
or in engineering units for the X axis device
(scatter mode.)
Above the plot is a scale showing the phase clock events
(cyclic mode only,)
and a label identifying the mode.
Legend Area
The legend area is divided into two parts:
one for the Y axis,
and
one for the X axis.
The Y axis part identifies the devices that are being plotted,
and the symbols used to plot them.
The symbols are drawn to the left of the device names.
If the symbol is just a colored rectangle, then the
device will be plotted with single points of that color.
If the symbol contains an icon,
then that icon
will be used to draw each point.
If the name of a device is grayed out,
then that device is disabled,
and will not be plotted.
The X axis part identifies the device being plotted against
(scatter mode,)
or the word
``seconds.''
Below that,
the data rate in milliseconds is printed.
Control Area
The control area contains the buttons used to start and
stop data acquisition.
Between the buttons is an accelerator icon.
When the start button is pressed,
this icon indicates activity.
Below
the buttons
are labels indicating the start and stop times of the current plot.
Starting
To run
Beam Line Plot,
select
``Beam Line Plot''
(item 9)
from the menu,
select
``EPCR Beam Line Plot''
from the Epicure pull-down menu in the session manager,
or type
``run epicure_programs:beamlineplot''
in any DECterm or DCL window.
Quitting
To exit
Beam Line Plot,
select
``Exit''
from the
``File''
pull-down menu.
Starting a Plot
To start a plot,
press the
``Start''
button on the main screen.
The accelerator icon will start to move,
the start time will be printed below the start button,
and data should appear in the plot area.
If any device returns an error status,
a warning dialog box will pop up to display the error text;
if all of the devices return errors,
then the plot will automatically be stopped.
If the
``Start''
button is disabled,
then
either no devices have been specified or enabled,
or a plot is already in progress.
See section 7,
``Selecting Devices''
for how to
select or enable devices.
Stopping a plot
To stop a plot,
press the
``Stop''
button on the main screen.
If no plot is in progress,
then the
``Stop''
button is disabled.
Missing Data
Fast data acquisition and plotting stresses both the data acquisition system, and
the X Window system.
Normally, Beam Line PLot is able to draw points as fast as the data arrives.
However:
If Beam Line Plot is iconified,
and then restored
(or de-iconified)
then points may be dropped while the program is redrawing itself.
Similarly, if
the window is resized,
moved to the top of the window stack,
or the data is rescaled.
Basically, anything that causes a redraw may cause data to be dropped.
The problem can be made less severe by doing any (or all) of the following:
- Specify that each plot be done using a single point icon
(see section 13, ``Setting the Plot Colors/Icons'').
This improves the drawing efficiency by 10 - 100 times.
Once the plot is stopped, you may select any icon you like.
- Once a plot has started, do not do anything that will cause a redraw
(such as resizing, iconifying, popping up dialog boxes, etc.)
- Use a faster workstation
(e.g., BOFUR, BALIN, or BOMBUR, as opposed to an EWS node).
- Plot at a slower rate.
Selecting Devices
To select the devices to be plotted,
and various parameters related to them,
select
``Y-Axis''
from the
``Parameters''
pull-down menu.
This will cause the
Y-Axis
dialog box to pop up.
The
Y-Axis
dialog box allows you to set the following parameters for
each device:
- Name:
-
The Epicure device name of the device to be plotted.
- Y Max and Min:
-
The maximum and minimum values to be plotted.
This will determine the scaling,
as well as the values used for the Y-Axis labels.
Note that if all the devices being plotted have the same Y max and min values,
then the Y-Axis labels will be single line.
Otherwise, each label will contain a separate line for each device.
- Format:
-
The format with which to print the Y-Axis labels.
You may choose decimal or scientific notation,
with either 3 or 4 digits after the decimal.
- Color
-
Pressing the color button will cause a color mix dialog box to pop up.
You may use the color dialog to select the color to use for this device.
- Point Style:
-
The icon to use when drawing each point of the plot of this device.
Use the left mouse button to pop up an option menu;
the first column selects an icon consisting of a single
point;
the remaining columns are used to select icons of various shapes and sizes.
- Enable:
-
A toggle button.
If set,
then this device will be plotted.
If not set,
then this device will be ignored,
and the name of the device will be grayed out on the main screen.
Each of the above parameters can be set
independently for each device.
To specify the X-Axis device to be used in scatter mode,
See section 8,
``Selecting the Mode''.
Selecting the Mode
To set the mode
of the
display,
and various parameters associated with it,
select
``X-Axis''
from the
``Parameters''
pull-down menu.
This will cause the
X-Axis
dialog box to pop up.
There are three modes available:
Scroll,
Cyclic,
and
Scatter.
To select a mode,
press the corresponding enable button.
Enabling one mode automatically disables the others;
only one mode may be selected at a time.
Scroll Mode
In scroll mode,
the data is plotted continuously.
As the right side of the plot is reached,
the plot automatically scrolls,
keeping the new data in view.
A scroll bar is provided to allow you to
pan over the entire data set.
The scroll bar is disabled in cyclic and scatter modes.
The lower edge of the plot is labelled with the elapsed time since the plot started,
or with the absolute time.
The following parameters may be set for scroll mode:
- Width:
-
The width of the plot in seconds.
This determines the scale for the X-Axis.
- Format:
-
The format with which to print the X-Axis labels.
You may choose either absolute or relative mode.
In absolute mode, the X-Axis is labelled with the time of day.
The first label includes the date, as well.
In relative mode,
the format is HH:MM:SS;
you may choose to have zero, 1, 2, or 3 digits after the decimal in the seconds field.
- Rate:
-
The rate at which the data should be collected,
in milliseconds.
The minimum value is 1000.
Cyclic Mode
In cyclic mode,
the
the lower edge of the plot
is labelled with the seconds since the last T1,
while upper edge is labelled with the T-Times.
The following parameters may be set for cyclic mode:
- Start and Stop:
-
The interval in the cycle in which data is to be collected.
This will also set the scale for the X-Axis.
The values should be typed in as T-Times
(e.g., ``T3'', ``T5+5000'', etc.)
The offset is in milliseconds.
- Format:
-
The format with which to print the X-Axis labels.
You may choose to have
zero, 1, 2, or 3 digits after the decimal.
- Rate:
-
The rate at which the data should be collected,
in milliseconds.
The minimum value is 33.
- Number of Cycles:
-
The number of cycles after which the plot is erased
or stopped.
A value of one means that the plot
is erased or stopped
at every T1.
A value of two means that the plot
is affected
every second T1,
i.e.,
that the plot is drawn for two cycles before being erased
or stopped.
The maximum value is 10.
If the
``After N Cycles''
parameter is set to
``Keep Going''
(see below,)
then this parameter is ignored.
- After N Cycles:
-
This parameter controls what the program does when
the cycle limit specified above is reached.
There are three possibilities:
- Erase and Continue:
-
The plot is erased,
the start time stamp is updated,
and the plotting continues.
- Stop:
-
The plot is stopped.
The data remains visible on the screen.
- Keep Going:
-
The plot continues without stopping,
or erasing.
This means that the
``number of cycles''
parameter is effectively ignored.
Scatter Mode
In scatter mode,
The Y-Axis devices are plotted against another device
(the X-Axis device),
instead of time.
The X-Axis is labelled with the engineering units of the X-Axis device.
The following parameters may be set for scatter mode:
- Device Name:
-
The Epicure device name of the X-Axis device.
- X Max and Min:
-
The maximum and minimum values for the X-Axis device.
This will determine the scaling,
as well as the values used for the X-Axis labels.
- Format:
-
The format with which to print the X-Axis labels.
You may choose decimal or scientific notation,
with zero, 3 or 4 digits after the decimal.
- Start and Stop:
-
The interval in the cycle in which data is to be collected.
The values should be typed in as T-Times
(e.g., ``T3'', ``T5+5000'', etc.)
The offset is in milliseconds.
- Rate:
-
The rate at which the data should be collected,
in milliseconds.
The minimum value is 33.
Saving To a File
To save your parameters to a file,
select
``Save As''
from the
``File''
pull-down menu.
A file selection box
will pop up,
with which you may select or type a filename.
The parameters will be saved to this file.
By default,
the file will be located in the directory pointed to by the logical
``BEAMLINEPLOT$FILES'',
and will have the extension
``.BLP$DAT''.
As a shortcut,
selecting
``Save''
from the
``File''
pull-down menu will cause the parameters to be saved
using the file specified in the last
``Save As''
or
``Open''.
Loading From a File
To load a set of parameters that were previously saved to a file,
select
``Open''
from the
``File''
pull-down menu.
A file selection box will pop up,
with which you may select the name of a parameter file.
By default,
the file selection box will list the files with the extension
``.BLP$DAT''
that are in the directory pointed to by the logical
``BEAMLINEPLOT$FILES''[afootnote].
When the program starts,
it will automatically open the file pointed to by the logical
``BEAMLINEPLOT$DEFAULT'',
if that logical is defined,
otherwise
the first file with the extension
``.BLP$DAT''
will be used.
Setting the DA Rate
To set data acquisition rate,
select
``X-Axis''
from the
``Parameters''
pull-down menu.
This will cause the
X-Axis
dialog box to pop up.
Then type the desired rate in the text field labelled
``Rate''
belonging to the appropriate mode.
The rate may be set independently for each mode.
The minimum value for the rate is 33 ms for cyclic and scatter modes,
and 1000 ms for scroll mode.
Setting the Start/Stop Times
To set start and stop times in cyclic and scatter modes
select
``X-Axis''
from the
``Parameters''
pull-down menu.
This will cause the
X-Axis
dialog box to pop up.
Then type the desired start and stop times into the text fields labelled
``Start''
and
``Stop''
belonging to the appropriate mode.
The values should be typed in as T-Times
(e.g., ``T3'', ``T5+5000'', etc.)
The offset is in milliseconds.
For each cycle,
data acquisition will start and stop at the specified times.
The times may be set independently for each mode.
Setting the Plot Colors/Icons
To set the color and icon with which each device is plotted,
select
``Y-Axis''
from the
``Parameters''
pull-down menu.
This will cause the
Y-Axis
dialog box to pop up.
To set the color,
press the button labelled
``Color...''for the desired device.
A color mix dialog will pop up,
with which you may select the color.
This button is disabled if the display device has 16 or fewer colors or shades of gray.
To set the icon,
pop up the option menu labelled
``Point Style''.
The first column of the menu will select an icon consisting of a single point.
All of the items in the first column are equivalent.
The remaining columns are used to select icons of various shapes and sizes.
The color and icon can be set independently for each device.
Setting the Background Color
To set the background color of the plot,
select
``Background Color...''from the
``Options''
pull-down menu.
A color mix dialog will pop up,
with which you may select the color.
This button is disabled if the display device has 16 or fewer colors or shades of gray.
Printing the screen
At any time,
the user may send a screen dump to a PostScript printer.
To specify a print queue,
pop up the
Printers dialog box by selecting
``Select Printer''
from the
``Options''
pull-down menu.
The dialog box presents a suggested list of printers.
The user may select one of the suggested queues,
or may type the name of a new one.
The name of the queue will be remembered;
it is not necessary to re-specify the queue each time.
To send a screen dump to the queue specified above,
press the print button on the main screen.
Be sure the main screen is uncovered before pressing the button.
Showing the Status
To see the VMS status returned by each device,
select
``Show Status...''
from the
``Options''
pull-down menu.
A dialog box will pop-up that shows the status of each device that is being plotted.
This dialog box pops up automatically if any device returns an error.
Press the
``OK''
button to pop down the dialog box.
If no plot is being displayed,
then the
``Show Status...''
button will be disabled.
Keywords:
RDCS,
FTP,
Plot,
Beamline,
X
Distribution: normal
Security, Privacy, Legal
rwest@fsus04.fnal.gov