INTRODUCTION                              October, 1995.

This application is designed to control the PC Relay Driver Board (KIT 74)
attached to the printer portof a PC. It can be set up to run two entirely
different timing programs at the same time. (These are the "Program A" and
"Program B" buttons at the right of the main window).

The main window dialog box has three menu entries:

File/New
Deletes any data in the timer arrays, ready for new data to be entered.

File/Open
Displays a standard dialog box where you can select an existing file,
navigate through drives and directories, etc.

File/Save
Saves the current timer values to an already defined filename.

File/Save As
Displays the same dialog box as "Open" and allows the selection or entry
of a new file name.

File/Exit
Quit "RELAY" application. A dialog box appears asking for confirmation.
Quitting automatically turns off all relays.

Port
This item opens a dialog box which enables the user to select the port
address that the "PC Relay Driver Board" is connected to.

Help
This leads to a drop down menu with "Help" and "About" options.  The
"About" box shows a copyright notice, and the version number.  The "Help"
item displays this help text. You can scroll through this text with the
Page Up and Page Down buttons.


OPERATION

The application has eight rows of controls, one for each relay on the
board. The first row will be described. The other seven are exactly the
same as the first.


MODES OF OPERATION

There are two modes of operation, Manual and Timed.

1. MANUAL MODE

To use manual mode, click on the "Manual" check box for the relay. This
will disable the timer operation for this relay. It will have no effect on
the other seven. To turn the relay on, click on the "Status" radio button.
This will toggle the relay ON or OFF. To return to timer mode, click on
the "Manual" check box again.  The relay will remain in whatever state it
was in before, i.e clicking on the "Manual" box will NOT change the state
of the relay. Only the "Status" button (in manual mode) or the timer (in
timer mode) can change the relay state.

2. TIMER MODE

The timer mode of operation has two programs, Program A and Program B.
These are independant of each other and are separately programmed. To set
up a program, click on "Program A" or "Program B" button. The button
clicked will change to "End prog A" or "End prog B". The "Start",
"Duration" and "Day of week" controls will now be enabled (no longer
greyed!).

Click on the "Start" box. The cursor will appear and you can type in the
time that you want the relay to turn on. (Use 24 hour format, NO colon
":")

Click on the "Duration" box. The cursor will appear and you can type in
how long you want the relay to remain operated for. (Use 24 hour format,
NO colon ":")

Click on the day(s) that you want the time to apply to. (Any combination
is OK)

Repeat the above steps for any of the other relays with their own times
and days.

Once you have set up each relay's times, click on the "END PROG A" or "END
PROG B" button to store the values. As they are stored, they are checked
for valid times and an error is reported if an invalid time is found.
Hours must be from 00 to 23 and minutes must be from 00 to 59. There must
also be at least one day of the week specified.

Once the timer programs have been set up, click on the "RUN" button to
start the timer. When any relay's start time and day matches the current
time and day, that relay will be operated by the timer. At the end of each
minute you will see the duration time decrease by one. When both the hours
and minutes of the duration box are both zero, the timer will release that
relay. When a relay is released, the timer will restore the original start
and duration times.

The "Cycle A" and "Cycle B" indicators show which program (A or B) is
currently running on that relay.

"All Off" is an emergency stop. It turns off all the relays, irrespective
of whether they are on in timer mode or manual mode. The button's label
changes to "Resume" when clicked. Clicking on this button again will cause
the timer to continue. Note that the timer for each relay is still
counting down, ie. clicking on "All Off" does NOT stop the timer. It only
turns all the relays off. Any relay that was on manually will be turned
off and will stay off when "Resume" is pressed. Relays that were under
timer control will turn on or off according to whether they have timed out
or not.

AUTO RUN

"RELAY" is able to load and run a file automatically whenever it is
started. This is done by specifying the name (and extension) of the file
following the command name.

        eg.  RELAY EXAMPLE.RLY

The file must be in the same directory as "RELAY.EXE". If not then the
full path must also be included in the file name.

This feature enables a program to continue even in the event of a power
failure or system reset. To start "RELAY" whenever Windows(tm) is started
simply drag the "RELAY" icon into the "Startup" program group.

FILE FORMAT

An example file (EXAMPLE.RLY) is included to show the format used by the
files. The file is an ASCII file, and has no control characters (except
CR, LF) embedded in it. Any text editor can be used to manually produce
".RLY" files.

The first line must consist of the string:

"PROG START DURATION SUN MON TUE WED THU FRI SAT"

with the "P" of "PROG" being in column 1 and the "T" of "SAT" being in
column 47. There must be one blank line after this header.

The next lines hold the data to be placed in the relay timer arrays as
follows:-

COLUMN 1          relay number 1 - 8
COLUMN 2          Program A or B
COLUMN 6-9       Start time (24 hour format, no colon)
COLUMN 12-15    Duration time (24 hour format, no colon)
COLUMN 21        'X' if relay to be operated during Sunday, blank if not
COLUMN 23        'X' if relay to be operated during Monday, blank if not
COLUMN 29        'X' if relay to be operated during Tuesday, blank if not
COLUMN 33        'X' if relay to be operated during Wednesday, blank if not
COLUMN 37        'X' if relay to be operated during Thursday, blank if not
COLUMN 41        'X' if relay to be operated during Friday, blank if not
COLUMN 45        'X' if relay to be operated during Saturday, blank if not

An entry for each relay is not required. Any relay without an entry will
be ignored. The easiest way to generate the file is to set up the timer
then use the "SAVE AS" option from the FILE menu to save the file.


PROBLEMS & QUESTIONS

Send these straight to the manufacturer & designer. You may send email to

               peter@kitsrus.com

You may fax me: Peter J. Crowcroft, DIY Electronics
                852 2725 0610    in Hong Kong

Or send me a letter: PO Box 88458, Sham Shui Po, Hong Kong.

We have a web page at

                http://kitsrus.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
