[SLAC Controls Software Group [SLAC Controls Department] [SLAC Home Page]

Go to bottom of page



4.1 PANEL DESCRIPTION CODE . . . . . . . . . . . . . . 4-1

4.1.1 Syntax . . . . . . . . . . . . . . . . . . . . . 4-1

4.1.2 Function Codes . . . . . . . . . . . . . . . . . 4-2

4.1.2.1 SCRIPT . . . . . . . . . . . . . . . . . . . . 4-2

4.1.2.2 BUTTON . . . . . . . . . . . . . . . . . . . . 4-3

4.1.2.3 SWITCH . . . . . . . . . . . . . . . . . . . . 4-6

4.1.2.4 SELECT . . . . . . . . . . . . . . . . . . . . 4-7

4.1.2.5 SHADOW . . . . . . . . . . . . . . . . . . . . 4-8

4.1.2.6 ASSIGN . . . . . . . . . . . . . . . . . . . . 4-9

4.1.2.7 DEASSN . . . . . . . . . . . . . . . . . . . 4-10

4.1.2.8 SPAWN . . . . . . . . . . . . . . . . . . . 4-10

4.1.2.9 NEWSCP . . . . . . . . . . . . . . . . . . . 4-11

4.1.2.10 UNSPWN . . . . . . . . . . . . . . . . . . . 4-12

4.1.2.11 Continuation Line . . . . . . . . . . . . . 4-12

4.1.3 Special Cases . . . . . . . . . . . . . . . . 4-13

4.1.3.1 INDEX . . . . . . . . . . . . . . . . . . . 4-13

4.1.3.2 RETURN . . . . . . . . . . . . . . . . . . . 4-13

4.1.3.3 HELP . . . . . . . . . . . . . . . . . . . . 4-14

4.1.3.4 PRINT . . . . . . . . . . . . . . . . . . . 4-15

4.1.3.5 VERSATEC . . . . . . . . . . . . . . . . . . 4-15

4.2 ALTERNATE TOUCH PANEL SELECTION . . . . . . . . 4-15

4.2.1 Functional Description . . . . . . . . . . . . 4-16

4.2.1.1 Selective Panel Replacement . . . . . . . . 4-16

4.2.1.2 Complete Panel Replacement . . . . . . . . . 4-17 CHAPTER 4 SLC TOUCH PANEL CONTROL The primary control interface on the SLC control system is a flexible touch panel system. The touch panel is a transparent screen capable of sensing the position of an operator's fingers, and it is backed up by a general purpose monochrome CRT display. This note describes the coding that generates panels and how user software interacts with the screen and the touch panel. Each panel is generated interpretively from a fixed format text file. These files are located in SLCPNL: and have data type PNL. A logical name facility is used to clarify the correspondence between functions on the panel and data in the user code. Section 1 describes this fixed format Panel Description Code.

4.1 PANEL DESCRIPTION CODE

4.1.1 Syntax The panel description code is line oriented with fixed fields. A C,c, or ! in column 1 indicates a comment line and the remainder of the line will not be scanned; a > in column 1 indcates a continuation line (see below). Blank lines are treated as comments. Columns 1-6 are


SLC TOUCH PANEL CONTROL Page 4-2 for the symbolic function code, and column 7 must be a colon (:). Column 8 must be blank ( ). The remaining fields are fixed length fields separated by commas (,) for legibility. The next two fields are the screen coordinates X,Y for all function codes. The coordinate system is such that X and Y are one decimal digit numbers with 0,0 being the lower left corner of the screen, and 7,7 being the upper right corner. Thus the general syntax is: FUNCTN: X,Y,function-dependent fields

4.1.2 Function Codes The function codes defined are used to write text on the screen (SCRIPT), define a logical push button (BUTTON), define sets of buttons so that 'pushing' one button of the set 'clears' other members of the set (SWITCH), and define buttons that cause another panel to be selected (SELECT). There are also additional functions to define a location on a panel for writing extra messages (SHADOW), to assign a knob (ASSIGN) or to deassign all knobs (DEASSN), to spawn a DCL command string (SPAWN ), to chain to another SCP (NEWSCP), or (in a future release) to execute a file of button pushes (EXECUT).

4.1.2.1 SCRIPT - The syntax of the SCRIPT function is: SCRIPT: X,Y,Options___________,Text____________________________________


SLC TOUCH PANEL CONTROL Page 4-3 Options may be used to specify the size or vertical position of the text string, or it may be omitted. Size may be LARGE, in which case the Text will be displayed in characters each 3.0% of the screen raster width. Otherwise the character size will be 1.5% of the raster width. Note that the maximum number of text characters is 40. Position is specified by the string LINE=n, where n is a line number describing the vertical position of the Text with respect to the button coordinates. The lines are numbered from 1 to 4 beginning at the top of the space specified by the coordinates. On a CALF, lines 3 and 4 are both displayed on line 3. The default position for LARGE text is line 2; for normal text it is line 4, the last line. Examples of valid SCRIPT commands are: SCRIPT: 0,7,LARGE,LINE=4 ,INDEX PANEL SCRIPT: 3,5,LINE=2 ,CONTROL FUNCTIONS

4.1.2.2 BUTTON - The syntax of the BUTTON function is: BUTTON: X,Y,Label_____________,Btn_name,Var_name,Sbr_name,Dsp_name,I Label is a text field up to 18 characters long that is written in the button in 6 character lines. Note that the size of the buttons is such that 4 lines of 1.5% characters will fit inside the button outline. The last line is reserved for text that may be generated from the user code.


SLC TOUCH PANEL CONTROL Page 4-4 Btn_name is a symbolic name which is used to identify the button independently from its X,Y coordinates. It should be unique on the panel. All of the following fields are optional, in the sense that they may be coded as blanks. All of the fields of the form xxx_name are 8 characters long. If any of the fields Var_name, Sbr_name, or Dsp_name are coded, then they must be declared to the logical name services in the user initialization code. (The logical name services are described in the chapter on Applications structures.) If Var_name is coded, then when the button is pushed, the location corresponding to the logical name Var_name will be loaded with the text string Btn_name. Note that the location should be long enough to receive the text string. This feature allows the user code to determine which button was pushed by examining the contents of the location associated with Var_name. If Sbr_name is coded, then the subroutine associated with Sbr_name (by a call to LIST_CALL) is called. This feature allows any user subroutine to be called when a button is pushed. Alternatively, if Sbr_name corresponds to a group, (ie if the association was made by a call to LIST_GROUP) then the group will be scheduled for execution. If Dsp_name is coded, then the display associated with Dsp_name (by a call to LIST_DISP) will be added to the display tables maintained by the display executive DEXEC. In general, the display will appear when DEXEC is called on behalf of a group for which this display is valid. Note that one could code the DEXEC group or any other group in the Sbr_name field and that this could cause the display to be immediately
SLC TOUCH PANEL CONTROL Page 4-5 generated. The I field is used to determine the action taken when the panel is newly loaded. If the I field is blank, then no special action is taken. If the I field is asterisk (*), then if a Sbr_name is coded, the corresponding subroutine will be called. The subroutine may determine that this is an initialization call by examining the variable PNL_NEW in the common block PNL_DATA. The common block declaration may be found in the include file PANEL. PNL_NEW is a logical variable; if true, the panel initialization is in progress. Where a continuation line is required, the I field must be coded ONLY on the continuation line. Warning: To initialize a panel, a subroutine must have been declared by a call to LIST_CALL. It cannot be a Group or a Display. The subroutine can ONLY write to button locations that have been defined on the current or previous lines of the panel file. Examples of valid BUTTON commands are: BUTTON: 0,4,DISPLYMAGNET ,MAGDALL ,MGNTDISP,DEXEC ,MCTLDISP This command generates a button at position 0,4. The button has a label which is DISPLY on the first line, MAGNET on the second, and the third line is blank. The logical button name is MAGDALL , and the variable corresponding to MGNTDISP will be loaded with the string 'MAGDALL ' when the button is pushed. Thus the display routine MCTLDISP can generate the MAGNET display by steering on the contents associated with MGNTDISP. Furthermore pushing the button will schedule the group DEXEC to call the display routine MCTLDISP and
SLC TOUCH PANEL CONTROL Page 4-6 generate the display. No action is taken when the panel is loaded. BUTTON: 1,1,FIRE ALARM ,FIREALRM, ,FIRE This command generates a button at position 1,1 labeled FIRE ALARM. When the button is pushed, the subroutine associated with the logical name FIRE is called. No other action is taken (by the panel code!). BUTTON: 3,6,SCALE FACTOR ,BPMOSCAL,BPMOPARM,BPMUNITS, ,* This command generates a button at position 3,6 labeled SCALE FACTOR. When the button is pushed, the button name string 'BPMOSCAL' is loaded into the variable associated with the logical name BPMOPARM. Then the subroutine BPMUNITS is directly called, presumably to prompt for the scale factor over the terminal dialog system. Then the subroutine can write the scale factor value onto the fourth line of the button using the routine PNLWRIT referring to the button by its symbolic name BPMOSCAL. When the panel is loaded, BPMUNITS will be called with the initialization flag PNL_NEW set, so it can call PNLWRIT with its current value of the scale factor. Note that BPMUNITS uses the flag to avoid calling the terminal dialog routines. Note also that at initialization, BPMOPARM will be loaded with 'BPMOSCAL' as if the button had been pushed.

4.1.2.3 SWITCH -


SLC TOUCH PANEL CONTROL Page 4-7 The syntax of the SWITCH function is: SWITCH: X,Y,Label_____________,Btn_name,Var_name,Sbr_name,Dsp_name The fields of the SWITCH function are identical to those of the button function except that there is no Initialization option. All the other fields have the identical meaning. The difference between SWITCH and BUTTON is that SWITCH is intended to group sets of SWITCHes that have the same Var_name. When a switch is pushed, the system will mark that SWITCH with a bar on the fourth line of the button. Simultaneously, any other SWITCH with the same Var_name will have its bar removed. This lets the 'exclusive or' or 'auto radio push button' function be implemented without user level code. Initialization is automatic. If no SWITCH has been pushed, then no bars will be drawn. If a SWITCH has been pushed, then its bar will be drawn, even when the panel is reloaded.

4.1.2.4 SELECT - The syntax of the SELECT function is: SELECT: X,Y,Label_____________,Pnl_name,Var_name,Sbr_name,Dsp_name Pnl_name is an 8 character field, and is coded with the VMS file name of a new panel to be selected. Pnl_name does NOT include the filetype or the period (.) of the VMS file structure. Pnl_name must be coded when using the SELECT function.


SLC TOUCH PANEL CONTROL Page 4-8 All the other fields have the same meaning as they do in the BUTTON or SWITCH commands. If coded, the location associated with Var_name will be loaded with the text string Pnl_name. Thus it is possible for user code to determine what panel has been loaded by examing Var_name, and it is possible to call a subroutine when a panel is selected by coding Sbr_name, etc. Examples of valid SELECT functions are: SELECT: 7,7,INDEX ,INDEX This function will select the index panel. It is recommended that most panels include this function at this X,Y position. SELECT: 0,4,NETWORK ,NETWORK , ,DEXEC ,DBEXDISP This function will select the NETWORK control panel. In addition, it will insert the DBEXDISP display into the DEXEC tables, and request the scheduling of DEXEC to generate the display. Thus the Network status display will appear automatically when the NETWORK panel is selected.

4.1.2.5 SHADOW - The syntax of the SHADOW function is: SHADOW: X,Y,Label_____________,Btn_name,Var_name,Sbr_name,Dsp_name,I All of the indicated fields are identical in usage with those of the BUTTON command. The purpose of the SHADOW function is to provide a


SLC TOUCH PANEL CONTROL Page 4-9 null, or shadow, button that is not drawn on the panel. If a Label is supplied, it will be formatted on the panel without the surrounding box drawn for Buttons. Its use is to provide arbitrary symbolic locations on the panel which can be used in conjunction with the routine PNLWRIT, or to allow any of the initialization functions to be performed when a panel is loaded without associating those functions with another button. Warning: Only buttons which have been declared on the current or preceding lines of the panel file may be initialized.

4.1.2.6 ASSIGN - The syntax of the ASSIGN function is: ASSIGN: x,y,Label_____________,Name___n,Var_name,Sbr_name,Dsp_name Name___n is an 8 character field where the first 7 letters are arbitrary and the last letter contains the number of the button to be assigned. Sbr_name is the subroutine to be associated with the knob. The other fields indicated have the same meaning as they do in the BUTTON command. When the button is pushed, the button driver decodes the Ascii string containing the Knob number to be assigned from the last character of the button name. If the last letter does not contain a knob number, the user is prompted to type in the number desired. The button driver then calls Knob_assign with the Knob number and the subroutine name found in the Sbr_name field of the button definition. If Sbr_name is


SLC TOUCH PANEL CONTROL Page 4-10 not coded, the knob will be associated with the last subroutine name deposited in the panel variable KNOBTYPE. An Example of a valid ASSIGN function is: ASSIGN: 4,0,MAGNETADJUSTKNOB 0,MAGTWK 0, ,MAGTWK This function will assign Knob 0 to the Magnet Adjust function which is serviced by the subroutine MAGTWK.

4.1.2.7 DEASSN - The syntax of the DEASSN function is: DEASSN: x,y,Label_____________,Btn_name All the fields indicated have the same meaning as they do in the BUTTON command, where Label would typically be 'DE- ASSIGNKNOBS ' or perhaps 'CANCELKNOBS '. When the button is pushed, the button driver simply makes a call to Knob_deassign for each of the four (or eight) knobs.

4.1.2.8 SPAWN - The syntax of the SPAWN function is: SPAWN : X,Y,Label_____________,Btn_name,Command ______________________ The SPAWN function is used to spawn a single DCL command and return to


SLC TOUCH PANEL CONTROL Page 4-11 the current panel. Example: SPAWN : 6,6,CAMAC COMMANDS ,FRED ,CAMCOM This function will spawn a process which executes the pseudo-DCL command CAMCOM.

4.1.2.9 NEWSCP - The syntax of the NEWSCP function is: NEWSCP: X,Y,Label_____________,Pnl_name,Command__________________ This function is similar to SELECT, but rather than simply selecting a new panel, an entirely new SCP process is spawned. X, Y, Label, and Pnl_name have the same meanings as for SELECT. Command is any legitimate DCL command NOT including the $ sign. Example: NEWSCP: 6,6,MODEL INDEX ,MODLINDX,RUN/NODEBUG SLCSYS:MODELS This function will spawn the process SLCSYS:MODELS.EXE. MODELS is itself an SCP program and will select as its first panel MODLINDX. If MODELS terminates due to an error, or by selection of the INDEX panel, control will return to the parent SCP, and the INDEX panel will be selected. If MODELS terminates through the pushing of an UNSPWN button (see below), the panel specified by the UNSPWN function will be selected.


SLC TOUCH PANEL CONTROL Page 4-12

4.1.2.10 UNSPWN - The syntax of the UNSPWN function is: UNSPWN: X,Y,Label_____________,Pnl_name, This function is the inverse of the NEWSCP function, and is used to return from a spawned SCP process, requesting the specified Pnl_name panel to be selected by the parent SCP. Example: UNSPWN: 6,6,RETURN TO FRED ,FRED , This function terminates the current (daughter) SCP. The parent SCP then selects the panel FRED.

4.1.2.11 Continuation Line - In some cases it is desireable to assign values to more than a single variable with a single button. The continuation line may be used to assign values to up to 3 additional variables. Only one continuation line may be used for any button. The syntax of the continuation line is: > VAL1NAME,VAR1NAME,VAL2NAME,VAR2NAME,VAL3NAME,VAR3NAME,I The pairs (VALxNAME,VARxNAME) act in the same fashion as the pair (Btn_name,Var_name) for normal functions, i.e. the value VALxNAME will be be placed into the variable corresponding to the logical name VARxNAME whenever the button is pushed. If the button is to be


SLC TOUCH PANEL CONTROL Page 4-13 initialized when the panel is drawn, the I field MUST be coded on the continuation line ONLY and not on the first line.

4.1.3 Special Cases Most panels should provide for the following universal buttons

4.1.3.1 INDEX - SELECT: 7,7,INDEX ,INDEX This button, conventionally located in the upper right-hand button position, returns the user to the master index panel. (See the section on Alternate panels for a means of substituting private panels for the canonical version).

4.1.3.2 RETURN - SELECT: 6,7,RETURN ,RETURN The panel name RETURN is handled specially by the software, and results in the calling of the panel from which this panel was selected. It is implemented as a stack, where each panel that is called by name is added to the stack and each RETURN unwinds the stack. A call to INDEX automatically resets the stack.


SLC TOUCH PANEL CONTROL Page 4-14

4.1.3.3 HELP - BUTTON: 5,7,HELP ,HELP ,HELP_KEY The button name HELP is treated specially by the software, and displays topics or subtopics from the DISPHELP help library. The system is designed so that the panel author should never need to specifically program HELP functions, but rather need only document the panel in the HELP library. The help button operates in toggle mode: when set, pushing other buttons on the panel results in HELP information on individual buttons being displayed. When reset, the buttons perform their normal functions. Help is reset whenever a SELECT button is pushed. Panel authors should prepare a help module for each panel using the following recipe: o The primary topic should be the panel name. In the case where several panels can use the same Help information, a Help_key may be coded and will be used as the primary topic. o SELECT buttons need no further documentation since they will reset the Help flag and select a new panel. o SWITCH buttons should have a subtopic with the name of the switch variable (not the button name) so that all buttons of a single variable need be documented only once.


SLC TOUCH PANEL CONTROL Page 4-15 o BUTTON buttons (or any other pushable button) should should have a subtopic of the button name.

4.1.3.4 PRINT - BUTTON: x,y,PRINT ,PRINT ,DXMODE ,DEXEC This button (using the standard panel protocol) prints a (previously selected) alphanumeric display on the line printer. If the display contains several pages of which only one is visible on the color monitor, all pages will be output to the printer.

4.1.3.5 VERSATEC - BUTTON: x,y,VERSA_TEC ,VERSATEC,DXMODE ,DEXEC This button plots a (previously selected) graphic display on the Versatec plotter.

4.2 ALTERNATE TOUCH PANEL SELECTION To fully utilize the capability of running multiple images of the SLC Control Program (SCP), provision is needed for the selection of alternate (software) touch panels without resulting panel anarchy: i.e. the production version of SCP panels should not be amenable to changes by casual users for developmental or frivolous purposes. Instead, a scheme of panel democracy is needed, in which alternate


SLC TOUCH PANEL CONTROL Page 4-16 versions of panels can be used without extensive changes in SCP code. The objective here is to provide for two areas in which alternate panels are required: o Maintenance panels: We anticipate use of the SCP by non-operator and non-software personnel for maintenance purposes. For this application one uses a subset of the full SCP system but runs the same production version image. Here it is desireable to use an alternative INDEX panel containing options relevant only to the specific maintenance task required, in order to keep the panel structure as simple as possible. o Developmental code: For developmental purposes one frequently needs to modify existing panels or add new ones. A simple scheme is needed to accomplish this without altering production versions of existing panels. (Note: In many cases, it is sufficient to add a button to the Development Panel to access the new panel being debugged.)

4.2.1 Functional Description Two mechanisms are provided for invoking alternate panel versions by specifying additional parameters on the SCP startup command. If several parameters are supplied, they MUST be separated by commas.

4.2.1.1 Selective Panel Replacement -


SLC TOUCH PANEL CONTROL Page 4-17 For developmental purposes the user may specify up to 5 (an arbitrary number) standard panels to be replaced by private panels. This is accomplished by specifying the OLD_NAME=NEW_NAME as a job parameter: e.g. SCP INDEX=ALTINDEX will use the panel SLCPNL:ALTINDEX.PNL as the INDEX panel. This INDEX panel may invoke non-standard (private) panels and/or may contain only a subset of the production version INDEX panel. Note: An INDEX panel must NOT contain either SWITCHes or BUTTONs to be initialized using the I field.

4.2.1.2 Complete Panel Replacement - Provision is also made in the job parameter to allow for complete replacement of all panels by specification of a default (sub-)directory from which panels are obtained: e.g. SCP [User] will obtain all panels from the directory [User]. A file [User]INDEX.PNL must then exist containing the initial INDEX panel to be used (or [User]ALTINDEX.PNL if an alternate INDEX panel has also been specified). In this mode the user may copy production versions of all panels to his own account, and modify, delete, or add whatever panels he wishes.


 
Go to top of page
Contact (until Aug. 15, 1996): Jeffrey Miller
Owner: Bob Sass

Converted from VAX Runoff output using doc2webset.pl