DABBEL

Editing the ACNET Device Database

10 Nov 2020:  The DELSETREC command will also remove any entries for the device and property which
              may exist in the download_devices table.
09 Sep 2020:  Add support for both reading and basic status properties in the EXPR command.
31 Aug 2020:  The DELSETREC command is now supported which provides the only method to
              delete a setting record for the setting and basic control properties.
26 Aug 2020:  The DWNLDLOC (download location) command supports the ability to disable downloading
              of setting and basic control properties.
17 Jun 2020:  Add support for optional basic status scaling attribute mapping from Digital Control attributes.
16 Mar 2020:  DWNLDLOC (download location) command supports setting and basic control properties
              in addition to alarm block properties.
26 Feb 2020:  Add support for DWNLDLOC (download location) command
22 Oct 2019:  The FNAME (Full Name) command now fully supports the control system type
19 Sep 2019:  Allow the user to enter initial setting property data as double-precision floats
29 Jul 2019:  The frequency time descriptor in the various PRO commands may contain
              a data event string like "p,1000,true" (in addition to FTD and Tnn forms).
	      In a device listing, the data event string format will be used.
21 Jun 2019:  Add support for the CHGNOD command
05 Mar 2019:  Remove support for FTD display/interpretation of "event1" and "event2" fields in alarm blocks 
17 Jan 2019:  Remove restriction on order numbers being strictly increasing for PRBSSC and PRDCTL
07 Nov 2018:  Add support for component type identifier (COMPONENT).
23 Oct 2018:  Add support for quick-listing capability. Add "LIST" command as equivalent to "LIS".
29 Aug 2018:  Modify support for Selective Listing such that the listing can be restricted for the Reading and Setting properties with regard to the PDB commands.
16 Aug 2018:  Provide documentation for the DABOUT area
15 Aug 2018:  Retire support for Basic Status PDBs
25 Jul 2018:  Retire support for Basic Control PDBs
23 Jul 2018:  Retire support for PDX command (hex PDB)
07 Mar 2018:  Allow the user to re-direct listing output to stdout
09 Jan 2018:  Allow the user to issue multiple successive commands in Dialog mode
26 Jul 2017:  Add support for SCALEN (scaling length) command
15 Jun 2017:  Permit certain privileged users to Modify an obsolete device
18 May 2017:  Add support for COMPUTE option for minimum/maximum extrema in  Reading/Setting PDBs
12 May 2017:  Add support for DREAD (destructive read) command
02 May 2017:  Add support for RSTEXTRMA command, which recomputes reading/setting scaling extrema (limits)
18 Apr 2017:  Add support for KNOB (setting knobable) command
20 Feb 2017:  Add support for Basic Status Scaling property PRBSSC
10 Jan 2017:  Disable the wildcard listing capability
03 Jan 2017:  Allow device names up to 14 characters long (except for IRM devices)
18 Apr 2016:  Add support for SWAP command which will swap two device names
23 Nov 2015:  Add support for symbolic representation of device addressing modes in EPR command
17 Nov 2015:  Add support for listing/modification of minimum/maximum limits in  Reading/Setting PDBs
17 Sep 2015:  Add support for machine identifier (MACHINE).
12 Aug 2015:  Add support for enumerated value (ENUM) shared sets.
16 Sep 2014:  Add support for COMMENT command which will write an edit-comment
              to the table accdb.dbo.device_edit_comment
08 Aug 2014:  DABBEL can now be called directly from a program (see UL_DABBEL)
18 Mar 2014:  Add support for DOC and UDC commands (documentation devices)
28 Oct 2013:  BP (bypass bit) field always ignored for analog/digital
              alarm block PRO commands
26 Aug 2013:  Deleting Basic Control also deletes Digital Control property
24 Jul 2013:  Add support for CMAINT command
27 Jun 2013:  Display line number in error messages
05 Jun 2013:  Family devices must have a source node of 'LOCAL' or '0'
              or an empty field.  In listings, '0' will be used.
18 Mar 2013:  Allow a PDB to be deleted with any PDB/PDBFE/PDX command
              containing a single zero parameter; disallow a zero
	      attribute definition flag word for basic status.
13 Mar 2013:  Support common unit limits in analog alarm block (PRANAB).
              LIS command displays in common units, while LSX command
	      displays in raw units.
28 Jan 2013:  Add support for property location (LOC command)
12 Dec 2012:  Add support for symbolic representation of basic status
              PDB alternate color/character masks
06 Aug 2012:  FDESC (Full Description) is a synonym for LDESC
25 Jul 2012:  FNAME (Full Name) is a synonym for LNAME (Long Name)
09 May 2012:  BACKUP optional qualifier added to LIS(LSX) command
22 Feb 2012:  Add support for alarm groups (ALMGRP command)
29 Nov 2011:  Add support for front-end scaling (PDBFE command)
23 Aug 2011:  Allow a zero value for Controlled-By device
18 Jul 2011:  Add support for AAMASK command, which adds/modifies the new
              alarm acknowledge mask.
28 Jun 2011:  Add support for symbolic representation of console protection
              masks.  Allow URLs to be attached to digital alarm text records.
08 Mar 2011:  ENUM short-name must not contain embedded spaces.
24 Feb 2011:  Support new-style property names (PRxxxx), while old-style
              names (e.g. READNG, BASTAT) will continue to be recognized.
15 Feb 2011:  Require FAMILY devices to have only a LOCAL source node
12 Jan 2011:  Add Console protection mask command (PMASK)

DABBEL (Database Batch Editing Language) is the facility for modifying the central ACNET device database. This document is the reference guide for using DABBEL. It contains three main parts: an overview, a description of the editing language, and a guide to the shell command used to invoke the DABBEL facility.

OVERVIEW ON USING DABBEL

DABBEL processes files containing an editing language. The user creates and/or modifies DABBEL input files in his (or her) own Linux disk directory. The DABBEL command is then issued at shell-level to process the input file in one of several modes. As an alternative, the user may also invoke Dabbel from a program using the "dabbel" function in UL_DABBEL.

The most usual method of editing or adding devices is to first list (using the LIS command described below) the devices to be edited, or in the case of adding, list a device like the ones being added. The file resulting from the listing is modified with the new information. Any parameter in any command statement may be modified. Property commands may be added or deleted.

Device names may not include any of the following special characters:

