EPICURE Design Note 78.0 <P> <b> Database-o-matic</b>

EPICURE Design Note 78.0

Database-o-matic

JACK C. SCHMIDT

.5cm The Epicure database editor allows the system user to manipulate and display information stored in the Central Database. The following is a first attempt at describing the methods and appearance of the database editor and is based on the `EPICURE Database Editor Functionality' written by T. Lahey and T. Fink, August 25, 1988.

The Main Screen

The database editor will allow examination of and changes to templates and devices found in the Central Database. Examination of database information will be available to all EPICURE users but modification of devices and templates will require special authorization. Upon selecting the Database-o-matic from the operator menu, a `choices' screen is displayed and the user chooses what he wishes to do by item selection and dialog box response. Diagrams 1 through 7 show the database editor initial screen and dialog boxes. The user selects what function the editor is to perform by arrowing to the proper field (the field will be displayed with inverse video) and entering a carriage return. All dialog boxes pertaining to devices or templates provide for a partial name and star option. If the user responds with a partial name, a choice box is displayed with a list of devices or templates with that prefix. The `*' response will display a choice box with a list of all devices or templates. The user will be able to select as many devices or templates as he wishes from the choice box. A list is created from the choices and after each interaction the next device or template on the list is displayed.

list [Examine Template] This option allows the user to examine a template a screen at a time. Selecting this field will prompt the user for the template name. The response is verified. Once verified the user moves on to template level 1.

[Create Template] This option provides a user with the ability to create a new template from skeleton information provided by the editor. Selecting this field will prompt the user for the name of the template he wishes to create.

[Modify Template] This field will allow a user to modify elements of a template, whether it is to add a new field, change an existing field or to delete an existing field. Selecting this field will prompt the user for the name of the template he wishes to modify. After a template response is made the template existence is verified.

[Rename Template] Selecting this field will prompt the user for the name of the template he wishes to rename. After a template response is made the template existence is verified. This will be useful for replacing upgrades of old modules.

[Delete Template] Selecting this field will prompt the user for the name of the template he wishes to delete. After a template response is made the template existence is verified and the user is informed of the number of devices associated with that template. The requestors is then asked to verify his request.

[Examine Device] Allows the user to examine attributes of a requested device one screen at a time. Selecting this field will prompt the user for the device name. The response is verified. Once verified the user moves on to Level 1.

[Create Device] This field allows the user to create a device and to add it to the Central Database. Selecting this field will display a menu with the device class choices- NORMAL , SYNTHETIC , SOFTDEVICE, NONDEVICE , and COMPOUND . After a device class is selected, the user is prompted for the device name. The user is then prompted to see if the device is unique or to be modeled after a template or another device. Level 1 is then displayed with the appropriate information.

[Modify Device] Selecting this field will prompt the user for the device name. The response is verified. Once verified, the user moves on to level 1.

[Rename Device] Selecting this field will prompt the user for the device name. The response is verified. Once verified, the user is prompted for the new device name. This response is also verified. Once verified the old device information is associated with the new name and any traces of the old device name are removed from the Central Database.

[Delete Device] Selecting this field will prompt for device name and then verify that the user wants to really delete this device.

[Print] This will prompt the user for a template or device name. The user will then be asked if he wants a summary or complete information. The user will then be prompted on the printer queue to be used.

[Exit ] Selecting this field will exit the database editor. The user will then be prompted as to whether he wants to save the changes made during the editing session. The F10 key will also exit the editor.

General Information

Level one of the database editor provides the user with basic information to create and modify devices or templates. Since the number of database fields far exceeds the availability of space on a single screen an attempt was made to group database information in levels of complexity. Database information will be gathered on a level by level basis (even for device/template examination). When a level is selected, fields will contain information derived from a specified device or template. Though the screens will be structured differently for each level, certain characteristics will be built in that are global to all database levels.

a level is displayed, fields that should be changed will be highlighted. The highlighted fields will help remind the user which fields commonly need to be changed for device or template modification.

fields will not allow text entry.

the user changes field information, the new information is displayed in bold video and the old field information is displayed above or to the right of the new information in normal video.

information will be available for fields, menu items and screens.

fields may be changed by menu or by keyboard input.

jumping will be implemented to allow ease of input.

and paste will be implemented.

Level 1

Diagrams 10 - 14 show level 1 of the database editor. They are based on device modification and not template modification. Which screen is displayed is dependent on the users choice of device type. Though the level one screens are different, they all allow information to be input from the keyboard or from menu choices.

