Booster 465 Wave form Generator Save/Compare/Restore Application

Alex M.Waller

Accelerator Division Controls Department

Fermilab
MS 347
P.O. Box 500
Batavia IL. 60510

May 18, 1993

Introduction

As the title implies, this application is meant to save, restore, compare and display the values of the 465 wave form generators as they are used in Booster. Also a ramp editor is provided with this application. There is a "group" ramp functionality which "hides" the individual ramp cards involved for quadrupole and skew ramps. Ramp files are organized by Booster turns and include the quadrupole, skew and sextupole ramps.

The layout of the application page was designed so that there would not be excessive clutter on the page. The use of menus and dialog boxes reuses console screen real estate. Much more information can be detailed than would ordinarily with single dedicated fields on the console screen. Displaying only information pertaining to the current path of control and accepting only control associated with the action at hand focuses and guides the user along. The main menu bar across the top of the page is all that is needed to drive the whole application and direct the user onward. In particular, the second and third menu items specifically apply to this application program.

The application was written in C and uses, where applicable, the newest CLIB procedures. These new procedures ease the job of writing a console application program by taking care of many of the mundane tasks the application programmer once had to worry about.

Using these new CLIB procedures as a base, some higher level functionality was added in two areas by this author. These are the drop-down hierarchical menus and the file dialog boxes that are being used in this application. The author wishes to thank Brian Hendricks for making modifications and additions to some of their new CLIB procedures to accommodate this authors higher level procedures. After further testing within this application the author will release these procedures, and several more, as library routines which other applications can use.

The menu items

There are three menu items:

  1. The normal program tools menu. Here it is called console tools (the author believes this is a more appropriate title since much of the functionality has to do with console operations not program operations). The basic functionality is the same as program tools. This menu item has been put into the drop-down hierarchical menu motif. This makes this menu item consistent with the rest of the application program.

  2. The actual ramp file dialog menu. The selection is by any given number of Booster turns. The quadrupole, skew and sextupole ramps are used for the LIST, SAVE, EDIT, COMPARE and RESTORE operations.

  3. The ramp edit menu. This menu allows one to edit the wave form of a quadrupole, skew or sextupole ramp for any given number of turns in Booster. One can load the edited ramp immediately after editing if one wishes. The results of the edit is always stored in an application "paste" buffer. The contents of this "paste" buffer is available to be copied to any file in any of the "turns" directories through the EDIT button described below.

General drop-down hierarchical menu functionality

The drop-down hierarchical menu was designed so that a single interrupt will drop down the menu and leave it dropped until an item is either selected by interrupting on it or an interrupt outside of the menu box occurs. Items on the menu followed by the characters "..." means that there is an associated dialog box that will request more information and possibly alter the flow of program control. Interrupting on such items will display the dialog box. Items on the menu followed by the characters ">>>" indicate there are more sub-menus to expand. Just moving the cursor into the ">>>" field will drop down another menu. This makes hierarchical menu navigation easy. Items on the menu followed by the characters "[ ]" or "[X]" indicates an item selection. Interrupting on such item changes the selection condition. If initially "[ ]" when interrupted on, the item will display "[X]" indicating that it has been selected or set TRUE. When initially "[X]" when interrupted on, the item will display "[ ]" indicating that it has been deselected or set FALSE. For items on the menu with no characters following them, the action indicated by the menu item is executed immediately upon interrupting on the item.

General file dialog box functionality

View menu
This button allows the user to tailor the way the file list is viewed.

By file number
This is the default and it will list the files by file number from 1 to 30.

By date
This option will list the files by order of date. The corresponding file numbers will appear in the first column but will not necessarily be in ascending or descending order.

Order
Indicates the order one wishes to display the files. If Ascending and view by file number is selected, the files will be listed in ascending order of file number. If date view is selected, the files will be displayed in ascending order of creation date. The Descending option will display file numbers or dates in a descending order. The default is Ascending order.

Date
Allows the user to tailor how the date is displayed along with the file titles.

Short
displays the date in the format MM/DD/YY HHMM.
Normal
displays the date in DEC format DD-MMM-YYYY HH:MM. This is the default.
Long
displays the date and day of the week in a format WWW MMM DD YYYY HH:MM.

