HOW TO CREATE A NEW DISPLAY 

To create a new display, you must use the BUILD command word followed by the 
name you want to give to the new page. This name may use any combination of 
letters, @,#,$,%,_ and numerals and may contain up to 10 characters.

Example:BUILD FORM1[cr]

Will create a new page called "FORM1".

Each display must be assigned a unique name. RTES will not allow a display to be 
created with a name that has already been used for a display. That name, however, 
may also identify other entities such as variables and tasks.

For example, the display FORM1 may be created if there is a register called 
FORM1 in the current database, but may not be created if there already is a display 
called FORM1.

When you enter a valid BUILD command, the system clears the portion of the screen 
reserved for the display and the system is ready for the preparation of that display. 
Proceed as indicated in "Editing a display".

Access Level: 3

HOW TO MODIFY A DISPLAY

When a display already exists, you may change it in EDIT mode. Simply display the 
page using the PAGE command word followed by the display name. This puts the 
selected page on the screen.

Example:PAGE FORM1[cr]

Then enter EDIT[cr] or simply [alt-E]. The system indicates on the top right hand 
corner of the screen what you are editing. The cursor moves to the top left hand 
corner of the display (line 4 column 1). You may now proceed with the editing.

Access Level: 3

CHANGING THE COLOR

The word COLOR on the top line of the screen show which foreground and 
background colors are currently selected. You may change those colors with the 
following keys:

F1 change the foreground color

F2 change the background color

F3 return to the default (white on black)

There are 8 colors to choose from. Whenever you press F1 or F2, the next color is  
selected.

Note that some combinations may cause the word color (and the text you would be 
typing) to be invisible (black on black, red on red, etc.)

HOW TO CHANGE THE NAME OF THE DISPLAY

When you edit a display, the name of the display being edited is shown at the top right 
hand corner of the page preceded by the word "Editing".

If you press [alt-N], the name of the display is highlighted and the cursor moves to 
the first character of the name.

You may then change the name to another unique name, by inserting, replacing or 
deleting characters. After you have composed a new name, press [cr] to enter the 
change.

If the system rejects the proposed name, you remain in the name editing sub mode. If 
the name is accepted, then the system automatically returns you to page editing.

You may also abandon the name editing sub mode by pressing the [Home] key

HOW TO SHOW VARIABLES ON A DISPLAY

To put a variable in a display you must first assign a name to it using the database 
editing facility.

Move the cursor to the location where you want to show the variable. That position 
will be the left most or bottom position occupied by the dynamic value or status.

Press [alt-V]. This causes a prompt to appear at the bottom of the page. The prompt 
(VARIABLE AT LINE y, COL x ]), indicates the selected coordinates and waits for 
a variable specification.

You then type the variable definition using the following format:

name/access type spec color[cr]

name is the name of the variable to be displayed.

/access is an option that allows function key control.

type is an identifier that selects the method of representation. You may use : BINARY, NUMBER, LZI, REAL, HGRAPH, VGRAPH, LIST, TEXT, VCA, HCA

spec is a further specification that varies with the type you have selected.

color specifies the color attribute to be used for display. This parameter may be a 
constant or the name of a variable that will evaluate to the color attribute. The color 
attribute is the decimal value of a binary mask that defines the foreground color, 
background color, intensity and blink. Refer to the HCA/VCA type below for the 
details of the relationship between the value of this attribute and the color it 
produces.

The only parameter that is necessary is "name". All the others are optional, as will 
be shown below, and are defaulted if omitted.

If / is not present, function key control (arrow up/down, F7/F8) is not allowed on the 
variable. If / is present, you may append to it the name of an access variable, in which 
case the function key control will be allowed if and only if that access variable is 
TRUE. If / is used without the access variable, then function key control will be 
allowed unconditionally.

If "type" is not specified, the variable is displayed as it appears on the database 
definition page. That is, a binary input will have its status displayed as 
OPEN/CLOSED, a binary output will show as OFF/ON, analog and registers will be 
shown as a real number occupying 11 positions, including the sign and the decimal 
point, and the number of digits after the decimal specified by the DEC command.