The Normal Device Screen

Normal devices (dia. 10) represent the largest number of devices in the Central Database. A normal device is a standard device that usually represents some type of hardware. The information fields for this screen are:

list [Device Name] This field contains the name of the device the user entered in the device name prompt when entering the editor. The user may exercise a new device without returning to the main menu by simply entering a new name.

[Text] Lets the user assign informational text about the device not gleaned from other fields.

[Branch] The CAMAC branch to use. Possible choices are `E', `M', `N', and `P' (Camac, Meson, Neutrino, Proton).

[Source] The data source class. Possible choices are `E0', `M0', `N0', `P0', `C0', `C1', `C2', `C3', and `C4'.

[Save_Restore] This field can be used to designate whether device properties can be restored. Requires a `YES' or `NO' response.

[Template Type] Field that displays which template the device originated from. Some possible choices are `116A', `150C',and `159P'.

[Module Type] The hardware module type. Some possible choices are `007', `200' and `1111'.

[Module Location] The name of the service building or enclosure where the module is located.

[Beamline(s)] The beamline(s) the device is associated with. Beamline names are represented by two character strings. Possible choices are `ME', `NW' and `PB'.

[Crate] The crate number where the module is located. Vaild choices are 0 - 255.

[Slot] The slot number in the crate where the module is located. Possible numbers range from 1 to 29.

[Channel] The channel number of the module used.

The menubar choices for the Normal Device screen allow the user to easily change information in the fields. The menubar items preform the following functions:

list

[Branch] Lists the possible CAMAC branch choices.

[Source] Lists the possible data source classes.

[Tmp_Type] Lists the template types defined in the database.

[Mod_Type] Lists the module types defined in the database.

[M_Loc] Will either list all service buildings or create a popup menu with the area names. Once the user selects an area name the service building list for that area will appear.

[Bmline] Lists beamline names available. Once again, a popup menu with the areas may appear. Once the user selects an area name the service building list for that area will appear.

[Sublevels] Lists the Level 2 screens available to the user for device examination and manipulation. The Level 2 screens are Data Rates, Graphics, History, List, Offets, Protection, Scaling and Status. These screens are callable from each other.

[Up] Goes up one level of database screens. This menu item is common to all database editor screens.

[Print] Prompts the user for the queuename of the output device. A copy of the screen is then routed to that output device. This menu item is common to all database editor screens.

[Exit] Prompts the user to save changes made then exits the database editor. This menu item is common to all database editor screens.

The Synthetic Device Screen

Synthetic devices (dia. 11) represent a device which is synthesized by the data acquistion from one or more other devices by a preset algorithm. The Synthetic Device screen has yet to be designed.

The Softdevice Screen

A softdevice is a device synthesized by front-end software. The softdevice screen has yet to be defined.

The Nondevice Screen

Nondevices (dia. 13) are just a name and text. This was provided for application programs. This will allow graphics application programmers to display all devices in a system such as manual valves. The information fields for this screen are:

list

[Device Name] This field contains the name of the device the user entered in response to the device name prompt at the main editor menu.

[Text] Allows the user to better describe the nondevice.

The menubar choices for the Nondevice screen are the standard defaults provided.

The Compound Device Screen

Compound devices (dia 14) provide a means to maintain a list of related devices. The information fields for this screen are: list [Device Name] This field contains the name of the device the user entered in the device name prompt when entering the editor.

