![]() | FAI Designs Inc. |
Step 1 | Create a folder named RTES in the Program Files folder in drive C: |
Step 2 | Copy or download RTES32.EXE in the new folder C:\Program Files\RTES |
Step 3 | Create a shortcut for RTES32.EXE on your 'desktop' |
Step 4 | Create a "working" folder that will contain your RTES files. For instance C:\Controls |
Step 5 | Right-click the shortcut, click "Properties", enter the path of the new folder in the "Start in" line. Click OK to close the properties' window. |
Step 6 | Double Click the shortcut to start RTES32 |
Note | You may copy the shortcut into the "Startup" program group to start RTES32 automatically whenever the computer starts. |
![]() |
RTES32 uses an optional configuration file named RTES32.INI that
sets various parameters. This file must reside in the default (working) folder,
where the RTES application is saved.
RTES32.INI is a text file, that you may create and edit using Notepad. You
may also access it via a menu shortcut on the RTES32 menu bar (under
Communications).
RTES32.INI is divided into sections. Each section starts with the name of the
section between square brackets.
The following sections are defined at the moment:
Within each section, you define parameters using a 'key' followed by the "=" sign and followed by one or more alpha-numeric arguments.
Parameters within the section may be arranged in any order.
Multiple arguments must be separated by spaces, a dot, or a comma.
A comment line starts with "/".
The following keys are defined at the moment:
Parameter |
Description |
Default value | ||||||||||||
NODE |
Sets the station id on the UNET network for this computer. |
NODE=1 | ||||||||||||
DELAY |
Idle time in milliseconds between requests to other stations.. |
DELAY=10 | ||||||||||||
RETRIES |
Number of consecutive failed attempts to communicate with a remote
station before setting on the associated ALERT register. |
RETRIES=3 | ||||||||||||
SWITCH |
The index of Register that must be in the ON state for this station to
respond to requests from the remotes. |
none. This station always responds | ||||||||||||
TIMEOUT |
The time in milliseconds that this station will wait for a response
before trying again. |
TIMEOUT=250 |
||||||||||||
REMOTE |
Specifies the IP of a remote station. Each remote is defined by 6
decimal numbers. The first number is the UNET node id. The next 4
are the IP of that station. The last number is the node type. A type 0 indicates that the node is a RTES or RTES32. A non-zero node type indicates that the node is an IP Based Device Server.
You may include up to 64 "REMOTE" lines in the file. |
No remote station defined | ||||||||||||
BINARY |
Defines a cluster of binary registers to be received from a remote station. Each "BINARY" definition consists of 6 numbers. You may include up to 64 "BINARY" definitions in the file. FIRST, QTY, NODE, POS, ALERT, ENABLE
|
No binary cluster | ||||||||||||
FLOAT |
Defines a cluster of analog (floating point) registers to be received from a remote station. Each "FLOAT" definition consists of 6 numbers. You may include up to 64 "FLOAT" definitions in the file. FIRST, QTY, NODE, POS, ALERT, ENABLE
|
No analog cluster | ||||||||||||
ENABLE |
Defines the behaviour of the ENABLE register, when used in FLOAT and BINARY. When set to 0, the data is exchanged as lomg as the enable register is on. When set to 1, setting the ENABLE register on intiates a data exchange and it is turned off automatically after a succesful data exchange. |
ENABLE=0 |
Visit the IPS page for specific information about exchanging data with IP Based Device Servers that allow you to interface RTES32 with various I/O subsystems.
Parameter |
Description |
Default value |
NAME |
Defines an alphanumeric name for this web host. |
The name is blank. |
RTES variables :
Parameter Description Default value NAME Alphanumeric Data Source Name to use for ODBC operations associated with the WSQL RTES32 command. The name is blank. USER Alphanumeric user id for the Data Source to use for ODBC operations. The name is blank. PASS Alphanumeric password for Data Source Name to use for ODBC operations. The name is blank. IP IP address of a server that contains the Data Source Name to use for ODBC operations. The IP is blank and the DSN is 'local'. HANDLER The name of the server side script that handles the ODBC operations. Only used when the IP is defined LOGS The name of the table in the database that will receive the alarm and change of state events. Events are not logged Registers
The drop-down menu at "Window" on the task bar gives you access to the R and
the O registers. Use the scroll bar to view all the registers, or the "Find.."
to locate a register by name.
You may change the name, current value and text for the registers by clicking
on the item. You must use the "Enter" key for the change to take effect. The
"Esc" key allows you to abandon the editing. Note that while an editing window
is open, the display is frozen.
You may also use the command line to name registers, assign text to them and
set the values. (Commands : NAME, TEXT, LET, SET, START, STOP)
You may click on the R column to examine and edit the rules. You must use the
"Enter" key for the change to take effect. The "Esc" key allows you to abandon
the editing. Note that while an editing window is open, the display is frozen.
When entering a new rule, make sure it starts with "=". When using the "FREE"
selection to remove a rule, you must click on the text of the rule to be able to
use the "Enter" or "Esc".
You may also use the commands RULE, EXEC, EXT, (etc.) and FREE on the command line.
The "greater than or equal" and "less than or equal" operators are entered
and displayed as ">=" and "<=", respectively.
Reads a series of numbers from a given position in a file, into a set of consecutive registers, whenever an 'record number' register changes.
The following RTES command defines a TABLE function :
The parameter used in FIRST and POS is coded
as follows to indicate which type of variable is used:0-9999 R registers
20000-29999 O registers
You define this name in "Control Panel\Administrative Tools\Data Sources".
register | is the name of the register that will be used as 'record number' |
expression | is an arithmetic expression (just like a RULE) that will be used to determine the value of the register |
The two register immediately following the 'record number' register are automatically used by RTES. Their values represent respectively the number of the first register of the set to receive the values from the file, and the quantity of registers to use - that is the 'record length'.
The text area of the 'record number' register must specify the name of the file name that contains the data. The file must have the .bin extension, but the extension is not shown in the text area.
An example to illustrate the TABLE function:
R0025 SET_RECORD 0.00 T DATAFILE R0026 DATA_REG 30.00 R R0027 REC_SIZE 5.00 R ' ' R0030 DATA1 0.00 R0031 DATA2 0.00 R0032 DATA3 0.00 R0033 DATA4 0.00 R0034 DATA5 0.00 . . TABLE SET_RECORD=SET_RECORD
A test file DATAFILE.BIN may be built to contain the series of numbers 1 to 1000, with the following task:
R1024 FILENAME 0.00 DATAFILE.BIN 001 EOPEN 1 FILENAME 1 002 SET DATA1 0 003 LET DATA1=DATA1+1 004 WRITE 1 DATA1 005 IF [DATA1<1000] 3
If you set SET_RECORD to 1, DATA1 - DATA5 will read 1.00 to 5.00
If you set SET_RECORD to 10, DATA1 - DATA5 will read 46.00 to 50.00
If you set SET_RECORD to 100, DATA1 - DATA5 will read 496.00 to 500.00
![]() |
Tasks
You obtain the task list at the drop-down menu, under "Database".
Once you have the list, right click on a task name or the *TASK* heading to
add, import, open (for editing) and control the tasks.
![]() |
Alarms and Change-Of-State
Once the variable that represents the alert condition and its associated message
exist, an alert may be defined by two methods.
Screen editing method
Locate the alert variable. Click in the "A" column. Then select :
The "N" simply eliminates a previously defined alert condition for that variable.
ALERT command method
An alert condition may be defined or removed with the ALERT command. The format
of the command is :
ALERT name state[cr]
name is the name of the variable to be associated with the alert condition
The command ACK name
RTES32 locates and maintains these registers:
The "E" directs any change of state of this variable to the change of state logger.
state is
Alarm acknowledge
RTES32 locates the following registers on startup and uses them:
![]() |
Web Host
RTES32 is ready to interface with web browsers.
Click "Communications" on the menu bar to choose the folder that will be the
Host Directory and contain your HTML files. Your selection is saved in the
'registry'.
RTES32 looks for the following register names on startup and maintains them:
![]() |
Using HTML
HTML files used to interface with RTES must
As RTES32 delivers your HTML files to the browser, it looks for the following
special "tags".
The text contained between @@ and @ uses the same format as the report generator.
The expression between the second [ and the first ] is evaluated as a
boolean. "text" is included if the result of the evaluation is true. (Click here for more details.)
The text between the second and last ! is assumed to be an RTES command.
Example : !!LET HITS=HITS+1!
Use of the POST method
When defining the FORM, ACTION="page.htm" causes page.htm to be displayed
when the form is submitted. Examples :
(1) Start/stop: (2) Set to a numeric value: (3) Select value - Radio button style: (4) Select value - Menu style:
(5) Assign a text to a variable:
A pair of NAME and VALUE define the RTES command
to be executed.
![]() |
Password Authorization Protocol
On startup, RTES32 looks for a register named PAP$.
When that Register is set to 1, a user id and password are requested to
access the html documents via the web browser. The user id must match the text
at Register PAP$ and the password must match the text at the next Register.
If you change these texts, you must click "Run Configuration" under "Communications"
on the menu bar for the change to take effect.
![]() |
DOM stands for Document Object Model and allows access to every entity on a web page. All browsers support DOM. All it takes is a mechanism that retrieves the appropriate data from the server and assigns it to the element it belongs to.
We supply a javascript named liveweb.js that allows you to easily use these techniques without any knowledge of scripting. All you have to do is follow these guidelines that we will apply to an example.
![]() |
The [ODBC]section in RTES32.CNF defines:
The RTES command RSQL provides a way to retrieve data from databases using SQL via ODBC.
The format of the command is RSQL name destination
name is the name of a RTES register that defines a file array. The file identified by the value of the register is interpreted by the
report generator and passed on to ODBC.
destination is the name of the first of a series of consecutive RTES registers that will receive the data.
The [ODBC]section in RTES32.CNF defines:
Example:
R0123 LOG 1.00 FAULT.FMT R0124 0.00 DEFECT.FMT R0125 0.00 DOWNTIME.FMTA task issues the command: WSQL LOG
Since LOG=1, the selected file is DEFECT.FMT
DEFECT.FMT contains:
INSERT INTO Defects(Machine,Defect Type,Timestamp) VALUES (@@MC# NUMBER@,@@TYPE LIST 0 TYPES 0@,@@TOD REAL 6 2@)Note that "INSERT INTO" is a standard SQL keyword, "Defects" is the name of a table you defined in the database specified in the [ODBC] section of RTES32.INI, "Machine", "Defect Type" and "Timestamp" are fields that you defined in that table, using the appropriate data types.
MC#, TYPE, TYPES and TOD are RTES register names.
Example of how WSQL may be used to record live data into a database.
In the case of a remote database, it is assumed that the server is IIS (Internet Information Services) Version 6 or equivalent, that it accepts sql queries on port 80 (http) and that it has a compatible query handler. Note that the format of the tables in the database should follow certain guidelines if you intend to use the trend display facilities we supply. Contact FAI for assisstance.
![]() |
Here is an example of how to create a table named "eventlogs" in MySql:
In this case, RTES32.INI will contain in the [ODBC] section:
LOGS=eventlogs
![]() |