Event driven software – MITSUBISHI ELECTRIC T-60 User Manual

Page 61

Advertising
background image

Event Driven Software

The EMERSON EMC T-60 Event Driven Software allows the T-60 to react

quickly to external events, without taxing the overhead of the imbedded BASIC
programming language. The Event Software allows the T-60 to scan an input,
react to it, and immediately output data to the A/D’s or the 8 bit I/O port.

The input or source can be derived from bits 0 through 10 of the 8 I/O, an
analog input voltage from an option module (optional), or from a counter on
the counter option module (also optional). The Event Software is table

driven. The program enters data into multiple rows in this table (see Figure
). Each of these rows is called a “Schedule”. When the Event Manager

software is activated, it reads data from the source and compares it to low
and high compare values that were programmed into each schedule. When
the data read from the source is within the range specified for a given

schedule, the Event Manager automatically outputs I/O values, optional A/D
values, and can GOSUB to a BASIC subroutine. The BASIC subroutine can

determine which event has occurred by reading Event Manager data. Note
that the I/O operations are optional. For example, an individual schedule can
be programmed to only output one analog value, leaving the I/O and the

other analog values unchanged.

If the source is from I/O or an optional analog input, the comparisons are
performed with 16 bit integer mathematics, giving the greatest degree of
flexibility possible (overlapping events and 32 possible schedules). If the

source is from the optional counter, the comparisons are performed with 32
bit integer mathematics, limiting the events to non-overlapping regions and

16 possible schedules. The M02 option is required for the operation of the
EVENT DRIVEN SOFTWARE.

Each schedule is comprised of a 32 byte record. There are up to 32 schedules
available (16 for the optional counter). Individual elements within the table

represent a comparison values which are specified as “LOW” and “HIGH”. If
the event data falls within the range specified by LOW and HIGH, the

previous event data is compared to see if the data was previously within the
same region. If they are different (meaning a change has been encountered),
a change of events has occurred. If the enable bytes for I/O and DAC’s are

true (greater than 0), the corresponding I/O or DAC is updated. If the BASIC
interrupt system has been enabled to look for changes with the ON EVENT

and EVENT ON statements, a BASIC interrupt can occur once every event
change.Schedule 0 represents the left-over or unclaimed regions. There may
be many unclaimed regions, or none. By programming schedule 0, you may

set up data default output data which will always be refreshed when the
event system leaves a specific event, and has no other specified event to go to.

Event Driven Software

Adding the Real -Time Clock to the T-60

53

Advertising