[#] The Central Database allows a compound device to maintain a list of up to ten devices.

[Device Name] The name of the device that the user wants to associate with the compound device.

[Device Index] The index number assigned the device by the Central Database. This number will be provided by the editor after the device name is input.

The menubar choices for the Compound Device screen consists of the predefined defaults.

Level 2

Diagrams 20, through 24 show the different level 2 screens. At this time there is no screen defined for device history. These screens were designed to allow the user to easily explore specific attributes and properties of the device or template. Level 2 windows can be called from each other or from level 1.

Data Rate

The Data Rate screen ( dia. 20) displays information about data update rates from the front end and for plot. The data field rates can be entered as a frequency (F2000), phase reversal (T5+1000) or a TeV clock cycle (Xff+1000). The menubar consists of the default menu choices. The information fields for the Data Rate screen are:

list [Default] The Default field is the rate at which the front end updates data for that device.

[Start Plot] Defines when the device will start plotting.

[Stop Plot] Defines when the device will stop plotting.

[Plot Ftd] Sets the rate at which the plot is updated.

[Max Plot Size] Allows the user to set the size of the plot.

Graphics

This screen (diagram 21) contains information that will be used by graphics applications. The surveying fields will contain information from the surveying computer system. This information will not be available on first release. The information fields of this screen are

list [Device Type] Text string that identifies the device. Possible device types are `Bending Magnet', `Focusing Magnet', and `Air Swic'.

[Device Type Modifier] A string or number that further identifies the device. [X Position] The X plane of the device in the beamline.

[Y Position] The Y plane of the device in the beamline.

[Z Position] The Z plane of the device in the beamline.

[Length] The length of the device in the beamline.

[Pitch] The pitch of the device in the beamline.

[Yaw] The yaw of the device in the beamline.

[Roll] The roll of the device in the beamline.

The menubar choices for the Graphics information screen allow the user to easily change information in the fields. The menubar items preform the following functions:

list [Dev_Type] Lists all device type choices.

[Dev_Mod] Lists all modifiers for device types.

[Up] Goes up one level of database screens. This menu item is common to all database editor screens.

[Print] Prompts the user for the queuename of the output device. A copy of the screen is then routed to that output device. This menu item is common to all database editor screens.

[Exit] Prompts the user to save changes made then exits the database editor.

List

The List screen (dia 23) is identical to the Compound Device screen with the exception that the List screen does not display the name of the device being edited. For an indepth discussion of the List screen refer to section 3.5 of this document.

Offsets & Lengths

The offset screen ( dia. 24) contains data information taken from the template design notes. The information fields are:

list [Set Offset] This field refers to the offset to set data in the DAP. It only pertains to control and setting properties.

[Array Offset] Refers to the first element of the array that should be addressed.

[Data Length] Indicates the size of one datum.

[Max Length] The Max Length field indicates the maximum size of all data available.

The menubar choices for the Offsets & Lengths screen are the pre-discussed defaults.

Protection

The Protection screen (dia. 25) allows the user to define read/write protection for device properties. The screen design was based on the Protection Editor application and will share the same files mentioned in Design Note x.0. The information fields are:

list [Domain] Protection bit codes representing a beamline or combination of beamlines. Some possible choices are `M0', `PW', and `NE'.

[Class] Protection bit codes representing the general device type or combination of type. Some possible choices are `PRMPS', `CRYVAC', and `E605'.

The `Add' menubar item is unique to the Protection screen. It is a scaled down version of a liked-name menubar item in the Protection Editor. The `Add' item displays a pulldown menu with the following choices:

list [Domains] List domain codes. One or more may be selected.

[Combination Domains] List group domain codes. One or more may be selected.

[Classes] List class codes. One or more may be selected.

[Combination Classes] List group class codes. One or more may be selected.

Scaling

The scaling window (Dia 26) refers to analog device scaling. The upper half of the window displays basic scaling information. The lower half of the screen relates information about scaling tables and scaling constants. There is a possibility of four different windows- scaling constants for reading and setting properties, scaling tables for reading and setting properties, scaling constants for reading property and a scaling table for the setting property, or lastly, scaling constants for the setting property and a scaling table for the reading property. This example shows the window for a device with scaling constants for the Read property and a scaling table for the Set property.

list [P Units] Four character text string that will determine what units the device is scaled in for intermediate units. Some common choices are `vlts' and `cnts'. [P Index] Number of the raw to intermediate scaling formula to use as defined in EPICURE design note 38.1. Changing this field will also update the associated formula field.

[P Eqn] Textual display of the scaling formula. This field can only be set by selecting an item from the menubar choice `R2Ieqn'.

[C Units] Four character text string that will determine what units the device is scaled in for engineering units. Some common choices are `amps' and `torr'. [C Index] Number of the intermmediate to engineering scaling formula to use as defined in EPICURE design note 38.1. Changing this field will also update the associated formula field.

[C Eqn] Textual display of the scaling formula. This field can only be set by selecting an item from the menubar choice `I2Eeqn'.

[Scaling Constants] These fields allow the user to adjust the analog readout of a device.

The menubar choices for the Analog Scaling window will differ depending on whether the device uses scaling constants and/or scaling tables. The following is a list of all possible menubar items. list [R2Ieqn] Lists the indices and formulae for raw to intermediate data conversion. Selection of an item will change the `P Eqn:' field as well as the `P Index' field.

[I2Eeqn] Lists the indices and formulae for intermediate to engineering data conversion. Selection of an item will change the `C Eqn:' field as well as the `C Index' field.

[Read Table] Selects the Read Scaling Table screen. For more information about set scaling tables, see Level 3 information.

[Set Table] Selects the Set Scaling Table screen. For more information about set scaling tables, see Level 3 information.

The menubar also contains the default menu choices- `Sublevels', `Up', `Print', and `Exit'.

Status

The status window (dia. 27) contains generic and control status information.

The generic status section allows the user to input the proper bitmask, text and to set the invert flag. The generic status information fields are:

list [BitMask] The bitmask that identifies the generic status bit with the template bit. This information is provided in the template design notes.

[Low(0)] Three character text string that describes the text that will be used if the bit is zero. The defaults are `OFF', `TRP', `LCL', `NEG' and `DC'.

[High(1)] Three character text string that describes the text that will be used if the bit is one. The defaults are `ON', `RDY', `REM', `POS' and `RMP'.

[Invert] When set, inverts the High and Low information for the designated generic status bit.

The Control status area of the screen allows the user to input the bit values for device control. The fields are self-explanatory.

The menubar items for the Status screen allow the user to select other subwindows available as well as providing the default menu choices. The choices specific to the Status screen are:

list

[Bitnames] When selected will display a popup menu with two choices `Status' and `Control'. A selection from this menu will display the proper Level 3 screen for status bitname definition.

[Tans] The Level 3 Tan screen will be accessed. This option will only be available if a cryogenic device or template has been accessed.

The menubar choices for the Analog Scaling window will differ depending on whether the device uses scaling constants and/or scaling tables. The following is a list of all possible menubar items.

list

[R2Ieqn] Lists the indices and formulae for raw to intermediate data conversion. Selection of an item will change the `P Eqn:' field as well as the `P Index' field. [I2Eeqn] Lists the indices and formulae for intermediate to engineering data conversion. Selection of an item will change the `C Eqn:' field as well as the `C Index' field.

[Read Table] Selects the Read Scaling Table screen. For more information about scaling tables, see Level 3 information.

[Set Table] Selects the Set Scaling Table screen. For more information about scaling tables, see Level 3 information.

The menubar also contains the default menu choices- `Sublevels', `Up', `Print', and `Exit'.

Level 3

Diagrams 36, 37a, and 37b show the different level 3 screens. At this time there is no screen defined for Tans. These screens are subsets of level 2 screens. Level 3 windows cannot call each other with the exception of the scaling tables.

Scaling Tables

Diagram 36 displays the screen for the set property scaling table. The read property scaling table screen will look identical to the set table. At this time the Central Database supports 29 table constant pairs. Each pair consists of a Primary and Common scaling constant. If a device contains a table, all 29 pairs will be displayed regardless of whether they have been defined.

Status Bitnames

The status bitname screen (dia 37a) allows the user to change the text for the bit numbers. If the number of status bits exceeds the number visible in the bitname window the user can scroll the bitnames to access the ones he is interested in. The information fields for this screen are:

list [Bit #] Bit number the user wants to assign. A template may consist of numerous bits but a device associated with that template may only use a select few. This option allows the user to define only the bits he wants to.

[Longname] 32 character string to describe the bit. Examples of this field include `Unconditional Access' and `Total System Flow'.

[Shortname] 7 character string used to describe the bit. Possible examples are `UAccess' and `Tsysflw'.

[SetText] 7 character string that will appear when the bit is set. Used to describe the state of the bit. An example of this is `Enabled' and `Okay'.

[ClrText] 7 character string that will appear when the bit is cleared. Used to describe the state of the bit. An example of this is `Disable' and `Alarm'.

[SC] 2 character string sets color attribute of the set text string.

[CC] 2 character string sets color attribute of the clear text string.

The menubar choices of the Status Bitnames screen contain the defaults `Up', `Print', `Exit' and the unique item `Color'. The `Color' choice displays a list of colors available and their two character abbreviation.

Control Bitnames

The control bitname screen (dia 37b) allows the user to change the text and the value for the control bits. If the number of control bits exceeds the number visible in the bitname window the user can scroll the bitnames to access the ones he is interested in. The fields are:

list [Bit #] Bit number the user wants to assign. A template may consist of numerous bits but a device associated with that template may only use a select few. This option allows the user to define only the bits he wants to.

[Shortname] 7 character string used to describe the bit. Possible examples are `Reset' and `Enable'.

Security, Privacy, Legal

rwest@fsus04.fnal.gov