When you specify a variable without a "type", you cannot specify the "color" 
parameter either. The variable will be displayed with the foreground color currently 
selected on a black background.

Let us now consider what takes place when a "type" is specified.

NUMBERThis specifies that the variable should be displayed as a positive integer. 
One more argument only is allowed with this specification: a number from 1 to 5 that 
indicates how many digits should be displayed. If this number is omitted, it is 
defaulted to 5. Leading zeroes are replaced by spaces.

Unless the color parameter is specified, the currently selected foreground color 
becomes part of the definition. As it is not possible to select the color (using F1, F2, 
F3) while defining the variable, you should establish that color before you type 
[Alt-V].

Example:PART/ NUMBER 4 CN[cr]

Typing [alt-N] generates the word NUMBER.

LZIThis specifies the variable as a Leading Zero Integer. It is used exactly like the 
NUMBER but when displayed, leading zeroes are not replaced by spaces.

REALThis specifies that the variable should be displayed as a signed decimal 
number. This specification may be accompanied by a pair of numbers, the first one 
indicating the total number of positions occupied by the variable (the width), the 
second one indicating how many of these positions are digits after the decimal point.

The width must be minimum 3 and maximum 11. The number of decimals must be 
minimum 0, maximum=width-3. In other words, the specification must always allow for 
a sign, a decimal point and a minimum of 1 numeral.

If the field specification is omitted, the width is automatically 11 and the number of 
digits after the decimal is as specified at the time by the DEC command. This is 
particularly useful in situations when the order of magnitude is unknown. If the value 
became too small, it would be possible to display more decimals without editing the 
display.

Unless the color parameter is specified, the currently selected foreground color 
becomes part of the definition. As it is not possible to select the color (using F1, F2, 
F3) while defining the variable, you should establish that color before you type 
[Alt-V].

Example :TEMP1 REAL 7 2[cr]

Typing [alt-R] generates the word REAL.

HGRAPH This specifies that the variable is to be represented by a horizontal bar. 
Two more numeric arguments must be used with this specification. The first number 
set the total number of positions to be occupied by the variable. Since this variable 
representation extends from left to right, the maximum width is limited to the number 
of positions from the current cursor location to column 80. The second number 
represents the full scale value of the variable, i.e. the value that will make the 
variable cover the total width.

The full scale value is limited to 4095. The actual width of the display will be directly 
proportional to the value of the variable, keeping in mind that the minimum resolution 
on the screen is one character width. Overflow of the variable is not shown; if the 
value increases beyond the defined full scale, the display remains at the full scale.


Unless the color parameter is specified, the currently selected foreground color 
becomes part of the definition. As it is not possible to select the color (using F1, F2, 
F3) while defining the variable, you should establish that color before you type 
[Alt-V]. The display of a HGRAPH variable only affects the background color of the 
area covered, it does not overwrite the foreground.

Example:LEVEL HGRAPH 75 250[cr]

VGRAPH This specifies that the variable is to be represented by a vertical bar 
graph. The use of this type is similar to HGRAPH, except that the display extends 
from bottom to top. The maximum height is limited to the number of positions 
between the current cursor location and the top line (line 5).

Example:LEVEL VGRAPH 10 100[cr]

Typing [alt-V] generates the word VGRAPH.

BINARY This specification must be followed by two words from the following list :

OFF ON OPEN CLOSED NO YES FALSE TRUE NON OUI

The first word will be displayed when the variable is false, the second one when the 
variable is true. The variable always occupies 6 character positions.

Unless the color parameter is specified, the currently selected foreground color 
becomes part of the definition. As it is not possible to select the color (using F1, F2, 
F3) while defining the variable, you should establish that color before you type 
[Alt-V].

Typing [alt-B] generates the word BINARY.

