2 subroutines, 3 table priority/interrupts, 4 *4 parameter entry table – Campbell Scientific CR510 Basic Datalogger User Manual
Page 32: Assigning parameters to *4 - edlog

SECTION 1. FUNCTIONAL MODES
1-2
1.1.2 SUBROUTINES
Table 3 is used to enter subroutines which may
be called with Program Control Instructions in
Tables 1 and 2 or other subroutines. The group
of instructions which form a subroutine starts
with Instruction 85, Label Subroutine, and ends
with Instruction 95, End (Section 12).
Subroutine 98 has the unique capability of being
executed when port 2 goes high. This
subroutine will interrupt Tables 1 and 2 (Section
1.1.3) when port 2 goes high. When the port
goes high, the processor awakes within a few
microseconds. The port triggers on the rising
edge (i.e., when it goes from low to high). If the
port stays high, the subroutine is not called
again.
1.1.3 TABLE PRIORITY/INTERRUPTS
Table 1 execution has priority over Table 2. If
Table 2 is being executed when it is time to
execute Table 1, Table 2 will be interrupted.
After Table 1 processing is completed, Table 2
processing resumes at the interruption point. If
the execution interval of Table 2 coincides with
Table 1, Table 1 is executed first, then Table 2.
Interrupts by Table 1 are not allowed in the
middle of an instruction or while output to Final
Storage is in process (flag 0 is set high). The
interrupt occurs as soon as the instruction is
completed or flag 0 is set low.
Subroutine 98 can be initiated by port 2 going
high (Section 1.1.2), can interrupt either Table 1
or 2 or can occur when neither is being
executed. This subroutine can interrupt a table
while the Output Flag is set. When the port
goes high during the execution of a table, the
instruction being executed is completed before
the subroutine is run (i.e., as if the subroutine
was called by the next instruction).
The priority is Subroutine 98, Table 1, Table 2.
If the interrupt subroutine started when neither
table was running, then neither table can
interrupt it.
While subroutine 98 is being executed as a
result of port 2 going high, that port interrupt is
disabled (i.e., the subroutine must be completed
before the port going high will have any effect).
1.1.4
∗∗∗∗
4 PARAMETER ENTRY TABLE
The
∗
4 mode is a table with up to one hundred
values. Each value corresponds to an
instruction parameter in the datalogger
program. When the datalogger compiles the
program, values in the
∗
4 table are transferred
to the corresponding instruction parameter.
The datalogger program must be created using
EDLOG which allows instruction parameters to
be assigned to the
∗
4 table.
In a network of datalogger stations, the
∗
4 table
can be used to simplify site customization and
the procedure of information entry. Once a
generalized program is developed, application
specific details, e.g., sensor calibration, can be
entered without accessing the
∗
1 and
∗
2
program tables or the
∗
3 subroutine table.
ASSIGNING PARAMETERS TO
∗∗∗∗
4 - EDLOG
The only way to implement the
∗
4 mode is
through EDLOG. The datalogger program is
generated in EDLOG in the normal way.
To assign a parameter to a
∗
4 location, position
the cursor on the desired parameter and press
the "@" key. EDLOG then prompts for the
location number in the
∗
4 table to be assigned
to the associated parameter. After a valid
number is entered, EDLOG marks the
parameter with "@@nn" to the right of the
parameter description, where "nn" is the
∗
4
location number.
Older versions of EDLOG (prior to DOS Version
6.0) may not support the
∗
4 mode or may
require that the support be enabled. To enable
the
∗
4 mode press the F5 key followed by the
"@" key while in EDLOG's edit mode. "F5=
∗
4
List" is displayed at the top of the screen
indicating that EDLOG's
∗
4 feature is active.
Subsequent use of the F5 key displays a list
indicating which
∗
4 locations are in use. If your
copy of EDLOG is earlier than 6.0 and it does
not display "F5=
∗
4 List", it is likely that that
version of EDLOG does not support the
∗
4
mode. Please contact Campbell Scientific for
details of an upgrade.
Any program parameter or execution interval
can be marked for inclusion in the table, as
illustrated below.