Close Button
This button closes the dialog box allowing the user to make another menu selection.

List Button
This button will plot the set of ramps for the current selected number of turns in an overview plot. If a file is selected before this button is interrupted on, the information in the saved file is plotted instead.

Save Button
This button will store ramp readings. The ramps for the current selected number of turns are always saved. If the user does not initially select a file to save the current ramp information in, a dialog prompt will be displayed. The user will be asked if they really do want to save into a file before the actual save operation will take place. The user will then be prompted with another dialog box in order to enter some text describing the contents of the saved file. The date will automatically be inserted into the file information. The first ramp in the "group" is used to save ramp information.

Edit Button
This button will allow the edit operations of copying to, pasting from, and viewing the contents of an application "paste" buffer. One can put any file or the current ramp readings into the application "paste" buffer. The contents of the "paste" buffer can be copied to any file in any of the "turns" directories. Also the current contents of the "paste" buffer can be viewed at any time.

Compare Button
This button will compare either current readings or a selected file with another selected file. The first entry for a compare operation may be the current set of ramps for the selected number of turns. Because of the flow of the succeeding dialog boxes and file selection on a compare operation, only the first entry may be the current ramp readings. If one does not initially select a file before interrupting on the compare button, a dialog box will ask one if they wish to compare with current readings. Once the current readings or a file has been selected, another dialog will prompt one to select a second file to compare with.

Restore Button
This button will initiate the restore of a set of ramps for the selected number of turns. A file to restore from must be selected. If one interrupts on this button without first selecting a file, a dialog box will prompt one to select a file. Ramp information is sent to all four ramps in the "group" for quadrupoles and skews.

Overview Plot Display

Up to 6 ramp wave forms may be displayed by the overview plot. The wave form plots are automatically scaled to minimum and maximum ramp wave form values for each ramp. The name of the ramp and whether the plot is from a file or current readings are displayed in a status box. One can move the hair-line cursor across the individual ramp wave forms to get an idea of the ramp output value at any given time. Also the minimum and maximum ramp values are displayed as one moves from plot to plot. If one double-clicks in the middle of any one of the wave form plots displayed, an expanded view of the individual wave form will be plotted.

Expanded Plot Display

The individual wave form will be rescaled automatically to its minimum and maximum values. The plot will have both axes labeled and the table of slots, times and values will be displayed below the plot. Because of the nature of the graphics plot windows, there is no hair-line cursor available for plot display as there is in the overview plot.

Ramp Editor

The author of this application did not write the code for the ramp editor. This code is available as a library procedure. Consequently the author can not give a detailed account of the editor's functionality.

Some of the features that should be noted are:

Edit Curve
This function allows the creation of a new ramp curve or the editing of an existing one.

Plot Curve
This function allows the re-plotting of a new ramp curve, the original (before editing), or both curves (in order to see changes made during editing).

Single Point Operations
These functions allow for the insertion, deletion, and moving of a single point on the ramp curve.

Insert
Select "insert a point"
Click in plot at point one wishes to insert a point
Click for as many desired points
Deselect "insert a point"
The load ramp dialog will appear

Delete
Select "delete a point"
Click on the point one wishes to delete
Click for as many desired points
Deselect "delete a point"
The load ramp dialog will appear

Move
Select "move a point"
Click on the point one wishes to move
Drag point to desired value
Click point again to stop dragging
Repeat above three steps for as many desired points
Deselect "move a point"
The load ramp dialog will appear

Multiple Point Operations
These functions allow for the dragging of (moving of) multiple points, shifting of multiple points, and the deletion of multiple points.

Drag
Select "drag points"
Click on the start point one wishes to drag
Drag points for desired number of points
When finished click again
The load ramp dialog will appear

Shift
Select "shift points"
Click near the start point one wishes to shift
Drag a box around the group of points one wishes to shift
Click again
Shift the points to the desired location
When finished click again
The load ramp dialog will appear

Delete
Select "delete points"
Click near the start point one wishes to delete
Drag a box around the group of points one wishes to delete
When finished click again
The load ramp dialog will appear

Exit
This will return the edited ramp points to the main application program.

Quit
This will abort the editor and just return the unmodified points to the main application program.

Security, Privacy, Legal