LIST The "LIST" format associates the variable with a text array, so that if the 
integer value of the variable is n, the variable is displayed as the nth element of the 
array. The first element of the array is element 0 corresponding to n=0. Each element 
of the array is a string of characters that you write in the text portion of the data 
base.

The name of the text array is the name of the variable that corresponds to the first 
string (element 0).

The "spec" portion for this format consists of the number of elements in the array, 
the name of the array and the number of characters that the text will occupy on the 
page.

The number of elements is a constant from 1 to 15. If you indicate 0 as the number of 
elements, then the display system assumes that your array may contain any number 
of elements.

The maximum number of characters occupied is 40 since this is the maximum number 
of characters that the text area of the database can hold.

Example:

Say we have written in the database the following:

NAME CURRENT A E MESSAGE

R0155 MODES 0.00 OFF LINE

R0156 0.00 AUTOMATIC OPERATION

R0157 0.00 MANUAL OVERRIDE

We have also defined the following variables:

NAME CURRENT A E MESSAGE

R0111 MODE 0.00

As well as

NAME CURRENT A E MESSAGE

R0122 MOTOR_OFF 0.00 

We are now in the display editor and define the following variable somewhere on the 
screen:

MODE/MOTOR_OFF LIST 3 MODES 15

Depending on the value of MODE (0, 1 or 2) the variable will be displayed as 'OFF 
LINE', 'AUTOMATIC OPERA', or 'MANUAL OVERRIDE'.

The Tab or Arrow Up/Down will allow you to select the variable MODE only if 
'MOTOR_OFF' is true. If you want the full word OPERATION to appear, change the 
15 to 19 in the definition.

You may assign a color to each of the elements of the array by preceding it with "\n" 
in the text definition page. The character "n" represents the color per the following 
chart:

1=blue 9=bright blue G=blinking blue

2=green A=bright green H=blinking green

3=cyan B=bright cyan I=blinking cyan

4=red C=bright red J=blinking red

5=magenta D=bright magenta K=blinking magenta

6=yellow E=bright yellow L=blinking yellow

7=white F=bright white M=blinking white

8=grey

In the above example,

\JMANUAL OVERRIDE

will use the blink red color when MODE is equal to 2.

This method of assigning a color to the displayed element supersedes the "color" 
parameter. If you did not precede the text with a "\n", and you did not include the 
"color" parameter, then the display system will use the white foreground and black 
background.

If you have indicated as the number of elements a number from 1 to 30, the display 
system will automatically limit the value of the variable from 0 to n-1 and roll over 
when decrementing or incrementing the variable with the F7 and F8 keys.

Typing [alt-L] generates the word LIST.

NOTE:The LIST format is not compatible with previous versions of RTES. If you are 
using a knowledge base developed with an earlier version of RTES, you must :

1. Edit your display to make sure that the list length does not exceed 15.

2. Dump the display using the PD command.

3. Reload your display in the new system using the PL command.

TEXTThis specifies that the variable must be replaced by the text associated with the 
variable. A number must follow to specify the number of positions to be reserved for 
that text on the display.

Unlike the LIST specification the same text is displayed regardless of the value of 
the variable. 

The color for display is established in the same manner as for the LIST format.

Typing [alt-T] generates the word TEXT.

For example : PRODUCT/ TEXT 25

causes the first 25 characters of the text associated with the variable PRODUCT to 
be displayed. If this definition is used on user display page, the '/' indicates that the 
variable may be selected to enter the text.

If a TEXT variable is selected, anything entered on the command line is assumed to 
be a text to be assigned to the selected variable. If you intend to type a command, 
make sure a TEXT variable is not currently selected - use [Home] for instance to 
cancel any current selection, or select a variable that is not a TEXT.

DISPLAY A VARIABLE AS A COLOR ATTRIBUTE

HCAcontrols the color attribute of a specified number of columns on a line according 
to the value of the variable.

HCA must be followed by a positive integer indicating the number of columns.

The positive integer value of the variable is interpreted as a color and display 
attribute according to the following conventions.

