
                                                                   Page 9-1
                            Chapter 9 - Schedules

OVERVIEW

There are 2 types of schedules used in The Monitor II:
GRAPHIC SCREENS and PROGRAM RELOAD.

* GRAPHIC SCREENS - This is simply a GRAPHIC screen that is
  listed in the schedule directory instead of the graphic
  directory. The TIME and DATE setpoints are used as
  schedule points. This is the recommended type for the
  Infinity due to virtually unlimited variables.

ADVANTAGES:

* All the animation and variable display features may be
  used.

* No schedule programs have to be loaded every time a
  time or date is changed.

DISADVANTAGES:

* There must be a variable or setpoint created in the
  controller for every time or date used.


* PROGRAM RELOAD - This is a full function scheduler that
  can have up to 100 times and 100 dates.

ADVANTAGES:

* No controller variables have to be created.

DISADVANTAGES:

* No variables (or animation's) other than times & dates
  can be used.

* A user written (or supplied example) program must be
  reloaded into the controller every time a change is
  made.

Graphic screen schedules are identical to a normal graphic
screens except they are listed in the schedule database.
They are created as explained in chapter 4.




                           CONTINUED ON NEXT PAGE

                                                                   Page 9-2

Program reload schedules will take a text file from disk and
load it into the controller every time a change is made to
the schedule. This text file is called a MASK FILE. The mask
file must have the extension .MSK and be placed in the
\MONITOR\SCH directory. This mask file will be a normal
Andover schedule program (your own, or a supplied example)
that has special FORMAT CODES in place of actual times or
dates.

To get a started with schedules on an AC256, follow these
steps:

* Make sure you have a flag in the controller named
  'EN.AHU1'.

* Draw your picture in a third party software package, such
  as Microsoft Paintbrush, Deluxe Paint, etc. You may skip
  this step if you wish to use the built-in drawing tools.

SEE THE OVERVIEW IN CHAPTER 4 FOR IMPORTANT NOTES ABOUT
DRAWING .PCX PICTURES.

* The schedule must be added to the SCHEDULE DATABASE.
  Select BUILD/EDIT from the SYSTEM MENU, then select EDIT
  SCHEDULE DATABASE.

* Highlight an empty entry, press [Enter] or the left mouse
  button, and then select the 'EDIT' button.

* Enter a description for this schedule screen and also a
  filename for the schedule DATA FILE. You can use any
  legal DOS filename that you wish. It should be something
  meaningful to you. This filename can be different from
  the .PCX picture file.

* Change the TYPE to PROGRAM RELOAD. To use the GRAPHIC
  SCREEN schedules, see the rest of this chapter, as well
  as chapter 4.

* Select the 'OK' button and then select the 'DONE' button
  on the selection screen.

The schedule is now in the database and can be edited by
selecting BUILD/EDIT from the SYSTEM menu and then selecting
BUILD SCHEDULE.

The best thing to do is to experiment with an example:

* Select BUILD SCHEDULE from the BUILD/EDIT sub-menu.

* Select CONFIGURATION from the FILE menu.

                          CONTINUED ON NEXT PAGE

                                                                   Page 9-3

* Enter all the information asked for (press F1 if you need
  help). Use a DRUM # that you know is empty, set RELOAD to
  ALL LINES, set CLEAR OVERWRITE to YES, set SUB STRING #1
  to AHU1, and the MASK FILENAME to 'SCHED1'.

* Select LOAD PCX SCREEN from the FILE menu.

* Load the PCX screen 'SCHED1'.

* Select SAVE SCHEDULE DATA from the FILE menu.

* Select QUIT from the FILE menu.

* Finally, select SCHEDULE from the VIEW menu.


You should now be viewing a schedule. Go ahead and change a
few times & dates. After making a few changes, press [Esc].
You will then be asked if you want to save changes, and if
you want to load the schedule into the controller.

Watch the schedule as it loads and compare it to a printed
copy of the file 'SCHED1.MSK'. This will help you to
understand exactly what is happening.

Schedules for the Infinity work in the exact same way,
except that they are loaded automatically using the
Infinity's LOAD command.


IMPORTANT NOTES

* Three different file extensions are used for each PROGRAM
  RELOAD schedule. They are:

'.SCH' - This is the schedule data file and is created
automatically.

'.MSK' - This is the actual drum program that will be
loaded into the controller when you change times or
dates. This can be a schedule you already use, the
included example, or you may write a completely new
one.

'.PCX' - This is the drawing that is used for this
schedule.

* Remember that the schedule filename you put in the
  SCHEDULE DATABASE is the DATA filename and not
  necessarily the .PCX drawing or the .MSK mask filename.
  This allows you to use one generic drawing and mask file
  for many different schedules.

                                                                   Page 9-4

9.1   Schedule Format Codes

Format codes should be placed in the mask file in place of
times and dates. When the schedule is changed and the
program is reloaded, the format codes will be replaced by
the actual times and dates entered by the user.

All format codes are typed as [x##]

Where: x  = Type of code
       ## = Time or date number

The valid format codes are:

(The ## represents the time or date number you wish to
reference.)

* [T##] - Will be replaced with the actual time entered by
  the user, in the Andover TOD format. This will always be
  4 characters (1230, 2045, etc).

* [H##] - Will be replaced by the hour portion of the time
  entered by the user. This will always be 2 characters
  (00-24 or 99).

* [I##] - Will be replaced by the minute portion of the
  time entered by the user. This will always be 2
  characters (00-99).

* [O##] - Will be replaced by the actual time entered by
  the user, in the Andover HOD format. This will always be
  5 characters (12.50, 22.75, etc.).

* [D##] - Will be replaced by the actual date entered by
  the user. This will always be 4 characters (0315, 1225,
  etc.).

* [M##] - Will be replaced by the month portion of the
  date entered by the user. This will always be 2
  characters (01-12 or 99).

* [A##] - Will be replaced by the day portion of the date
  entered by the user. This will always be 2 characters
  (01-31 or 99).

* [Y##] - Will be replaced by the year portion of the date
  entered by the user. This will always be 2 characters
  (00-99).

* [S##] - Will be replaced by the text specified for SUB
  STRING #1 - #5  in the EDIT CONFIGURATION in BUILD
  SCHEDULE. ONLY 01 - 05 ARE ALLOWED.

                                                                   Page 9-5

Lets look at a simple example:

You have created a schedule drawing and placed 2 times (a
start time and a stop time) on it. You have also placed 1
date on it. The Monitor II automatically numbered these
TIME01, TIME02 and DATE01.

Your mask file might look something like this:

OPEN 1
1X 10 ( MTH = [M01] & DOM = [A01] )
2X 1 IF

OPEN 10
1A ( TOD >= [T01] & TOD <= [T02] ) > ENABLE
1X 1 TOD < 2

OPEN E
1X 1 CL = 0

The [M01], [A01] and [T01] are FORMAT CODES. These are
listed above.

If the user changes our example schedule time #1 to 12:00,
time #2 to 16:00 and date #1 to 03/15/93, the following
program would be loaded into the controller:

OPEN 1
1X 10 ( MTH = 03 & DOM = 15 )
2X 1 IF

OPEN 10
1A ( TOD >= 1200 & TOD <= 1600 ) > ENABLE
1X 1 TOD < 2

OPEN E
1X 1 CL = 0

This simple program will turn the ENABLE flag ON only on the
date, and between the hours, set by the user.

                                                                   Page 9-6

9.2   Help with Schedules

Schedules may seem difficult to understand, but it is
actually easier to make them work than it is to explain how
they work. There is a working example program on your
original program diskette called SCHED1.MSK. It is in the
\MONITOR\SCH directory and may be viewed to help you
understand how mask files work.

Here are some helpful suggestions to get you started:

* Try to make a single mask file work for many (or all) of
  your schedule needs. Looking back at the example in
  section 9.2,

instead of:

1A ( TOD >= [T01] & TOD <= [T02] ) > ENABLE

use:

1A ( TOD >= [T01] & TOD <= [T02] ) > [S01]

Then you can change SUB STRING #1 = ENABLE to get:

1A ( TOD >= 1200 & TOD <= 1600 ) > ENABLE

or change SUB STRING #1 = OCCUPIED to get:

1A ( TOD >= 1200 & TOD <= 1600 ) > OCCUPIED

all using the same mask file.

* To make schedules load faster, set them to only load
  CHANGED LINES. You can do this with the EDIT
  CONFIGURATION in the BUILD SCHEDULE function.

Some important notes on using CHANGED LINES:

* ALWAYS use action and exit condition numbers;

1x 10 DOW = 1
2x 11 DOW = 2

instead of:

x 10 DOW = 1
x 11 DOW = 2

This is necessary to insure that the conditions don't
get out of sequence.

                                                                   Page 9-7

* Any line in the mask file with an @ character as the
  first character in the line will always be loaded, even
  if CHANGED LINES is selected.

* All OPEN lines (lines that open an Andover drum line)
  should start with an @ character if that Andover drum
  line has ANY format codes at all.

* Any line in the mask file that has a semi-colon (;) as
  the first character on the line will never be loaded.
  This is useful for placing comments in the mask file.

* If the DOMAIN # in the schedule configuration is set to
  999, The Monitor II will not try to change domains. Use
  this for older controllers that don't support domains.

* If the DRUM # in the schedule configuration is set to
  999, The Monitor II will not try to edit a drum.

* A mask file does not HAVE to be a drum program. It could
  be a list of MODIFY commands:

MODIFY AHU1.ON  [T01]
MODIFY AHU1.OFF [T02]
MODIFY HOLIDAY1 [D01]
MODIFY CLOSED1  [D02]

To do this you would have to set both the DOMAIN # and
DRUM # in the schedule configuration to 999, and set the
CLEAR/OVERWRITE to NO.

* The mask file may EDIT multiple drums. To do this just
  place the CLOSE and EDIT commands right in the mask file.


9.3   The Schedule Database

Before schedules can be built they must be in the schedule
database. The schedule database is where information about
each schedule is stored. It may contain up to 100 different
entries. The information stored in the database is used by
The Monitor II to display each schedule. Each controller has
it's own schedule database.

                                                                   Page 9-8

9.4   Editing the Schedule Database

THERE IS NOT A SEPARATE "SAVE" OR "CANCEL" WHEN EDITING THE
SCHEDULE DATABASE. ALL CHANGES ARE SAVED AS THE EDITING
OCCURS. THERE IS NO WAY TO RESTORE A DATABASE TO ITS
PREVIOUS STATE AFTER SORTING, DELETING, ETC.

After selecting EDIT SCHEDULE DATABASE from the BUILD/EDIT
menu, a list of schedules will be displayed. Select an entry
to edit by highlighting it with the mouse or the arrow keys,
and then press the left button or [Enter]. This will place
the entry in the small box at the top of the selection
screen. Once an entry is selected, the following functions
may be used:

* EDIT - Allows the editing of the information contained in
  the database for this entry (see below).

* DELETE - Will delete this entry. All of the information
  about this schedule will be erased. No other entries are
  affected.

* COPY - Will copy all of this entries data into another
  entry. This could be used to organize the database
  entries into a specific order.

* SORT - Will sort the entries in the database
  alphabetically. You do not have to select an entry before
  using the SORT function.

When EDIT is selected, the selection screen will disappear
and the edit schedule screen will be displayed. The
information contained on this screen is as follows:

* DESCRIPTIVE NAME - This is a 30 character descriptive
  name. It is what will be displayed in the schedule
  selection window.

* SCHEDULE FILENAME - This is the name that will be used
  for the schedule data file. It will be created when you
  BUILD SCHEDULE.

* TYPE - The Monitor II allows 2 types of schedules:
  GRAPHIC SCREEN & PROGRAM RELOAD. See section 9.1.

                                                                   Page 9-9

9.5   Building a Schedule


Before building a schedule it must be added to the schedule
database (see above). Then the PCX graphic screen must be
drawn. In most cases, the actual drawing would be done in a
third party graphic drawing program, such as Microsoft
Paintbrush. The drawing must be in a .PCX format. Almost any
drawing package that saves drawings in this format will
work.

THE PAINTBRUSH INCLUDED WITH MICROSOFT WINDOWS 3.0 WILL NOT
WORK. THE DRAWING WILL LOAD PROPERLY, BUT IT MODIFIES THE
SCREEN COLORS OF THE DRAWING, SO THAT ALMOST ALL OF THE
DRAWING WILL BE IN A DIFFERENT COLOR THAN WHAT IT WAS DRAWN
IN.

THE DRAWING MUST BE IN THE 640 x 480, 16 COLOR MODE.

THE DRAWING FILE MUST HAVE THE EXTENSION '.PCX' AND BE
PLACED IN THE \MONITOR\SCH DIRECTORY.

THE VISIBLE AREA OF A GRAPHIC SCREEN IS 0,15 - 639,465. THE
UPPER AND LOWER 15 ROWS OF THE DRAWING WILL BE OVERWRITTEN
BY THE STATUS LINE AND MENU.

REMEMBER THAT THE SCHEDULE FILENAME SPECIFIED IN THE
SCHEDULE DATABASE IS THE DATA FILENAME AND NOT NECESSARILY
THE DRAWING FILENAME. IN THIS WAY, ONE DRAWING COULD BE USED
FOR MANY SCHEDULES (1 DRAWING FOR MANY FLOORS OF A BUILDING,
ETC).

After selecting BUILD SCHEDULE from the BUILD/EDIT menu, a
schedule selection screen will be displayed. Use the arrow
keys or the mouse to highlight an entry and press the left
mouse button or press [Enter]. This will select the entry
and place it in the small box at the top of the selection
screen. Then select the 'OK' button.

A schedule may also be selected by "double-clicking" on the 
entry with the mouse. To do this, put the mouse cursor on 
the desired entry and press the left button two times 
quickly.

Once a schedule has been selected, the top menu bar will 
change to the BUILD SCHEDULE menu. The following is a 
description of the FILE menu functions. A description of the 
TOOLS menu functions is in chapter 4.

                                                                   Page 9-10

9.5.1   The File Menu

* SAVE PCX SCREEN - This will save the current screen
  drawing to disk.

* LOAD PCX SCREEN - This will load another drawing from
  disk. Whenever a new drawing is loaded from disk, the new
  drawing will then be displayed when this schedule is
  viewed.

* SAVE SCHEDULE DATA - This will save the schedule data
  file to disk. The schedule data file contains all the
  information that is displayed on the schedule (times and
  dates).

* CONFIGURATION - Here you may change the configuration for
  this schedule. Each schedule has its own configuration.

* HEADER - This is the title for this schedule. It will
  be displayed on the top line of the screen when
  viewing.

* MASTER NAME - (Infinity only) This is the name of the
  controller to load the schedule program into.

* MASK FILENAME - This is the name of the schedule mask
  file. The mask file is the program that will be loaded
  into the controller when changes are made to the
  schedule.

* DRUM # - (AC256 only) This is the drum # to load the
  schedule file into. Only numbers may be specified (not
  letters).

   Specify 999 to prevent The Monitor II from issuing the
   "EDIT ##" command.

* DOMAIN # - (AC256 only) This is the domain # to load
  the schedule file into.

Specify 999 to prevent The Monitor II from issuing the
"DOMAIN ##" command.

                                                                   Page 9-11

* RELOAD - If this is set to ALL LINES, The Monitor II
  will load every line from the mask file into the
  controller.

If set to CHANGED LINES, The Monitor II will only load
the lines that contain times or dates that have been
changed.

NOTE: The word "line" above refers to 1 physical text
line of the mask file, not an Andover drum line.

* CLEAR/OVERWRITE - For Infinity, if set to YES, The
  Monitor II will reload the schedule using the -O
  parameter (overwrite mode).

For AC256, If set to YES, the drum # specified above
will be cleared prior to loading.

* SUB STRING #1 - #5 - These are the text strings that
  will be substituted for the [S01] - [S05] format codes
  in the mask file.

* TIME FORMAT - This specifies the format of the time
  points. it can be set to TOD (the Andover's time-of-
  day) format, or HOD (the Andover's hour-of-day format).

* RENUMBER TIMES - This will remove gaps in the data file
  created by DELETING times.

* RENUMBER DATES - This will remove gaps in the data file
  created by DELETING dates.

                ***** WARNING *****

Renumbering times or dates after the schedule mask file
has been written will force you to modify the mask file.
Do not renumber times or dates once the mask file is
finished.

* QUIT - This will quit the graphic builder program and
  return you to the main menu.

                                                                   Page 9-12

9.5.2   The ADD Menu

The ADD menu has 2 selections: TIME and DATE.

* ADD TIME - This will allow you to place a new time on the
  screen. It will be numbered automatically and be drawn in
  the current drawing color. A time always takes up 5
  characters (40 pixels) on the screen.

* ADD DATE - This will allow you to place a new date on the
  screen. It will be numbered automatically and be drawn in
  the current drawing color. A date always take up 8
  characters (64 pixels) on the screen.

9.5.3   The EDIT Menu

The EDIT menu has 2 selections: TIME and DATE.

* EDIT TIME - This will allow you to pick up an existing
  time and reposition it, also changing its color to the
  current drawing color.

* EDIT DATE - This will allow you to pick up an existing
  date and reposition it, also changing its color to the
  current drawing color.

9.5.4   The DELETE Menu

The DELETE menu has 2 selections: TIME and DATE.

* DELETE TIME - This will allow you to delete times from
  the screen and the schedule data file. The times will not
  actually be deleted until you SAVE SCHEDULE DATA.

* DELETE DATE - This will allow you to delete dates from
  the screen and the schedule data file. The dates will not
  actually be deleted until you SAVE SCHEDULE DATA.

                                                                   Page 9-13

9.6   Changing Schedules

While viewing a schedule, if your password levels permits
it, you may point the mouse at the time or date you wish to
change and press the left mouse button. You can then simply
type the new time or date and press [Enter]. If using
GRAPHIC SCREEN schedules, the time or date will be modified
immediately to the new value. If using the PROGRAM RELOAD
schedules, you should change all the times and dates that
you wish to change and then press [Esc]. The schedule
program will then be loaded into the controller.

If, while loading the schedule, any part of the program is
not understood by the controller, that line will be re-
transmitted up to 3 times. If any line contains an invalid
format code, that line will not be transmitted.

