RONALD: A Script Reader<P> Software Release Note 43.2

RONALD: A Script Reader

Software Release Note 43.2

William S. Higgins

Introduction

The purpose of the program RONALD is to create and execute ``script'' files which hold commands for setting EPICURE devices to various values. It is a menu-driven application with a user interface based on Jack Schmidt's skeleton program. Script files have the extension ``.ESF'' (for ``Epicure Script File'').

Input File Format

Three kinds of operations are permitted. The first is the setting of a device to a numeric value; this is commanded by the verb SET. The second command, MULTISET, performs four SET operations on a device with a fixed time delay between them. The third is the setting of control bits such as ON/OFF, OPEN/CLOSED, or DC/RAMP; this is commanded by the verb CONTROL. (It is possible that other verbs will be added to the program in further development.)

The command syntax is:

verb devicename value
where ``verb'' is one of the words SET, MULTISET, or CONTROL, and ``devicename'' is a device in the EPICURE Device Database.

SET Command

SET devicename numeric_value
In the case of the SET command, ``numeric_value'' is a number.

MULTISET Command

MULTISET devicename numeric_value 
MULTISET issues four SET-like commands, with an 8-second delay between them. Command processing waits until the last command is complete; since there are four commands and three delays between them, this command will take about 24 seconds to execute. It is useful for such devices as valves or small children, which need to be told several times what to do. Users should cultivate the virtue of patience.

The MULTISET command may be abbreviated to MUL.

CONTROL Command

CONTROL devicename Boolean_value

``Boolean_value'' is the name of a Boolean control value, from the set:

ON OFF POS NEG  RAMP DC RESET OPEN CLOSE

Abbreviating CONTROL to CON is acceptable.

Comments

Comments may be included within the script file. A comment line must have an exclamation point in its first column:
! This is a comment line. 
The rest of the line is ignored.

I recommend that users create RONALD script files with a standard header. The header consists of several lines, each of which begins with an exclamation point (the comment character). Blanks are left for the name, author, date, and purpose of the script file; the file's author is encouraged to fill them in.

! Script name:
! Date:                     Author:
! Purpose:

Menu Bar Options

When RONALD begins, it displays a menu bar at the top of the screen and places the cursor in a corner of the ``work area'' beneath the menu bar.

To choose an option, the user hits the ``DO'' key on his terminal-which moves the cursor upstairs into the menu bar-and moves among the options with the left and right arrows. Hitting ``Return'' causes RONALD to take the action represented by the selected option.

Text typed in the work area will be echoed on the screen, but will be ignored by RONALD except when it is a response to a prompt.

Edit Options

Files may be created or modified using the familiar EDT editor. Existing File prompts the user to type the name of a file. Only the filename, with no extension (as in FILENAME.EXTENSION), should be typed here. RONALD will append the extension ``.ESF'' to the requested filename. After this happens, the EDT editor is invoked and the file is opened. New File prompts the user for the name of a new file, then calls EDT with that filename. Upon EXITing or QUITting the EDT session, the screen is updated.

EDT tips: To include the contents of another file (for example, one named FILENAME.ESF) in the file you're editing,

Keypad [PF1], then keypad [7]        (which yields the prompt ``Command:'') 

INCLUDE filename.ESF (then hit)

keypad [ENTER] (Hit [ENTER], not [RETURN]!)

The SECTION key (keypad [8]), used in conjunction with the ADVANCE and BACKUP keys (keypad [4] and [5]), is convenient for scrolling through large files.

If you are confronted with the asterisk (*) prompt, then EDT is in its line-editing mode. Type ``c [RETURN]'' to enter screen-editing mode. Control-Z will send you back to line-editing mode again.

Execute Options

File Directory writes in the work area a list of files on the default directory which have the `` .ESF'' extension. If there are more files than will fit on the screen, the screen will fill with 40 filenames in two columns, then filename 41 will ``wrap around'' by overwriting filename 1, and listing will continue from there. Change Directory allows the user to specify a different default directory.

Execute Script prompts the user for the name of a script file, then executes the commands in that file.

Command line text is printed to the screen as commands are executed. After 18 lines have been printed, the lines begin at the top of the screen again.

Your node should also be running DARSERVER to make RONALD work. To check on this, do a SHOW SYSTEM at the DCL level. One of the ``Process Names'' you see should be DARSERVER; if not, RONALD won't execute commands on your machine. (But it will still allow you to edit script files.)

When the execution runs into trouble, error messages may appear on the screen. It is helpful to know what errors we're getting in order to track down problems; users are encouraged to jot error messages down and report them to me at WARNER::HIGGINS.

Preview Options

One pulldown choice is offered: PREVIEW A FILE. This item will prompt the user for a filename, then invoke EDT with NOWRITE (read-only) options, so that the user can read but not modify the file. Once you are done previewing the file, you should type the QUIT command to leave EDT, not the EXIT command. Using EXIT will only bring the complaint ``File specification required.'' This means that, though you are not allowed to modify the input file, EDT thinks you want to save its contents to some other file, and gets grumpy about it. Use QUIT and avoid this nuisance. (Choosing PREVIEW A FILE displays a message that reminds you.)

Print Option

Well, this doesn't actually print out your screen. As is standard in EPICURE applications, selecting Print sends a screen image to a file in the default directory called RDCS_PRINT_DEVICE.LIS, which you can print out after you leave RONALD.

Exit Option

Choosing this item from the menu bar exits RONALD. Typing control-Z will also precipitate an exit.


Security, Privacy, Legal

rwest@fsus04.fnal.gov