1=blue foreground  16=blue background

2=green foreground 32=green background

4=red foreground 64=red background

8=bright 128=blink

To combine colors and/or characteristics, the above numbers must be added up 
accordingly. For instance, blinking yellow on white background would be obtained with 
a value of 2+4+16+32+64+128=246

If the sum formed does not contain any of the foreground numbers, then the 
foreground is black. If it does not contain any of the background number then the 
background is black. Blue+green+red yields white.

To illustrate the above, a value of 7 is white on black, 112 is reverse video.

VCAcontrols the color attribute of a specified number of lines on a row according to 
the value of the variable.


VCA must be followed by a positive integer indicating the number of rows.

The positive integer value of the variable is interpreted as a color in the same way as 
for the HCA.

ERROR CONDITIONS

If an error is detected in the variable specification, an appropriate message is 
displayed, and more editing is allowed. If the specification is valid, then the system 
returns to page editing.

You may also return to page editing, without entering the specification by pressing 
[Home] or by pressing [cr] with the cursor in the left most position of the displayed 
specification, immediately after the prompt (>).

MODIFYING A VARIABLE SPECIFICATION 

It is often necessary to change the specification of a variable that has been placed on 
a display. It is also useful to know what the specification is, without necessarily 
making a change to it.

In such cases, you may place the cursor at the starting coordinates of a variable. This 
is the left most or bottom position of the highlighted area showing the position 
occupied by the variable. Once at that position, press [alt-V] and the system will 
display the prompt as well as the variable specification as entered or as defaulted by 
the system when the specification made use of default parameters.

Once the line is displayed, it may be edited just like a command line. The revised line 
must be re-entered by pressing [cr]. Note that any characters at the right of the 
cursor when [cr] is pressed are ignored. Therefore, if the middle of the line only has 
been changed, make sure you bring the cursor to the end of the line, by using the 
[arrow right] or [End] key, before pressing [cr].

If an error is detected in the revised specification, the original is not erased and more 
editing is allowed. If the new specification is valid, then it replaces the previous one 
and the system returns to page editing.


You may also return to page editing by pressing [Home] or by pressing [cr] with the 
cursor in the left most position of the displayed specification.

SPACE RESTRICTIONS 

Variables are not allowed to share the same area of the screen. Once 
a variable has been specified to occupy a certain area on the page, 
if another variable is specified that would overlap with a previous 
one, it is rejected.

Variables are not allowed to extend beyond the page. Should a 
combination of starting coordinates and specification cause the area 
to be occupied to extend beyond the boundaries of the display, the 
specification is rejected.

If an area of the page is occupied by a variable, it is not possible 
to place characters in that area. A variable, on the other hand, may 
overwrite any text that was previously placed in its field. It should 
be noted that the displays generated by the bar graphs do not 
actually affect the text, but merely highlights the space it 
occupies.

It is therefore possible to place a text somewhere on the screen and 
then define a bar graph that will highlight all or part of it. A 
particularly interesting application of this feature is to specify a 
binary variable as a bar graph (HGRAPH) and assign to it the width of 
a certain sentence with a full scale of 1. When the variable is true, 
the sentence stands out in reverse video.

DELETING A VARIABLE FROM A PAGE 

It may be necessary to remove a variable that has been defined at the 
particular location on the page. In this case, place the cursor at 
the starting coordinates of the variable to remove, then press [alt-
R]. The system will display the specification of the variable and 
request a confirmation. 

Typing "C" (upper case) will confirm the deletion, any other 
character will just cancel the request to delete and return to page 
editing.

TERMINATING A DISPLAY EDIT SESSION 

While editing the body of the page, you may terminate the edit 
session by pressing [Home]. If you were editing the display name or 
entering the specification for a variable and wanted to abandon the 
edit session, then you would have to press [Home] twice. Once to 
cancel the [alt-N] or [alt-V], then once more to return to command 
mode.

If you are editing a display with a batch file, you terminate the 
edit session with the HOME command. 

(Close Window)