[ ] ( ) { } < > ` ' ^ ? @ # $ ~ = . , ! | & \ * " / + - (hyphen) %

The first character of the device name must be an alphabetic character representing one of the accelerator sub-systems, as described in Section I (Device Name Command Line) below.

Except as noted below, the ':' and ';' characters may only appear in the second character position of the device name. Multiple colons are permitted, however, in long (full) device names, starting in position 2. In addition, the last character must be alphanumeric. Finally, long device names are not up-cased, except in the first, prefix position.

The wildcard listing facility has been disabled due to the fact that underscore characters are now permitted in all device names. If there is a need for this capability, it could be reenabled with the use of an alternate listing command (perhaps WLIS), but we would need to deal with the underscore characters somehow. Contact Brian Hendricks if this is a feature that you need.

There are several methods for retrieving Data Base Information:

1) The LIS(T) command will produce a listing of devices in the form of a DABBEL input text file. This may then be either used as reference, or else modified and then resubmitted to DABBEL for processing. The listing is always written to a disk file having the same name as the input file, but with the file-type "LIS". The Linux system grep function may be used on the listing files to look for a particular piece of information.

2) D80. Control console page D80 will dump the contents of a device entry. It contains display of all of its attribute, including audit information on the editing of the device, scaling transforms, SaveRestore codes...etc..

THE DABBEL LANGUAGE

DABBEL is a device oriented language for editing the data base. By creating a text file of command lines, a user may add, delete, modify and list device entries. The DABBEL processor parses the text file, performs various types of error checking, and calls subroutines to access the data base.

Part 1 of the following section is a table of DABBEL commands and the data base fields which are the arguments to the commands. The table is organized by Command Line type and includes the field name, its acceptable value(s), whether or not it is required in the line, and comments. Part 2 is a summary of the above commands. Part 3 is a sample DABBEL text file. A brief description of the language follows.

A DABBEL text file consists of one or more device batches, each starting with a Device Name command line. The Device Name command line consists of a 3-character command verb plus device name, and, for some commands, parameters. Following ADD or MOD, there may be one or more Subsidiary command lines, such as the Sub-System Device Number line, Property line or PDB line. The order of these subsidiary lines is arbitrary as long as they refer to the same device batch. The device batch is terminated when a new Device Name command line or End-Of-File is encountered.

Input lines must be terminated with a new-line character. Any line containing more than 128 printable characters will cause DABBEL to abort with an overflow error. A mechanism to continue long text strings on succeeding lines is described below.

Command line parameters are enclosed in parentheses and are separated by commas. Optional parameters may be omitted by either terminating the line with a closing parenthesis, or by using a comma without the parameter. Leading and trailing white-space around parameters is permitted. Command lines may be continued on succeeding lines.

Long text fields may be continued on succeeding lines by inserting a backslash character at the very end of any line which is incomplete.

There is an alternate mode for entering sub-system device numbers, event message codes and sub-system device records, which is Hex input, entered word by word, or byte by byte, separated by slashes. This is the only method available for entering SSDN's and Event Message Codes (EMX).

Any line beginning with an exclamation point (!) is considered a comment line. The exclamation point can also be used anywhere in the command line (except inside quoted text) to start an end-of-line comment.

DABBEL commands may be entered in either upper or lower case. Quoted text strings may be delimited either by a pair of double-quotes, or by a pair of apostrophes. Apostrophes may be included within those text strings which are delimited by double-quotes. The converse is not true -- double-quotes can never be included inside a text string. Alpha characters inside quoted text strings are never up-cased.

DABBEL processes the input file in a single pass. Each device batch (see definition above) is processed as a unit. If an error occurs within a batch, none of the modifications within that batch will be performed.

As an option, DABBEL can be run in Syntax-Checking-Only mode, where there is no connection to the central database. Many (but not all) errors can be identified using this mode of operation, which runs very fast. Certain error conditions, however, require connection to the database in order to be detected. For example, a device given as a sibling in a MOD statement must exist in the database, but this cannot be verified in Syntax-Checking-Only mode. If any error is detected while running in normal mode, DABBEL will immediately disconnect from the central database and enter Syntax-Checking-Only mode. If logical name DABBEL_EXIT_ON_ERROR is defined in the shell, Dabbel will exit on any error which would cause it to switch to Syntax-Checking-Only mode.

Error messages appear on the terminal and in a listing file generated during the run. The listing file has the same name as the input file, but with the file-type "LIS". Syntax, data field, I/O and miscellaneous errors (such as adding a new device with a name that already exists, or modifying an undefined device) will be displayed. A line number from the input file will be displayed in all error messages, after "DABBEL:". The line number will be enclosed in parentheses. For syntax errors, the line number will point to the exact line containing the error. For other errors, the line number will point to the first line of the device batch.

Console Protection Mask Representation

In general, the console protection mask may either be specified as a hexadecimal integer, or as a symbolic text string. It is generally better to use the hex form for the console protection mask, as most classes are set. With the alarm acknowledge mask, however, the symbolic form is preferred. The symbolic form is structured as follows: "class1+class2+...+classn".

Save/Restore of Database using DABBEL:

DABBEL input lines for those device batches which modify the central database wlll be written to a file and saved permanently. Files from the time of the last Data Base Save can be used to reconstruct the state of the Data Base to its present condition in the event of corruption.

PART 1

TABLE OF COMMANDS AND DATA BASE FIELDS FOR DABBEL

Field              Value                Req?          Comments                              

I. Device Name Command Line (A command line containing a device name. At least one must appear before any other commands for a given device.)

General Format: COM X: YYYYYY ( arg1 , arg2, . . . )

Command            One of:              yes                                                 
                                                                                            
                   ADD                                Add new device                        
                                                                                            
                   DEL                                Delete device from database (must use OBS first)
						      DEL REQUIRES PRIVILEGES
                                                                                            
                   OBS                                Mark device as obsolete which means that it is non-functional  
                                                      and database information is typically not available to applications                             
                                                                                            
                   UBS                                Undo an OBS command (may be used with 'DLP EMC' command)               
                                                                                            
                   DOC                                Mark device for documentation, which means that it is non-functional      
                                                      but the database information remains available to applications     
                                                      (This is typically done to devices that are saved in a data logger that has been      
                                                       turned off so that people can retrieve historically interesting data.)      
                                                      (This should be used sparingly.)                             
                                                                                            
                   UDC                                Undo a DOC command to make the      
                                                      device fully functional again                             
                                                                                            
                   MOD                                Modify device data                    
                                                                                            
                   LIST, LIS or LSX                   List device data in the form of an    
                                                      input text file.  LSX will list analog alarm limits
						      in HEX (raw) format.
   
                   CHG                                Change device name

                   CHGNOD                          Change primary source node

                   SWAP                               Swap two device names                    
                                                                                            
Device Name        X:YYYYYY where X    yes            List of acceptable prefix letters    
                   is one of the                      is provided below
                   prefix letters                        
                   shown, and YYYYYY is                      
                   <=12 char mnemonic.                      
                   [Note: a semi-colon                       
                   in the second                      
                   character will be                  
                   automatically                      
                   replaced with a                                                            
                   colon]                                                                   
                                                                                            
                                                      No further parameters are required for   
                                                      LIS or LSX, however, "BACKUP" may
						      be appended in order to list the
						      device from the backup server.
						      Example: LIS M:OUTTMP BACKUP                         


List of Acceptable Device Prefix Letters (as of 11-September-2019)
A  Accumulator (historic)       B  Booster
C  Cryogenics                   D  Delivery Ring (formerly Debuncher)
E  Experimental                 F  Fixed Target
G  General Controls             H  HINS (historic)
I  Main Injector                L  Linac
M  Muon (formerly Main Ring)    N  NML
P  PIP-II                       R  Recycler
S  Switchyard                   T  Test area (formerly Tevatron)
U  Utility device               V  States device
X  Statistics                   Z  Test device

Field              Value                Req?          Comments                              

A) ADD Command:

ADD X: YYYYYY ( "DESCRIPTIVE TEXT" , SRCNODE , PRVSIB , CONSOLEPRO, ALRMLSTID, CTRLBYDEV, DEPARTMENT, MAINTAINER )

Device             Text<=24 chars       yes                                                 
Descriptive Text                                                                            
                                                                                            
Source Node        Refer to file        yes, unless   Must be 'LOCAL' or '0' or blank                                         
                   nodes.txt            family        for PRFMLY devices.                                 
                   for a list of                      mecca/services/acnet/nodes.txt   
                   current nodes                                                            
                                                                                            
PRVSIB-Device      Any valid  device    no            Should refer to a device already      
name of previous   name                               defined, or defined in same file       
sibling                                               prior to this entry                   
                                                                                            
CONSOLEPRO         Bit Mask expressed   no: default   Bit on means setting request to       
Console protect    in Hex (bits 1-27    is 7FFDBDE    given device honored for this         
bit mask           corresponding to                   console class.   Bit 0 should    
                   console classes)                   not be set. Symbolic representation                                                           
                     0-FFFFFFFE (High                 is supported, but not recommended                                                       
                   order bits to the                  if many classes set.
                   left)        
ALRMLSTID          Alarm List ID:       no            Default is zero
                   may be expressed                   Example: "BOOSTR A-dumb"
                   as numeric value
                   or quoted symbol
CTRLBYDEV          Any valid device     no            Should refer to a device already
Controlled-By      name, or zero                      defined, or defined in same file
Device                                                prior to this entry. Use zero (0)
                                                      to eliminate controlled-by device

DEPARTMENT         Text from list       no - default  Must match a name from the table
Lab department     of departments       based on      accdb..departments (name column)
                                        name prefix   See note below.

MAINTAINER         Text (name of        no - default  Must match name from the table
equipment          person)              is NOBODY for accdb..console_user.  This is
maintainer                              new devices   typically the last name (or NOBODY).

The following departments are defined as of 11-September-2019:

Antiproton Source, Controls, Cryogenics, EE Support, Engineering Support, ES&H, External Beamlines, Instrumentation, Main Injector, Mechanical Support, Muon, Neutron Therapy, Operations, Photoinjector, Proton Source, RF, SRF Beam Test Facility, Target Systems, Tevatron

A complete, up-to-date list of departments is maintained in the table "accdb..departments".

B) MODify Command:

General Format: Same as ADD, but all arguments are optional. Only those indicated will be modified. All commands following the MOD command will also be in modify mode until a new Device Name Command Line appears.

Most users are not permitted to modify obsolete devices. They must first be restored with the UBS command. Certain privileged users, however, may modify obsolete devices directly.

C) CHG Command (Change Device Name)

General Format: CHG X: YYYYYY (x: yyyyyy)

X: YYYYYY old      Any valid existing   Yes          
device name        device name                       
x: yyyyyy new      Any valid            Yes          
device name        non-existing                      
                   device name                       

D) CHGNOD Command (Change Source Node)

General Format: CHGNOD X: YYYYYY (node-name)

Note that this is a convenience command which duplicates the same operation in the MOD command.

X: YYYYYY          Any valid existing   Yes          
device name        device name                       
node-name          Any valid existing   Yes          
new primary        node name                      
node name                                 

E) SWAP Command (Swap Two Device Names)

General Format: SWAP X: YYYYYY (x: yyyyyy)

X: YYYYYY first    Any valid existing   Yes          
device name        device name                       
x: yyyyyy second   Any valid existing   Yes          
device name        device name                       

Note that the full device names will also be swapped.

F) OBS Command (Mark device obsolete)

General Format: OBS X: YYYYYY ("Text describing reason to obsolete")

Note that the text must be delimited by the double-quotes!

A documentation-only device may be obsoleted, but this will reset the the documentation-only state.

X: YYYYYY          Any valid existing   Yes          
device name        device name                       
Text               Up to 80             Yes          
                   characters and                    
                   must include >= 8                 
                   non-blank chars                   

Field              Value                Req?          Comments                              

G) UBS Command (Restore device, undo an obsolete)

General Format: UBS X: YYYYYY ("Text describing reason to restore device")

X: YYYYYY          Any valid existing   Yes          
device name        device name                       
Text               Up to 80             Yes          
                   characters and                    
                   must include >= 8                 
                   non-blank chars                   

Field              Value                Req?          Comments                              

H) DOC Command (Mark device for documentation only)

General Format: DOC X: YYYYYY ("Text describing reason to mark documentation-only")

Note that the text must be delimited by the double-quotes!

A documentation-only device is non-functional, and cannot be read or set.

X: YYYYYY          Any valid existing   Yes          
device name        device name                       
Text               Up to 80             Yes          
                   characters and                    
                   must include >= 8                 
                   non-blank chars                   

Field              Value                Req?          Comments                              

I) UDC Command (Restore device from documentation-only state)

General Format: UDC X: YYYYYY ("Text describing reason to restore device")

X: YYYYYY          Any valid existing   Yes          
device name        device name                       
Text               Up to 80             Yes          
                   characters and                    
                   must include >= 8                 
                   non-blank chars                   

Field              Value                Req?          Comments                              

J) DEL Command (Mark device deleted)

General Format: DEL X: YYYYYY ("Text describing reason to delete")

The DEL command requires privileged user status!

X: YYYYYY          Any valid existing   Yes          
device name        device name that                  
                   has been obsoleted                
Text               Up to 80             Yes          
                   characters and                    
                   must include >= 8                 
                   non-blank chars                   

II. Event message code definition line

A) HEX Input format: EMX (Wrd1/Wrd2/Wrd3/Wrd4,Wrd1/Wrd2/Wrd3/Wrd4)

[Note: the second event message code is optional]

Command desig-     EMX                  Yes                                                 
nator                                                                                       
Word1, etc.        Up to 4 [or 8] HEX   Yes           Low order word first                  
                   digits (high order                                                       
                   digits first) per                                                        
                   word, separated by                                                       
                   slashes (total of                                                        
                   4 words) For two                                                         
                   EMC's, separate                                                          
                   second set of                                                            
                   words by a comma                                                         

III. Sub-system device number definition line (must appear with a PRO line with same property name)

A) HEX General Input Format: SSDNHX PropName (Word1/Word2/Word3/Word4)

Command line       SSDNHX               Yes                                                 
designator                                                                                  
PropName-Property  One of:  PRREAD      Yes         Old-style names such as                                                 
Name               PRBSTS PRESTS                    READNG,SETTNG, and BASTAT                                                            
                   PRBCTL PRSET                     will continue to work                                                            
                   PRANAB PRDABL                                                            
Word1, etc.        Up to 4 HEX digits   Yes          Low order word first  For field        
                   (high order digits                information and SSDN formats, see      
                   first) per word,                  the appropriate device description     
                   separated by                      document or the front-end programmer.  
                   slashes (total of                                                        
                   4 words)                                                                 

Field              Value                Req?          Comments                              

IV. Sub-system device record

A) Hex Input Format: SSREC (WordCount/Word2/Word3/Word4/... )

Command Line       SSREC                Yes                                                 
designator                                                                                  
WordCount          Word count for                     Maximum of 64 (decimal) words         
                   record in Hex                                                            
Word2, etc         Up to 4 Hex          Yes           Low order word first                  
                   digits (high order                                                       
                   first) per word                                                          

V. Property Command Line (must be accompanied by a SSDN definition command line if PRREAD, PRBSTS, PRESTS, PRBCTL, PRSET, PRANAB, or PRDABL)

The Extended Status property (PRESTS/ESTATS) has been deprecated! Only existing instances of this property may be modified.

General Format: PRO PropName (arg1, arg2, ...)

Property line      PRO                  yes                                                 
designation                                                                                 
Property Name      One of:  PRREAD      yes         Old-style names such as                                                 
                   PRBSTS PRBCTL                    READNG, SETTNG, and BASTAT                                            
                   PRSET PRAATX                     will continue to work                                          
                   PRANAB PRDABL                                                            
                   PRETXT PRDATX                                                            
                   PRESTS PRFMLY PRSAVE                                                       
                   PRVMDI PRDCTL                                                                     

Field              Value                Req?          Comments                              

A) PRREAD, PRBSTS, PRESTS Format: PRO PRREAD (DATSIZE, MAXSIZE, FREQ)

Note that the old-style property names (READNG, BASTAT, ESTATS) will be recognized.

DATSIZE-Default    1, 2, 4 bytes, or    no:                                                
Data Size          0 for no default     default=2                                          
MAXSIZE-Maximum    1->10485760          no:                                                
Array Size in                           default=2                                          
decimal bytes                                                                              
FREQ-Frequency     0-32767 or T00-TFF   yes          If positive, then frequency; if T     
time descriptor,           OR                        number, then hex event #
or data event      like "p,1000,true"                must be periodic or clock event              

B) PRBCTL and PRSET Format:

PRO PRSET (DATSIZE, MAXSIZE, FREQ, DATUM1, DATUM2, DATUM3,...)

Note that the old-style property names (BCNTRL and SETTNG) will be recognized.

FREQ-Frequency     0-32767 or T00-TFF  not needed    If positive, then frequency; if T     
time descriptor,           OR          for PRBCTL    number, then hex event #              
or data event      like "p,1000,true"                must be periodic or clock event              
DATUM1, DATUM2     Up to 2 Hex         no            DATUM fields will be ignored if       
                   digits per datum,                 existing data already exists in the   
                   separated by                      database.  NOTE: these fields                              
                   commas- not                       may be specified as double-                                               
                   greater than                      precision floats for            
                   MAXSIZE # of data                 PRSET (see discussion below)        
                   and <= 128 bytes                                                              

Double-precision floating values may be provided as setting data in lieu of hex bytes. These values will be down-scaled to raw data using the scaling parmeters provided for the setting property in the Dabbel batch input stream. In other words, the user must provide a PDB with scaling data if the setting data includes floating values! Dabbel looks for either a period (.), plus sign (+), or a minus sign (-) in the first data field to determine which format to use for the entire data list. Each floating value will produce 1, 2, or 4 bytes of raw data, depending on DATSIZE. The total number of floating values accepted will be limited by the 128 byte limit. Please note that a Dabbel listing will always show the first 128 bytes (or less) of setting data in hex format! Tools (such as ACL) are available to examine the entire setting record in a variety of formats.

The 128 byte limit is somewhat arbitrary, and was chosen to match the size of a single segment in the database. Front-ends are the source for nearly all settings, and Dabbel is only permitted to create initial setting data for a property.

Field              Value               Req?          Comments                               

C) PRANAB Format: PRO PRANAB (DATSIZE, MAXSIZE, FREQ, VALUE1, VALUE2, K, Q, DE, LE, EV, AI, AB, BP, TRIES, EVENT1, EVENT2, SSINFO1, SSINFO2, ... SSINFO6)

Note that the old-style property name (ANALBL) will be recognized.

DATSIZE - Def Size Must be 2 bytes      no        
MAXSIZE - Size     20, 40, 60, 80, ...  no            Must be a multiple of 20 bytes        
of alarm block                          default=20                                          
in decimal bytes                                                                            
VALUE1, VALUE2     UP to 8 hex          no            May not be MODified.                   
                   digits (raw), or                   Both values must either be
		   double-precision                   in raw (hex) units or
		   w/ period (common)                 in common units.
K-Type of          0 or 2 only          no:           0=VALUE1 is nominal, VALUE2 is        
VALUE1, VALUE2                          default=0     tolerance; 2=VALUE1 is minimum,
                                                      VALUE2 is maximum.                               
Q-Length of        1, 2, 4 bytes        no:                                                 
VALUE1, VALUE2                          default=2                                           
DE-event display   0, 1                 no:           0=event display disabled, 1=event     
bit                                     default=1     display enabled                       
LE-event logging   0, 1                 no:           0=event logging disabled, 1=event     
bit                                     default=0     logging enabled                       
EV-exception or    0, 1                 no:           0=exception condition, 1=event        
event                                   default=0                                           
AI-override        0, 1                 no:           1=override abort(AB);     May not     
abort                                   default=0     be MODified                           
AB-trigger abort   0, 1                 no:           1=abort allowed                       
when in alarm                           default=0                                           
BP-alarm bypass    0, 1                 no            0=alarm bypassed, 1=alarms not        
                                                      bypassed; field ignored on input;
                                                      NEW alarm blocks have BP set to 0     
TRIES-tries        0-255                no-def=1      May not be MODified                   
needed             (0 same as 1)                                                                         
EVENT1, EVENT2     0-255                no-def=0      Fields also known as clock_event                   
-event #'s                                            and subfunction_code. See the
                                                      section below entitled "Specific
                                                      MOOC Issues" for more information.
						      May not be MODified.                                    
SSINFO1, 2, etc    Up to 6 Hex          no            See the section below entitled
sub-system         numbers (2 digits                  "Specific MOOC Issues"
specific info      each) sep by                                                             
                   commas.  0-FF                                                            
                   range for each                                                           

NOTE: For existing alarm blocks, VALUE1, VALUE2, TRIES, EVENT1, and EVENT2 will be ignored, as these fields can not be modified.

Field              Value                Req?          Comments                              

D) PRDABL Format:

PRO PRDABL (DATSIZE, MAXSIZE, FREQ, NOMVALUE, MASKVALUE, Q, DE, LE, EV, AI, AB, BP, TRIES, EVENT1, EVENT2, SSINFO1, SSINFO2, ... SSINFO6)

Note that the old-style property name (DGALBL) will be recognized.

DATSIZE - Def Size Must be 2 bytes      no        
MAXSIZE - Size     20, 40, 60, 80, ...  no            Must be a multiple of 20 bytes        
of alarm block                          default=20                                          
in decimal bytes                                                                            
NOMVALUE nominal   Up to 8 Hex          yes           May not be MODified                   
value              digits-high order                                                        
                   on left                                                                  
MASKVALUE          Up to 8 Hex          yes           May not be MODified                   
                   digits-high order                                                        
                   on left                                                                  
Q-Length of        1, 2, 4 bytes        no:                                                 
VALUE1, VALUE2                          default=2                                           
DE-event display   0, 1                 no:           0=event display disabled, 1=event     
bit                                     default=1     display enabled                       
LE-event logging   0, 1                 no:           0=event logging disabled, 1=event     
bit                                     default=0     logging enabled                       
EV-exception or    0, 1                 no:           0=exception condition, 1=event        
event                                   default=0                                           
AI-override        0, 1                 no:           1=override abort(AB);     May not     
abort                                   default=0     be MODified                           
AB-trigger abort   0, 1                 no:           1=abort allowed                       
when in alarm                           default=0                                           
BP-alarm bypass    0, 1                 no            0=alarm bypassed, 1=alarms not        
                                                      bypassed; field ignored on input;
                                                      NEW alarm blocks have BP set to 0     
TRIES-tries        0-255                no-def=1      May not be MODified                   
needed             (0 same as 1)                                                                         
EVENT1, EVENT2     0-255 or             no-def=0      Fields also known as clock_event                   
-event #'s                                            and subfunction_code. See the
                                                      section below entitled "Specific
                                                      MOOC Issues" for more information.
						      May not be MODified.                                    
SSINFO1, 2, etc    Up to 6 Hex          no            See the section below entitled
sub-system         numbers (2 digits                  "Specific MOOC Issues"
specific info      each) sep by                                                             
                   commas.  0-FF                                                            
                   range for each                                                           

NOTE: For existing alarm blocks, NOMVALUE, MASKVALUE, TRIES, EVENT1, and EVENT2 will be ignored, as these fields can not be modified.

E) PRAATX Format:

PRO PRAATX (PRIORITY, "TEXT" )    <--- DEPRECATED

PRO PRAATX (PRIORITY, HAND_CODE, SOUND_ID, SPEECH_ID, "TEXT", "URL" )

Note that the old-style property name (ANALTX) will be recognized.

PRIORITY-Message   0-255                yes          Required even for MOD                  
Priority                                                                                    
Handler Code       >= 0                 yes          Required even for MOD
Sound Identifier   >= 0                 yes          Required even for MOD
Speech Identifier  >= 0                 yes          Required even for MOD
Alarm text         <= 80 ascii chars    yes          Required even for MOD                  
                                                     Must contain non-blank characters     
URL   text         <= 128 ascii chars   no           Defaults to no URL

If the deprecated form of the PRO PRAATX command is used, the three missing parameters (HAND_CODE, SOUND_ID, SPEECH_ID) will be set to zero.

F) PRETXT Format: PRO PRETXT ( TC1, BITNO1, COLORA1, "STEXTA1", COLORB1, "STEXTB1", "LTEXT1", TC2, BITNO2, COLORA2, "STEXTA2", COLORB2, "STEXTB2", "LTEXT2", ...)

Note that the old-style property name (EXTEXT) will be recognized.

TC - type code     always 1             yes           Up to 256 sets of values.             
                                                      Required even for MOD                 
BITNO - bit #      0-255                yes           Required even for MOD                 
COLORA - color     0-F (hex)            yes           Required even for MOD                 
code if bit                                                                                 
clear                                                                                       
STEXTA - short     <= 7 ascii chars     yes           Required even for MOD                 
text if bit                                                                                 
clear                                                                                       
COLORB - color     0-F (hex)            yes           Required even for MOD                 
code if bit set                                                                             
STEXTB - short     <= 7 ascii chars     yes           Required even for MOD                 
text if bit set                                                                             
LTEXT -            <= 24 ascii chars    yes           Required even for MOD                 
descriptive text                                                                            

Field              Value                Req?          Comments                              

G) PRDATX Formats:

PRO PRDATX (DGMASK1, CONDVAL1, PRIOR1, "TEXT1" , DGMASK2, CONDVAL2, PRIOR2, "TEXT2" , ...)    <---DEPRECATED

PRO PRDATX (DGMASK1, CONDVAL1, PRIOR1, HAND_CODE1, SOUND_ID1, SPEECH_ID1, "TEXT1", DGMASK2, CONDVAL2, PRIOR2, HAND_CODE2, SOUND_ID2, SPEECH_ID2, "TEXT2", ...)

PRO PRDATX (DGMASK1, CONDVAL1, PRIOR1, HAND_CODE1, SOUND_ID1, SPEECH_ID1, "TEXT1", "URL1", DGMASK2, CONDVAL2, PRIOR2, HAND_CODE2, SOUND_ID2, SPEECH_ID2, "TEXT2", "URL2", ...)

Note that the old-style property name (DGALTX) will be recognized.

DGMASK digital     Up to 8 Hex          yes          Up to 32 sets of values. Required      
mask               digits-high order                 even for MOD                           
                   bits on left                                                             
CONDVAL            Up to 8 Hex          yes          Required even for MOD                  
condition value    digits-high order                                                        
                   bits on left                                                             
PRIOR-message      0-255                yes          Required even for MOD                  
priority                                                                                    
Handler code       >= 0                 yes          Required even for MOD
Sound Identifier   >= 0                 yes          Required even for MOD
Speech Identifier  >= 0                 yes          Required even for MOD
TEXT-digital       <= 80 ascii chars    yes          Required even for MOD                  
alarm text                                           Must contain non-blank characters     
URL   text         <= 128 ascii chars   no           Defaults to no URL (ADD)
                                                     or to existing URL (MOD)

If URL text is specified for one entry, it must be specified for all entries.

If the deprecated form of the PRO PRDATX command is used, the three missing parameters (HAND_CODE, SOUND_ID, SPEECH_ID) will be set to zero.

H) PRFMLY Format:

PRO PRFMLY (DEVNAME1, DEVNAME2, DEVNAME3, ... , DEVNAME300)

Note that the old-style property name (FAMILY) will be recognized.

DEVNAME1- device   valid device name    yes          up to 300 device names may be         
name of first                                        specified                             
offspring, etc.                                                                            

Field              Value                Req?          Comments                              

J) PRSAVE Format:

PRO PRSAVE (LISTNUM, HCODE, DCODE, PROP1, PROP2, ... )

Note that the old-style property name (SAVE) will be recognized.

LISTNUM- SAVE      0-255 decimal        yes                                                 
list #                                                                                      
HCODE- handler     0-'FFFF'X            yes                                                 
code                                                                                        
DCODE- display     0-'FFFF'X            yes           Upper byte is reason code                                      
handler code                                          (non-zero) if list number
                                                      is SAVE_LIST_NEVER_SAVE (4)                                      
PROP1, etc.        ALL or PRREAD,       yes                                                 
property list      PRSET, PRBSTS,                                                          
                   PRANAB, PRDABL,                    NONE if list number is
                   NONE                               SAVE_LIST_NEVER_SAVE (4)                                                           
Field              Value                Req?          Comments                              

The PRSAVE property will be deleted if NONE is specified in the property list and the LISTNUM is not SAVE_LIST_NEVER_SAVE (4).

K) PRVMDI Format:

PRO PRVMDI (DEVNAME, PROP1, PROP2, ... )

Note that the old-style property name (VMDI) will be recognized.

DEVNAME- device    valid device name    yes           virtual machine control device        
name                                                                                        
PROP1, etc.        PRREAD, PRSET,      yes            List of properties controlled by      
property list      PRBSTS, PRANAB,                    DEVNAME                               
                   PRDABL                                                                   

L) PRDCTL Format:

PRO PRDCTL (VALUE1, ORDER_NUM1, "SNAME1", "LNAME1", ["STSNAME1",] VALUE2, ORDER_NUM2, "SNAME2", "LNAME2", ["STSNAME2",]...)

Note that the old-style property name (DGCTRL) will be recognized.

VALUEn digital     Up to 8 Hex          yes          Up to 32 sets of values. Required      
mask               digits-high order                 even for MOD                           
                   bits on left
ORDER_NUMn         >= 0                 yes          Required even for MOD. Recommended
order number       Must be unique                    assignments: 0=RESET,1=ON,2=OFF,
		                                     3=POSITIVE,4=NEGATIVE,5=RAMP,6=DC
SNAMEn short name  <= 16 ascii chars    yes          Required even for MOD
                   Must be unique                    Uppercase recommmended                                                                                  
LNAMEn long name   <= 64 ascii chars    no           defaults to short name
STSNAMEn optional  <= 16 ascii chars    no           May be completely omitted
status mapping                                       (including the comma)                             

The optional STSNAME parameter facilitates the mapping of a digital control attribute to an associated basic status scaling attribute. If provided, the STSNAME parameter must contain a text string of the associated status TRUE or FALSE attribute. It is not recommended or needed, however, for the status mapping to be provided for the standard digital control attributes (Reset, On, Off, Positive, Negative, Ramp, DC). Dabbel will automatically provide the standard mapping. In fact, Dabbel will not even list the standard attribute status links. This facility is mainly intended for the non-standard control attributes. A good example might be a digital control attribute to turn-on a heater. This could be associated with a basic status attribute called "Temperature", with True being "Hot", and False being "Cold". In this case, the digital control attribute for turning on the heat might be mapped to "Hot".

See the SCALEN command to provide a scaling length for the Digital Control property.

M) PRBSSC Format:

PRO PRBSSC (MASK1, MATCH1, INVERT_FLAG1, ORDER_NUM1, "SNAME1", "LNAME1", TRUE_STR1, TRUE_COLOR_CHAR1, FALSE_STR1, FALSE_COLOR_CHAR1, MASK2, MATCH2, ...)

Field              Value                Req?          Comments
                              
MASKn digital      Up to 16 Hex         yes          Up to 32 sets of values. Required      
mask value         digits-high order                 even for MOD                           
                   bits on left
MATCHn digital     Up to 16 Hex         yes          Required even for MOD      
match value        digits-high order                                
                   bits on left
INVERT_FLAGn       zero or one          yes          invert raw data if non-zero      
ORDER_NUMn         >= 0                 yes          Required even for MOD. Recommended
order number       Must be unique,                   assignments: 0=OnOff,1=ReadyTripped,
		   >= 0, and                         2=RemoteLocal,3=Polarity,4=RampDC
                   < 32
SNAMEn short name  <= 16 ascii chars    yes          Required even for MOD
                   Must be unique                    See recommended assignments above                                                                                  
LNAMEn long name   <= 64 ascii chars    no           defaults to short name
TRUE_STRn          <= 16 ascii chars    yes          Required even for MOD
                   true string                                                                                                                         
TRUE_COLOR_CHAR    color:character      yes          Example:  GREEN:.
FALSE_STRn         <= 16 ascii chars    yes          Required even for MOD
                   false string                                                                                                                         
FALSE_COLOR_CHAR   color:character      yes          Example:  RED:*

For more information on color-characters, see alternate color characters. Note that Basic Status Scaling replaces the older Basic Status PDB, which is now deprecated.

See the SCALEN command to provide a scaling length for the Basic Status Scaling property.

VI. Extended Property Command Line (Optional property values)

EPR PropName (ATOMIC_SIZE,ADDR_MODE,SOURCE_NODE,CS_INDICATOR)

Property Name      One of: PRREAD       yes           Note that old-syle
                   PRBSTS PRBCTL                      property names will
                   PRSET PRANAB                       continue to be recognized
                   PRDABL PRESTS
ATOMIC_SIZE        atomic size          no            fewest number of bytes that
                   decimal value        default=      can be manipulated --> must
                                        DATSIZE       be >= DATSIZE !
ADDR_MODE          addressing mode      no            non-zero for non-standard
                   decimal value OR     default=0     addressing modes. Text
		   symbolic text                      must be enclosed in quotes
SOURCE_NODE        Similar to SRCNODE   no            tracks changes in device
                   in ADD/MOD commands  defaults to   SRCNODE given in ADD/MOD
		                        SRCNODE from  command -- UNLESS the two
					ADD/MOD       are different
CS_INDICATOR       controlled setting   no            non-zero for controlled
                   indicator (0/1)      default=0     setting -- PRSET, PRBCTL,
		                                      PRANAB, and PRDABL only
                                                      (controlled setting -> cannot be      
                                                      set from the parameter page)          

VII. Full Name Command Line (Provide optional full device name and/or control system type)

FNAME (CS_TYPE,FULL_NAME)

Note that the old-style long name command (LNAME) will be recognized.

CS_TYPE -          0 = ACNET            no            "Acnet", "Epics", etc.
control system     decimal value                      default is Acnet
type               or quoted text
FULL_NAME          15-64 characters     see below     must comply with device
                                                      naming rules as discussed
						      in the introduction.  Note
						      the exceptions for full
						      (long) device names. Full
						      names MAY be delimited by
						      quotation marks, but this
						      practice is not
                                                      recommended.

A full name may have a length less than 15 characters only if it is identical to the normal (terse) device name.

Dabbel will accept all of the following examples:

FNAME (Z:This_is_a_long_name)
FNAME ("Z:This_is_a_long_name")
FNAME (1, Z:This_is_a_long_name)
FNAME ("Epics", Z:This_is_a_long_name)
FNAME ("Epics")                     See important note below
FNAME ("Epics",)                    See important note below
FNAME ( )                           See important note below
The last three examples above do not provide a full name. This will result in the deletion of the full name, which means that the full name will be replaced by the terse name. If there is no full name, nothing will be changed (except, possibly, the control system type).

VIII. Full Description Command Line (Provide optional full device description)

FDESC ("FULL_DESCRIPTION")

Note that the old-style long description command (LDESC) will be recognized.

FULL_DESCRIPTION   25-128 characters    yes           enclose in quotes

IX. Foreign Device Mapping Command Line (Provide optional foreign device mapping)

FMAP PropName ("SYSTYPE", "NAME1", "DATA_TYPE1", STRT_IDX1, NUM_ELE1, "NAME2", "DATA_TYPE2", STRT_IDX2, NUM_ELE2, ...)

SYSTYPE foreign    ascii string         yes          example is "EPICS"
system type
NAMEn foreign name <= 80 ascii chars    yes          process variable name
                                                     in Epics
DATA_TYPEn         ascii string         no           system type dependent
data type                                            default is "DEFAULT"
STRT_IDXn          >= 0                 no           defaults to zero
starting index
NUM_ELEn number    >= 1                 no           defaults to one
of elements

The syntax for deleting the foreign device mapping fields is simply:

FMAP PropName ("SYSTYPE")

X. Enumerated Value Command Line (Provide optional enumerated values for PRREAD and PRSET properties)

The ENUM command will also permit the user to attach to an existing enumerated value set which was created for another device/property.

ENUM PropName (VALUE1, "SNAME1", "LNAME1", VALUE2, "SNAME2", "LNAME2", ...)

ENUM PropName (REFDEVPROP)

VALUEn value       32-bit integer       yes          must be unique
                   may be negative
SNAMEn short name  <= 10 ascii chars    yes          must contain no embedded
                                                     spaces, and must be unique
LNAMEn long name   <= 64 ascii chars    no           defaults to SNAMEn
REFDEVPROP         Device name          yes          Second character must be
Reference device                                     either a colon (:) for
and property                                         PRREAD or an underscore (_)
						     for PRSET property

If the first form is used (with names and values), an enumerated value set will be created or modified. A modification action, however,will affect any other device/property which is attached to this set.

If the second form is used, note that the reference device can be the same device, but then it must be a different property. If the device was previously attached to a different enumerated value set, it will be detached from that set. A set will be deleted from the database after the last device/property has been detached from it.

An enumerated value set may contain up to 'DIO_MAX_ENUM_VALUE_ENTRIES' entries.

The syntax for detaching the device/property from an enumerated value set is simply:

ENUM PropName ()

XI. Property Structure Command Line (Provide optional structure names for PRREAD and PRSET properties)

STRUC PropName ("SNAME")

SNAME  structure   <= 64 ascii chars    yes
       name

The syntax for deleting the structure name is simply:

STRUC PropName (" ")

XII. Device Expression Command Line (Provide optional device expression for PRREAD or PRBSTS properties)

EXPR PropName ("EXPRESSION")

EXPRESSION         4-510 characters     yes           text field with format
                                                      defined by associated source
						      node.

The specified property must be either reading or basic status. The property name may be omitted, in which case the command defaults to the reading property.

If the source node is MACALC, the expression must be a valid ACL expression. A warning will be issued if the expression does not parse correctly in this case.

The syntax for deleting the expression is simply:

EXPR PropName ()

XIII. Console Protection Mask Command Line (Provides an alternative method of adding or removing individual classes to/from the console protection mask)

PMASK ADD ("CLASS1", "CLASS2", ...)

PMASK REMOVE ("CLASS1", "CLASS2", ...)

CLASSn class name  <= 12 ascii chars    yes          at least one class is required

The user may include both ADD and REMOVE versions of the PMASK command in a single batch. A list of acceptable protection mask classes can be viewed by clicking on "Protection Mask" in the Summary page of application D80. The indicated classes will be used to modify the hex protection mask (CONSOLEPRO) provided in the ADD/MOD command described above. If the user provides no protection mask in the ADD/MOD command, however, then the PMASK commands will alter either the default mask (7FFDBDE) if adding a new device, or the current console protection mask for an existing device.

XIV. Alarm Acknowledge Mask Command Line (Provide optional alarm acknowledge mask)

AAMASK (CONSOLEPRO)

CONSOLEPRO         Hex Bit Mask or      no: default   Normally symbolic text       
Console protect    symbolic text        is "MCR+      string         
bit mask                                MCRCrewChief"     

Note that the alarm acknowledge mask is a completely separate entity from the console protection mask, but both share the same structure and syntax.

XV. Alarm Group Command Line (Provide optional alarm group information)

ALMGRP (ALMGRPDEV, CONSOLIDATOR)

ALMGRPDEV          Device Name          no: default   Leave blank to remove
Alarm group                             is no alarm   device from alarm group
device                                  group
CONSOLIDATOR       TRUE or FALSE        no: default   TRUE if this device is
                                        is FALSE      an alarm consolidator

The alarm group device must exist and be some other device. Furthermore, it must be an alarm consolidator device.

If a device belonging to an alarm group is obsoleted, it will automatically be removed from the alarm group. An alarm consolidator device may be obsoleted, but only if there are no other devices which reference it as their consolidator.

XVI. KNOB Command Line (Indicate whether or not setting is knobable)

KNOB TRUE (default)

KNOB FALSE

If the single parameter is TRUE, the setting is knobable. This command is illegal if there is no setting property.

XVII. DREAD Command Line (Indicate whether or not reading is destructive)

DREAD PropName TRUE

DREAD PropName FALSE (Default)

Supported properties include PRREAD, PRSET, and PRBSTS. This command is illegal if the associated property does not exist, or is not being created in the same batch.

XVIII. DLP--Delete Property (Must be used only with MODify or UBS commands)

Deletes Property Information (PRO, SSDN, PDB lines). May also be used to delete the EMC, Subsystems Device Record (PRSSDR), Sibling (PRSIBL), Family (PRFMLY), Analog Alarm Text (PRAATX), Digital Alarm Text (PRDATX), Extended Text (PRETXT), Save (PRSAVE), VMDI (PRVMDI), and Controlled-By device (PRCBDI) properties.

Note that deleting the Basic Control property will also delete the Digital Control property (if it exists).

General Format: DLP PropName

PropName           Any valid property   Yes           Deleting the EMC property is the      
                   name -- except for                 same as setting both EMCs to zeros.    
                   UBS: must be EMC                                                         
                   property                                                                 

Field              Value                Req?          Comments                              

XIX. CTYPE, CSCAL and CLOC -- Check Device Type, Scaling and/or Location (forces the device type, scaling and/or device location re-determination for a particular device and property). Normally, a device type (location) determination is only performed if the SSDN or source node are modified. There are rare cases, however, when these values can change, but the SSDN and source node remain the same.

CTYPE will force re-determination of both the device type and the location. CLOC will force re-determination of only the location.

General Format: CTYPE PropName

or: CLOC PropName

or: CSCAL PropName

PropName           Any valid property   Yes           Use the parameter ALL to select      
                   name which may have                all valid SSDN properties         
                   an SSDN, or ALL                   

The only properties allowed for the CSCAL command are PRREAD and PRSET. These commands are permitted only after a MOD.

XX. Property Location Command Line (Provide optional location data for PRREAD, PRSET, PRBSTS, PRBCTL, PRANAB, and PRDABL properties)

LOC PropName ("LTEXT", "RACK", X, Z, Y)

LTEXT    location  <= 64 ascii chars    yes           may be blank
         text                                      
RACK     rack text <= 16 ascii chars    yes           may be blank
X        coord     32-bit float         no            default = 0.0 (if new)           
Z        coord     32-bit float         no            default = 0.0 (if new)           
Y        coord     32-bit float         no            default = 0.0 (if new)           
If any of the X,Z,Y coordinates are provided, all must be provided. If not provided, the coordinates default to 0.0 if new property, otherwise, the existing values are retained.

XXI. CMAINT -- Check Equipment Maintainer (compares the supplied user name with the existing equipment maintainer and reports any discrepancy). This command must follow a MOD command (never an ADD command). The MOD command may or may not provide a new equipment maintainer name. This command compares the UserName parameter with the existing equipment maintainer name (before any modification). If equal, this command does nothing, but if NOT equal, however, a warning message is written to the terminal and listing file, AND any new equipment maintainer name provided in the MOD command is ignored.

General Format: CMAINT "UserName"

UserName           Any valid username   Yes                   
                   from console_user                              
                   table                   

XXII. RSTEXTRMA -- Reset the Scaling Extrema (recomputes the existing scaling extrema/limits). This command must follow a MOD command (never an ADD command). The only properties supported are PRREAD and PRSET.

If the user also provides scaling extrema (limits) in a PDB command, an error will be generated. This command should normally stand alone after a MOD command.

General Format: RSTEXTRMA PropName Type

PropName           Any valid property   Yes           PRREAD or PRSET      
Type               Type of scaling      No            FE if front-end

If the Type parameter is omitted, normal scaling will be affected.

XXIII. MACHINE -- Machine Identifier

MACHINE ("MNAME")

MNAME              Any valid machine    Yes           See below on how to generate     
                   name                               a list of machine names         
The machine name may be either a macro name or "long name". For example, "Main Injector" is the long name, and MAIN_INJECTOR is the macro name. A list of machines can be generated with the following ACL command: "listStrings/machine".

XXIV. COMPONENT -- Component Type Identifier

COMPONENT ("TYPE")

TYPE               Any valid component  Yes           List will be      
                   type or "none"                     provided later         

XXV. PDB (or PDBFE) Descriptor Lines (must have PRO command line with same property name)

The user may provide two types of scaling for PRREAD and PRSET properties: normal and front-end. Other properties support only the normal scaling. Either, or both may be provided via the PDB (normal scaling) and PDBFE (front-end scaling) commands. Both variants have the same format as described below. In most cases, no front-end scaling is provided, and scaling is performed solely by console services.

If front-end scaling is provided (and supported by the front-end), the front-end will scale the data using the PDBFE data. The user may have additional scaling performed by the console using PDB data. If the user provides only PDBFE for a new device/property, DABBEL will automatically create a NULL normal PDB which causes the console scaling services to simply pass the front-end scaled data without modification.

Important Note: Support for the PDB command has been dropped for both basic control and basic status. Please use the PRO PRDCTL and PRO PRBSSC commands respectively.

General Format: PDB{FE} PropName (arg1, arg2, ... , argN)

PDB descriptor     PDB{FE}              yes                                                 
Property name      One of PRREAD,       yes                                                 
                   PRSET, PRBSTS,                                                          
                   PRESTS, PRBCTL                                                           

A) PRREAD, PRSET Format:

General Format: PDB{FE} PropName (PRMUNITS, COMUNITS, PRMTRNIND, COMTRNIND, IDL, DS, LS, MC, C1, C2, C3, C4, C5, C6, MINIMUM, MAXIMUM)

PRMUNITS-          Any 4 char text      yes                                                 
primary units      string surrounded                                                        
                   by quotes                                                                
COMUNITS- common   Any 4 char text      yes                                                 
units              string surrounded                                                        
                   by quotes                                                                
PRMTRNIND-         0, 2, 4, 6, 8,       no:           See sec 1.2.1.2 of Scaling            
primary            10, ... 20           default=0     Service doc                           
transform index                                                                             
COMTRNIND-         0, 2, 4, 6, 8, 10,   no:           See sec 1.2.1.3  "     "              
common transform   12, 14, 16, 18,      default=0     If 60 or 84, see notes                                      
index              20, ... 24                         below.                                                               
IDL-input data     1, 2, 4              no:                                                 
length                                  default=2                                           
DS-dec or sci      0, 1                 no:           0=decimal notation, 1=scientific      
notation                                default=0                                           
LS-long or short   0, 1                 no:           0=short, 1=long                       
display                                 default=0                                           
MC-motor           0, 1                 no:           0= normal D/A    
controller                              default=0     1= stepper motor        
                                                      (controlled setting is DEPRECATED
                                                      in PDB -- see EPR command)
C1, C2, ... , C6   Up to 6 double-      no:           See sec 1.2.1.3  "     "              
common transform   precision constants  default=0                                           
constants          depending on                                                             
                   COMTRNIND.
MINIMUM            Minimum extrema      no            Computed from COMTRNIND
                   double-precision                   and constants if COMPUTE
MAXIMUM            Maximum extrema      no            Computed from COMTRNIND
                   double-precision                   and constants if COMPUTE                                                         

If the user provides a MINIMUM extrema (limit), a MAXIMUM extrema must also be provided. If the extrema are not provided, any previous extrema are left un-modified. In lieu of providing actual extrema values, the user may specify COMPUTE (un-quoted), which will reset the extrema to computed values. COMPUTE must be in the MINIMUM field, but it is not necessary to also put it in the MAXIMUM field (although it is permitted in both fields). It is not necessary to use the COMPUTE token for ADD (new device) entries, since Dabbel will always ensure that minimum and maximum extrema are in the database. Please refer to the RSTEXTRMA command, which provides an alternate method of resetting the extrema (limits).

At the current time, the user is not permitted to default the MINIMUM extrema with a blank field followed by a comma, as this would not make much sense.

The listing command (LIS) will not include the extrema values if they are equal to the computed extrema. The computed extrema, however, will always be displayed on a comment line immediately below the PDB command line.

Special scaling to strings using common transforms 60 and 84:

(Note: If the common transform index is 60, the primary transform index must be 68.)

The first scaling constant for common transforms 60 and 84 indicates the type of string conversion and must contain a value from the following list:

CNV_SHORT                  0    Convert a 2-byte integer
CNV_SHORT_HEX              2    Convert a 2-byte integer (hex)
CNV_LONG_HEX               3    Convert a 4-byte integer (hex)
CNV_HEX                    4    Convert a byte string to hex (little endian)
CNV_CHAR                   8    Null convert a character string
CNV_ENUMERATED             12   Convert an enumerated value
CNV_NODE                   15   Convert a 2-byte node value
CNV_DEVICE                 17   Convert a device index value
CNV_ERROR                  21   Convert an ACNET error value
CNV_SHORT_ERROR            22   Convert an ACNET error value (short display)
CNV_ULONG                  27   Convert a 4-byte unsigned integer
CNV_CLINKS                 29   Convert a 4-byte time in clinks
CNV_UTC_TIME_FMT_CLINKS    280  Convert a 4-byte UTC (GMT) time since
                                January 1, 1970 (clinks format)
CNV_SHORT_ENUMERATED       289  Convert a 2-byte enumerated value
CNV_HOURS_TO_TOD           472  Convert a fractional hours value to a
                                time-of-day string

The second scaling constant for common transforms 60 and 84 is only used for string (CNV_CHAR) conversions and indicates the length of the string.

The third scaling constant for common transforms 60 and 84 is used to specify any raw data handling:

	0 -> no special data raw handling required
	1 -> swap adjacent bytes of the raw data before converting to a string
	2 -> swap adjacent words of the raw data before converting to a string

A Reading/Setting PDB may be deleted with the command: PDB(FE) PropName (0)

B) PRBSTS Format: PDB PRBSTS (ADFLAG, SFLAG, ONMASK, RDYMASK, REMMASK, POSMASK, IDL,ONALT,RDYALT,REMALT,POSALT)

NOTE: The Basic Status PDB has been retired. It has been replaced with the Basic Status Scaling (PRBSSC) property. The following documentation is retained for historical reference.

ADFLAG-attribute   2 Hex digits         yes           Bitmask definitions:                                      
def flags          Must not be zero                      Mask   Meaning
                   unless deleting                       $01    ONMASK present
                   the PDB.                              $02    RDYMASK present
                                                         $04    REMMASK present
                                                         $08    POSMASK present
                                                         $10    ONALT present
                                                         $20    RDYALT present
                                                         $40    REMALT present
                                                         $80    POSALT present                  
SFLAG-status       2 Hex digits         yes           Bitmask definitions:                                      
data invert                                              Mask   Meaning
                                                         $01    ONMASK inverted
                                                         $02    RDYMASK inverted
                                                         $04    REMMASK inverted
                                                         $08    POSMASK inverted
                                                         $F0    Unused bits                                      
ONMASK on/off      Up to 8 Hex digits   yes                                                 
mask               with high order                                                          
                   bits on left                                                             
RDYMASK ready      Up to 8 Hex digits   yes                                                 
mask               with high order                                                          
                   bits on left                                                             
REMMASK            Up to 8 Hex digits   yes                                                 
remote/local       with high order                                                          
                   bits on left                                                             
POSMASK pos/neg    Up to 8 Hex digits   yes                                                 
                   with high order                                                          
                   bits on left                                                             
IDL-input data     1, 2, 4              no:           See above                             
length                                  default=2                                           
ONALT on/off       structure (below)    no            Alternate color and character codes
 alt display       or - 8 Hex digits
RDYALT ready       structure (below)    no            Ditto - see below
 alt display       or - 8 Hex digits
REMALT rem/local   structure (below)    no            Ditto - see below
 alt display       or - 8 Hex digits
POSALT pos/neg     structure (below)    no            Ditto - see below
 alt display       or - 8 Hex digits

A basic status PDB may be deleted with the command: PDB PRBSTS (0)

Each of the alternate color and character code masks contain 8 hex characters. The first (high-order) 4 characters contain the color + character displayed if the condition is false (off, not ready, local, negative). The last (low-order) 4 characters contain the color + character displayed if the condition is true (on, ready, remote, positive). The color code occupies the first 2 characters, and the character code occupies the second 2 characters of each group.

Color codes include: 0=BLACK, 1=BLUE, 2=GREEN, 3=CYAN, 4=RED, 5=MAGENTA, 6=YELLOW, 7=WHITE.

The newer, preferred method of representing the alternate color/character masks is the following symbolic structure (NOTE order!):

(True color name):(True character)|(False color name):(False character)

The color name must be one of the 8 colors show above. The character must be either a single, printable ASCII character, or else the hex representation of an ASCII character (i.e. 0x41 for 'A').

Examples: GREEN:*|RED:0x10, YELLOW:?|CYAN:.

Unused masks may be set to zero, but DABBEL will replace a missing or zero alternate color/character mask with a default value based upon the attribute.


Example using hex masks:

PDB PRBSTS ( FF, 01, 100, 400, 2000, 4020, 2, 042A022E, 0626022E, 044C022E, 03230521)
              ^   ^    ^    ^     ^     ^  ^         ^         ^         ^         ^
       ADFLAG +   |    |    |     |     |  |   ONALT +         |         |         |
            SFLAG +    |    |     |     |  |            RDYALT +         |         |
                ONMASK +    |     |     |  |                      REMALT +         |
                    RDYMASK +     |     |  |                                POSALT +
                          REMMASK +     |  |
                                POSMASK +  |
                                       IDL +

Notes:	ADFLAG:  FF	All attributes present, with alternate characters for each
	SFLAG:   01	On/Off attribute is inverted (0=ON and 1=OFF)
	ONMASK   100	Bit mask to check for On/Off state
	RDYMASK  400	Bit mask to check for Ready state
	REMMASK  2000	Bit mask to check for Remote/Local state
	POSMASK  4020	Bit mask to check for Pos/Neg state (Positive if either bit is set)
	IDL      2	Data length equals 2 bytes
	ONALT    042A022E	Off state:    display RED (04) "*" (2A)
				On state:     display GREEN (02) "." (2E)
	RDYALT   0626022E	Not Ready:    display YELLOW (06) "&" (26)
				Ready state:  display GREEN (02) "." (2E)
	REMALT   044C022E	Local state:  display RED (04) "L" (4C)
				Remote state: display GREEN (02) "." (2E)
	POSALT   03230521	Neg. state:   display CYAN (03) "#" (23)
				Pos. state:   display MAGENTA (05) "!" (21)

Same example using symbolic masks:

PDB PRBSTS ( FF, 01, 100, 400, 2000, 4020, 2, GREEN:.|RED:*,
              ^   ^    ^    ^     ^     ^  ^              ^
       ADFLAG +   |    |    |     |     |  |        ONALT +
            SFLAG +    |    |     |     |  |
                ONMASK +    |     |     |  |
                    RDYMASK +     |     |  |
                          REMMASK +     |  |
                                POSMASK +  |
                                       IDL +
GREEN:.|YELLOW:&, GREEN:.|RED:L, MAGENTA:!|CYAN:#)
               ^              ^                 ^
               |              |                 |
        RDYALT +              |                 |
                       REMALT +                 |
                                         POSALT +

C) PRBCTL Format: PDB PRBCTL (ADFLAG, RESMASK, ONMASK, OFFMASK, POSMASK, NEGMASK)

Note that the old-style property name (BCNTRL) will be recognized.

NOTE: The Basic Control PDB has been retired. It has been replaced with the Digital Control (PRDCTL) property. The following documentation is retained for historical reference.

ADFLAG-Attribute    2 Hex digits        yes           Bitmask Definitions:                                      
definition                                               Mask   Meaning
                                                         $01    RESMASK present
                                                         $02    ONMASK present
                                                         $04    OFFMASK present
                                                         $08    POSMASK present
                                                         $10    NEGMASK present
                                                         $20    Beamline ramp card
                                                         $C0    Unused bits
RESMASK- Reset      Up to 8 Hex         yes                                                 
device              digits with high                                                        
                    order bits on                                                           
                    left                                                                    
ONMASK- device on   Up to 8 Hex         yes                                                 
                    digits with high                                                        
                    order bits on                                                           
                    left                                                                    
OFFMASK- device     Up to 8 Hex         yes                                                 
off                 digits with high                                                        
                    order bits on                                                           
                    left                                                                    
POSMASK- set dev    Up to 8 Hex         yes                                                 
to pos polarity     digits with high                                                        
                    order bits on                                                           
                    left                                                                    
NEGMASK- set dev    Up to 8 Hex         yes                                                 
to neg polarity     digits with high                                                        
                    order bits on                                                           
                    left                                                                    

Field              Value                Req?          Comments                              

Hex Input Format: PDX PropName (ByteCount/Byte2/Byte3/Byte4/ ... )

The PDX command has been retired.

XXVI. SCALEN Command Line (Provide scaling length for certain properties)

SCALEN PropName (LENGTH)

LENGTH must be 1, 2, or 4.

Supported properties include PRDCTL and PRBSSC. If the scaling length is not provided for a new PRDCTL or PRBSSC property, the scaling length will be gotten from the default data size (DATSIZE) of the basic control or basic status properties, respectively.

This command is illegal if the associated property does not exist, or is not being created in the same batch.

XXVII. DWNLDLOC Command Line (Provide download location information for certain properties)

DWNLDLOC PropName (LOCATION)

Except as noted below, the LOCATION must be either a valid non-negative integer, or a label string. Example: 7 = "CMTF78" for certain nodes. Note that all text strings must be enclosed in quotes, for example "Global". Valid locations can vary, depending on the source node. You may use the following ACL command to list the valid locations:

ACL> nodeinfo/downloadLocations node-name

Supported properties are analog/digital alarm blocks, setting, and basic control. Only MOOC, ERLANG, and ACNET NG front-ends are supported. Generally, CAMAC devices should not use this command as the download location is the crate number, which is provided inside the SSDN. This command will be accepted for CAMAC nodes, however, if the location is identical to the crate number.

For Setting and Basic Control properties, it is possible to disable any downloading by moving the device/property to the "Rejected/Disabled" list in the database. This can be done using the DWNLDLOC command with a special location value of -2, or a blank string. Later on, another DWNLDLOC command with a normal location parameter can be used to restore the download capability.

This command is illegal if the associated property does not exist, or is not being created in the same batch.

XXVIII. DELSETREC Command Line (Delete setting record for setting and basic control properties)

DELSETREC PropName

This command provides the only method to delete a setting record for the setting and basic control properties. It must be used within a MOD command. If no setting record exists, no error is generated. An error will be generated, however, if a PRO command is included in the batch which does provide setting data.

In addition, this command will delete any entries for the device and property from the download_devices table.

XXIX. Edit-Comments

The COMMENT command must be used with either an ADD or MOD command. It will add a time-stamped comment to the table accdb.dbo.device_edit_comment. Once written, these comments cannot be modified or deleted, nor will they be displayed with the Dabbel LIS command. Only one COMMENT command is permitted in the ADD/MOD batch, but it may contain up to 255 characters.

It is possible to add a comment without actually modifying the device. Simply use a MOD command with no parameters (other than the device name) followed by the COMMENT command. You will get a warning that no device modifications were seen. A device edit comment is NOT considered a device modification.

General Format: COMMENT ("Text - up to 255 characters")

XXX. Other Controls

A) Comment indicator

                   !                    no            Ignore all text which follows on      
                                                      same line.                            

B) Wild Card Indicators

                   %                    no            Replaces all or part of device name   
                                                      to indicate more than one device.     
                                                      Repeats execution of the command      
                                                      sequence following the Device Name    
                                                      Command Line in which the '%'         
                                                      exists for each device in the         
                                                      indicated range.  Can  only be used   
                                                      for the LIS or LSX command. It can    
                                                      only occur after the ':' in the       
                                                      device name.                          

PART 2

SUMMARY OF DABBEL COMMANDS

I. Device Name Command Line

ADD X:YYYYYY ("TEXT", SRCNODE, PRVSIB, CONSOLEPRO)

MOD X:YYYYYY ("TEXT", SRCNODE, PRVSIB, CONSOLEPRO)

OBS X:YYYYYY ("Reason for Obsolete text")

UBS X:YYYYYY ("Reason for Restore text")

DEL X:YYYYYY ("Reason for Delete text")

LIS X:YYYYYY {BACKUP}

LSX X:YYYYYY {BACKUP}

CHG X:YYYYYY (x: yyyyyy)

II. Event message code definition line: EMX (Word1/Word2/Word3/Word4)

For two EMC's:

EMX(Word1/Word2/Word3/Word4,Word1/Word2/Word3/Word4)

III. Sub-system device number definition line

Hex Input: SSDNHX PropName (Word1/Word2/Word3/Word4)

IV. Sub-system device record

Hex Format: SSREC (WordCount/Word2/Word3/...)

V. Property Descriptor Line

General Format: PRO PropName (DATSIZE, MAXSIZE, FREQ, ... float values)

PRO PRREAD ( DATSIZE , MAXSIZE , FREQ )

PRO PRBSTS ( DATSIZE , MAXSIZE , FREQ )

PRO PRESTS ( DATSIZE , MAXSIZE , FREQ )

PRO PRSET ( DATSIZE , MAXSIZE , FREQ ,

DATUM1 , DATUM2 , DATUM3 , . . . )

PRO PRBCTL ( DATSIZE , MAXSIZE , FREQ ,

DATUM1 , DATUM2 , DATUM3 , . . . )

PRO PRANAB ( DATSIZE , MAXSIZE , FREQ , VALUE1 , VALUE2 ,

K , Q , DE , LE , EV , AI , AB , BP ,

TRIES , EVENT1 , EVENT2 , SSINFO )

PRO PRDABL ( DATSIZE , MAXSIZE , FREQ , NOMVALUE , MASKVALUE , Q , DE , LE , EV , AI , AB , BP , TRIES , EVENT1 , EVENT2 , SSINFO )

PRO PRAATX ( PRIORITY , HAND_CODE, SOUND_ID, SPEECH_ID, . . . "TEXT" . . . )

PRO PRETXT ( TC1 , BITNO1 , COLORA1 , "STEXTA1" , COLORB1 , "STEXTB1" , "LTEXT1" , TC2 , BITNO2 , COLORA2 , "STEXTA2" , COLORB2 , "STEXTB2" , "LTEXT2" , . . . )

PRO PRDATX ( DGMASK1, CONDVAL1, PRIOR1, HAND_CODE1, SOUND_ID1, SPEECH_ID1, . . . "TEXT1" . . . , DGMASK2, CONDVAL2, PRIOR2, HAND_CODE2, SOUND_ID2, SPEECH_ID2, . . . "TEXT2" . . . )

PRO PRDCTL (VALUE1, ORDER_NUM1, "SNAME1", "LNAME1", VALUE2, ORDER_NUM2, "SNAME2", "LNAME2", ...)

PRO PRFMLY ( DEVNAME1 , DEVNAME2 , DEVNAME3 , . . . , DEVNAME300 )

PRO PRSAVE ( LISTNUM, HCODE, DCODE, PROP1, PROP2, . . . )

PRO PRVMDI ( DEVNAME, PROP1, PROP2, . . . )

VI. Extended Property

General Format: EPR propname (ATOMIC_SIZE,ADDR_MODE,SOURCE_NODE)

VII. Long Name

General Format: LNAME (CS_TYPE,LONG_NAME)

VIII. Long Description

General Format: LDESC ("LONG_DESCRIPTION")

IX. Foreign Device Mapping

General Format: FMAP PropName ("SYSTYPE", "NAME1", STRT_IDX1, NUM_ELE1, "DATA_TYPE1", DATA_LEN1, "NAME2", STRT_IDX2, NUM_ELE2, "DATA_TYPE2", DATA_LEN2, ...)

X. Enumerated Values

General Format: ENUM PropName (VALUE1, "SNAME1", "LNAME1", VALUE2, "SNAME2", "LNAME2", ...)

XI. Property Structure Names

General Format: STRUC PropName ("SNAME")

XII. Device Expression

General Format: EXPR ("EXPRESSION")

XIII. Alarm Group

General Format: ALMGRP (ALMGRPDEV,CONSOLIDATOR)

XIV. Delete Property

General Format: DLP propname

XV. Check Device Type for property

General Format: CTYPE propname

XVI. PDB Descriptor Line

A. General Format: PDB PropName ( arg1 , arg2 , ... )

PDB PRREAD ( PRMUNITS , COMUNITS , PRMTRNIND , COMTRNIND, IDL , DS , LS , MC , C1 , C2 , .. C6 , MINIMUM , MAXIMUM )

PDB PRSET ( PRMUNITS , COMUNITS , PRMTRNIND , COMTRNIND, IDL , DS , LS , MC , C1 , C2 , .. C6 )

PDB PRBSTS ( ADFLAG , SFLAG , ONMASK , RDYMASK , REMMASK , POSMASK , IDL )

PDB PRBCTL ( ADFLAG , RESMASK , ONMASK , OFFMASK , POSMASK , NEGMASK )

B. Hex Input Format: PDX PropName (ByteCount/Byte2/ ... )

PART 3

!This is a sample DABBEL text file.  First, we will add some devices to the data base.
ADD T:A0TC01  ( "PIRANI GAUGE 01			", TEV)
LNAME (0,T:PIRANI_GAUGE_01_AT_A0)
LDESC ("This is the long description for the Pirani Gauge 01 at A0")
SSDNHX PRBSTS  (0001/0E19/0000/0001)
PRO PRBSTS( 1, 1, 60)
SSDNHX PRREAD  (0001/0E19/0A00/0001)
PRO PRREAD( 2, 2, 60)
LOC PRREAD ( "Transfer Gallery 2nd Floor","Rack 10456", 100.23, 751.21, -245.7)
PDB PRBSTS  (2, 0, 0, 1, 0, 0, 1)
PDB PRREAD  ("VOLT", "TORR", 0, 14, 2, 1, 1, 0,
	2.571E-03, -2.205E-02, 4.729E-03, .9391, -2.625, 0.1)
!
ADD T:A1TCQ  ("PIRANI GAUGE Q			", TEV)
SSDNHX PRBSTS  (0001/0E01/0000/0001)
PRO PRBSTS( 1, 1, 60)
SSDNHX PRREAD  (0001/0E01/0A00/0001)
PRO PRREAD( 2, 2, 60)
PDB PRBSTS  (2, 0, 0, 1, 0, 0, 1)
PDB PRREAD  ("VOLT", "TORR", 0, 14, 2, 1, 1, 0,
	2.571E-03, -2.205E-02, 4.729E-03, .9391, -2.625, 0.1)
!
ADD T: A1TC2D  ("PIRANI GAUGE 2D			", TEV)
SSDNHX PRBSTS  (0001/0E01/0001/0001)
PRO PRBSTS( 1, 1, 60)
SSDNHX PRREAD  (0001/0E01/0A01/0001)
PRO PRREAD( 2, 2, 60)
PDB PRBSTS  (2, 0, 0, 1, 0, 0, 1)
PDB PRREAD  ("VOLT", "TORR", 0, 14, 2, 1, 1, 0,
	2.571E-03, -2.205E-02, 4.729E-03, .9391, -2.625, 0.1)
!
ADD T: A1TC3R  ("PIRANI GAUGE 3R			", TEV)
SSDNHX PRBSTS  (0001/0E01/0002/0001)
PRO PRBSTS( 1, 1, 60)
SSDNHX PRREAD  (0001/0E01/0A02/0001)
PRO PRREAD( 2, 2, 60)
PDB PRBSTS  (2, 0, 0, 1, 0, 0, 1)
PDB PRREAD  ("VOLT", "TORR", 0, 14, 2, 1, 1, 0,
	2.571E-03, -2.205E-02, 4.729E-03, .9391, -2.625, 0.1)
!
ADD T: A1TC5U  ("PIRANI GAUGE 5U			", TEV)
SSDNHX PRBSTS  (0001/0E01/0008/0001)
PRO PRBSTS( 1, 1, 60)
SSDNHX PRREAD  (0001/0E01/0A08/0001)
PRO PRREAD( 2, 2, 60)
PDB PRBSTS  (2, 0, 0, 1, 0, 0, 1)
PDB PRREAD  ("VOLT", "TORR", 0, 14, 2, 1, 1, 0,
	2.571E-03, -2.205E-02, 4.729E-03, .9391, -2.625, 0.1)
!
!Now modify device T:A1TC5U so that "PIRANI GAUGE 5U" is changed to "PIRANI
!GAUGE 5Z".  Also, add another property, PRANAB.
MOD T:A1TC5U("PIRANI GAUGE 5Z")		!in a modify, all arguments are 
					!optional
COMMENT ("This is an example of a device edit-comment.  Please \
note that the comment can contain up to 255 characters")
SSDNHX PRANAB  (1/AE/A02/4)
PRO PRANAB  (2, 20, 60)			!other arguments will be default
					!values
!Change the device name to reflect the new descriptive text.
CHG T: A1TC5U(T:A1TC5Z)
!
!Change a device to add digital control
MOD Z:FUBAR
PRO PRDCTL (03, 0, "RESET", "Reset",
	01, 1, "ON", "On",
	02, 2, "OFF", "Off",
	10, 8, "PURGE", "Purge the pipe")
!
MOD Z:ACLTST       ( "ACL test device         ", CACHE ,               ,
    01FBDBDE, 0, , "Controls", "HENDRICKS" )
FNAME ( 0, Z:ACL_TEST_DEVICE )
FDESC ("This is a simple memory device for testing ACL commands.")
MACHINE ( "none")
ALMGRP ( Z:CL38A0      , FALSE)
AAMASK ("MCR+MCRCrewChief")
EMX (4000/0000/0000/0000,0000/0000/0000/0000)
SSDNHX PRANAB (000A/0000/0000/0000)
PRO PRANAB ( 2, 20, 60, 2.4000000953674, 111., 2, 4, 1, 1,
             0, 0, 1, 0, 0, 0, 0)
PRO PRAATX ( 0, 0, 0, 0, "     ", "this will not work")
SSDNHX PRBCTL (000A/0000/0000/0000)
PRO PRBCTL ( 2, 2, 60, 03, 00)
SSDNHX PRBSTS (000A/0000/0000/0000)
PRO PRBSTS ( 4, 4, 60)
! Basic Status PDB usage deprecated - see PRO PRBSSC
SSDNHX PRDABL (000A/0000/0000/0000)
PRO PRDABL ( 2, 20, 60, 00000001, 00000001, 4, 1, 1,
             0, 0, 0, 0, 0, 0, 0)
SSDNHX PRREAD (000A/0000/0000/0000)
PRO PRREAD ( 4, 16, 60)
EPR PRREAD ( 4, 2 )
PDB PRREAD ( "Unit", "Unit", 22, 6, 4, 0, 1, 0, 1, 1, , , , , 
            -1.871538668260E+38, -1.867883291192E+38)
SSDNHX PRSET  (000A/0000/0000/0000)
PRO PRSET  ( 4, 16, 60, 8C, 41, CD, CC, A0, 41, 00, 00, 00, 41, 00, 00,
             80, 40, 00, 00)
EPR PRSET  ( 4, 2 )
PDB PRSET  ( "Unit", "Unit", 22, 6, 4, 0, 1, 0, 1, 1, , , , , 
            -1.701398752450E+38, -1.698075682461E+38)
PRO PRSAVE ( 10, 0000, 0000, PRREAD, PRSET)
PRO PRDCTL ( 00000003, 0, "RESET", "Reset",
             00000001, 1, "ON", "On",
             00000002, 2, "OFF", "Off",
             00000004, 3, "POSITIVE", "Positive",
             00000010, 4, "NEGATIVE", "Negative",
             00000005, 5, "RAMP", "Ramp",
             00000006, 6, "DC", "DC",
             00000008, 7, "TEST", "Test")
PRO PRBSSC ( 1, 0, 0, 0, "ON/OFF", "On/Off", "On", GREEN:., "Off", RED:*,
             2, 0, 0, 1, "READY/TRIPPED", "Ready/Tripped", "Ready", GREEN:.,
               "Tripped", RED:T,
             4, 0, 0, 2, "REMOTE/LOCAL", "Remote/Local", "Remote", GREEN:.,
               "Local", YELLOW:L,
             8, 0, 0, 3, "POLARITY", "Polarity", "Positive", CYAN:+, "Negative",
               MAGENTA:-,
             200, 0, 0, 4, "RAMP/DC", "Ramp/DC", "Ramp", GREEN:R, "DC", YELLOW:D)
!
!
!Make another device obsolete
OBS T:A4EVUN  ("Device has been disconnected")
!
!List all devices whose name starts with 'T:A1TC'
LIS T:A1TC%
!
!List a device from the backup server
LIS M:OUTTMP BACKUP

SPECIFIC MOOC ISSUES

Analog and Digital Alarm Block Fields EVENT1 and EVENT2

Event1 and Event2 can be combined to make one 16-bit FTD for MOOC front-ends. Event1 is copied to the "clock_event_no" column in the alarm_block table, and event2 is copied to the "subfunction_code" column in the same table.

The device is read and its alarm limits checked at the specified FTD.

The default value of Event1 = Event2 = 0 means use default alarm scan rate (typically 1/3 Hz --- once every 3 seconds). An FTD is either a clock-event-indicator (0x80) in the high byte followed by a clock event number in the low byte, or a period in 60ths of one second, [0 < period <= 32767] (the highest bit must be a zero).

Alarm Block Fields SSINFOn

SSINFO1 and SSINFO2 are combined to make one 16-bit offset for the alarm reading for MOOC front-ends. Both analog and digital alarms are supported by these two fields. This offset is passed as the read offset to the device's reading method for alarms. This offset is created by the expression:

                  (SSINFO2 << 8) | SSINFO1)
So SSINFO2 is the most significant byte. On D67, SSINFO1 - SSINFO6 are called "FE system data".

If you want an offset of 0x1234 (4660 decimal), you set:

                  SSINFO1 = 0x34
                  SSINFO2 = 0x12
On D67, you set the first four digits in the "FE system data" field as 1234 (as of May 2001, that is how D67 displays it).

If you want an offset of 8, you set:

                  SSINFO1 = 8
                  SSINFO2 = 0
(or put 0x0008 into the first four digits of "FE system data" on D67)

SSINFO3 (again for MOOC front-ends) contains a type-code indicating the data type of the device reading for the front-end alarms software. This field applies only to analog alarms. Current allowed values include:

                  signed integer            1
                  unsigned integer          2
                  float                     3
                  swapped float             4 (typically only for Frig)
                  swapped signed integer    5
                  swapped unsigned integer  6
If a value of zero is set, then the front-end will determine the data type based upon information supplied by the MOOC device driver software. This type will then usually get forwarded to the central database.

Multiple Alarm Blocks

One cannot use the multiple alarms mechanism to select different FTDs and offsets for the same alarm device.

One should always have the same FTDs, offsets, and types in each of the multiple alarm blocks for a device.

EMBEDDED TEXT FORMATTING IN ALARM TEXT

Alarm text (digital or analog) may contain embedded formatting directives which are patterned after those used with the VMS $FAO system service. In processing these formats, the data to be converted to text will be taken from the EMC and parameter blocks of the Event Report Packet (ERP). A formatting directive consists of a single exclamation mark "!" followed by a 2-character code. Two exclamation marks (i.e. "!!") will insert a single exclamation mark into the output text.

The formatting directives either convert the current parameter to text in the output, or select the value to be used as the current parameter for the next formatting directive. Unrecognized formatting directives will be left unchanged in the output text. Similarly, if the parameter block is exhausted before all the conversion directives are processed, they will not be replaced in the output text.

Parameter Selection Directives

These directives temporarily override normal parameter value selection. The normal condition is that the current parameter on the parameter block is used as the value for a conversion directive. After processing the directive, the next parameter in the block is selected to be the new current parameter. The conversion directive itself determines the size of the current parameter and thus the location in the parameter block of the next parameter. Initially, the first parameter starts with the first word of the parameter block.

A parameter selection directive will temporarily replace the current parameter with a value selected from elsewhere for the next encountered conversion directive. After that directive is processed, the previous current parameter (before the parameter selection directive) is retained as the current parameter.

The recognized parameter selection directives are as follows:

!RD use reading (in ERP) as current parameter

!Un use as the value the datum (byte, word, longword) starting with byte number 'n' (0-7) of the EMC

!UH use house code from the EMC as current parameter

!UN use front-end node number from EMC as current parameter

The "parameters" selected by these directives are interpreted according to any following conversion directives as far as field size goes. Thus the "!RD" and "!Un" parameters can be interpreted as a byte, word, or longword as desired (except when referring to EMC bytes near the end -- !U7 must always be a single byte field). The !UH parameter should be interpreted as a byte, while the !UN parameter should be interpreted as a word by any conversion directives paired with these selection directives.

Conversion Directives

The usual form of a conversion directive converts a binary numeric value into text. The 2-character conversion directive code of the form "!bs" where "b" is the binary conversion code and determines the format of the output text and "s" the size of the input parameter. The recognized sizes are "B" for byte, "W" for word, and "L" for longword (32 bits).

The recognized binary conversion codes are as follows:

O zero-filled octal

X zero-filled hexadecimal

Z zero-filled unsigned decimal

U blank-filled (or suppressed) unsigned decimal

S blank-filled (or suppressed) signed decimal

The default field widths for the zero-filled conversions are given by the combinations of the parameter size codes and the binary conversion codes as the correct size required to hold all the text. The "blank-filled" binary conversion actually suppress the blanks in the output text. The recognized conversion directives are thus:

!OB !OW !OL

!XB !XW !XL

!ZB !ZW !ZL

!UB !UW !UL

!SB !SW !SL

!3E sets the next floating point conversion (!FE or !FP) to use IEEE format. Normally, floating point values are assumed to be in DEC format.

!FE converts a 32-bit parameter containing a floating point value into text using FORTRAN E-format notation (10 characters).

!FP converts a 32-bit parameter containing a floating point value into text ( 6 characters).

!HC converts the current parameter (assumed to be a house-code byte) into a 2-character house name.

!LN converts the current parameter (assumed to be a logical trunk/node word) into an ACNET node name (up to 6 characters).

!TX interprets the parameter as a text field (text parameter format), and copies to output

Combined Function Directives

The following directives combine the actions of parameter selection and conversion:

!AB replaced by the text "ABORT" if the AB bit is set and the AI bit is clear in the Event Status Word.

!GB replaced by the text "GOOD" or "BAD" depending upon the state of the GB bit in the Event Status Word.

!HL replaced by the text "HIGH" or "LOW" depending upon which of the HI and LO bits are set in the Event Status Word. If neither bit is set, then the directive is replaced by NULL (no) text. If both bits are set, the text "HILO" is used.

!RC replaced with the reading converted to common units in the preferred format as determined by the PDB of the reading.

!RP replaced with the reading converted to primary units in the preferred format as determined by the PDB of the reading.

!UT replaced with the units text from the previous !RC or !RP directive.

!! replaced with a single "!".

Other actions, such as using a house code from the EMC to place the house name in the text, are gotten by using a pair of directives (i.e. "!UH!HC").

GUIDE TO THE DABBEL COMMAND

DABBEL is controlled by an input file which is created by the user in his (or her) own Linux disk directory. This file is then submitted for processing via the 'dabbel' command (at shell level). The input file may not have the file type "lis". No input file is needed, however, in quick-listing mode.

The DABBEL program usually creates a listing file having a default filename identical to the input filename, and a default file type of "lis". This file is written in the same disk directory as the input file, and it contains all error and status messages. It also contains any list output which was generated by the LIS command verbs. As an option (--stdout), the listing file will be directed to STDOUT. normally the terminal.

Only authorized users will be permitted to modify or list the database. Using DABBEL in Syntax-Checking-Only mode, however, does not require any authorization. Please contact either Brian Hendricks or Glenn Johnson if you are denied access to DABBEL.

The DABBEL command has the following syntax:

$ dabbel input_file_specification qualifier

Where:

The input_file_specification is the required input file which must exist in the user's default disk directory. It should not contain any device or directory specification. If this parameter is missing, some help text will be displayed.

The optional qualifier must be one of the following keywords:

syntax (default): process the input file directly in syntax-checking-only mode. No connection will be made with the central database.

modify: process the input file with connection to the central database. Database modifications are permitted. The user will be notified when this task has been completed.

list: same as modify, except that the database cannot be modified (only LIS and LSX command verbs will be honored).

Other optional paramters may follow syntax/modify/list:

--prop: specify properties for selective listing (see below)

--stdout directs listing output to stdout instead of a file

If the user issues the DABBEL command without any parameters, the Dabbel program will be entered in dialog mode, with the DBL> prompt. In dialog mode, the user can issue any Dabbel command (without the leading "dabbel" verb), and one is able to issue multiple successive commands with the first parameter normally being the input file specification. To exit from dialog mode, simply enter "q", "quit", or Cntrl-D.

Selective Listing of devices is triggered by the --prop qualifier in which the user can specify one or more properties to be listed. This is most useful for those situations in which one desires to modify a single property by first listing the device. After editing the output listing, the resultant file can then be re-submitted to Dabbel in "modify" mode. This keeps the Dabbel input file simple and free of those properties not being changed.

The use of the --prop modifier is best illustrated by a couple of examples. "--prop:prread" will list the reading property only. Multiple properties can be provided, as in "--prop:prread:prset". In selective listing mode, the initial MOD line will contain only the device name unless one of the following properties are specified: prnode, prsibl, prtext, prcbdi, or pralst.

Selective listing can be further refined to display only the PDB commands for both the Reading and Setting properties. This is done with the "pdb" pseudo-property as in "--prop:prread:prset:pdb". Note that the "pdb" pseudo-property does nothing unless it is accompanied by "prread" or "prset". Alternatively, selective listing can be refined to eliminate the PDB commands via the "nopdb" pseudo-property. For example, "--prop:prread:nopdb" will display everything for the reading property except its PDB. If both "pdb" and "nopdb" are specified, no error will be generated, but "nopdb" will take precedence.

The Quick-List capability permits the user to list a single device without creating any input file, with the output going automatically to 'stdout'. Examples of valid quick-list commands:

dabbel list m:outtmp
dabbel list m:outtmp backup
dabbel lis m:outtmp --prop:prread:prset
dabbel lsx m:outtmp

For help, the user can enter "h" or "help" as the single command parameter.

TIPS AND SUGGESTIONS

Error Recovery

If running DABBEL in MODIFY mode and an error occurs, the database may have been modified by those "device batches" which preceded the batch causing the error. The listing file will clearly indicate which devices were successfully modified. Before re-submitting the DABBEL input file, it is important that the user delete those lines from the beginning of the file which were successfully executed on a previous run.

Dabbel Output Area (DABOUT)

Each Dabbel user has an assigned output area which will contain a variety of files related to a Dabbel run. These files are mainly useful to the Dabbel maintainer and database administrators. Each file name consists of a date-time plus extension. For example: 2018_08_16_11_DST_58_53.out. The path to this disk area is as follows: /usr/local/userb/dabbel/username (where 'username' is your user name)

The various file extensions are as follows:

.err    Contains error information if there was an error
.out    Contains those portions of the user's input file which were
        successfully processed in "modify" mode.
.inp    Contains a copy of the user's input file if there was an error
        detected, and the user specified "modify" in his or her invocation.
.log    Contains a log file which contains detailed run information

Security, Privacy, Legal