
UM-0085-B09
DT80 Range User Manual
Page 89
RG
Order of Execution
When an alarm is triggered, things happen in the following sequence:
1.
Digital action channels (if any) are set to the required value
2.
Alarm text (if any) is generated and returned/logged
3.
Email/ SMS communication actions (if any) are queued for transmission
4.
Any channels in the action process list are evaluated, left to right. All channels in an alarm process list are
treated as working channels – they are neither returned, logged nor displayed.
5.
Any commands or schedule trigger re-definitions are queued for execution, working left to right.
6.
Any further channels or alarm commands in the current schedule are executed
7.
Any queued commands, including the ones generated by the alarm, are executed.
For example, the job
BEGIN
RA5S ALARM1(3TK>30){XB 1DSO=0 SATTN} 4V(NR)
RC1S 1V
RBX 1SERIAL("{boo!}")
LOGON
END
will perform as follows:
1.
Schedules A & C will become due at the same time, because A's scan rate is an exact multiple of C's. A will run
first, because, as noted in
Triggering and Schedule Order (P58)
, A comes before C in the priority order.
2.
Channel
3TK
exceeds 30 so the alarm is triggered. The alarm is numbered and logging is enabled so an alarm
record will be logged, although the alarm text field will be an empty string.
3.
Channel
1DSO
is evaluated – output
1D
is set low.
4.
The command string
XB
;
SATTN
; is queued for execution.
5.
Channel
4V
is evaluated. It's value is logged and displayed but not returned.
6.
Schedule A is now finished; schedule C is selected to run next. It does not actually run, however, because there
are queued commands to execute.
7.
The
XB
command is now executed. This causes the B schedule to become due.
8.
The
SATTN
command is executed, which turns on the
Attn
LED
9.
There are no more queued commands so the C schedule can now run. Channel
1V
is evaluated and
logged/displayed/returned.
10.
1Schedule B is also due, so it now runs. The
1SERIAL
channel is evaluated, which causes a string to be sent
out the serial sensor port.
11.
1There is nothing further to do so the logger idles until schedule C next becomes due.
In most applications the ordering is not particularly important as all of the alarm actions occur within a very short space of
time. However, it can cause surprises in some circumstances, as illustrated below.
Trap – Commands Don't Affect Channels in Same Schedule
Any commands executed in an action process list will not take effect until after all channels have been processed. For
example, if you wanted some measurements to be returned in fixed format mode and some in free format, you might try:
RA1S DO{/H/R} 1V DO{/h/R} 2V
'does not work!
but in fact both channels will be returned in free format mode.
To achieve the desired result you need to do something like:
RA1S 1V DO{/H/R XB}
RBX 2V DO{/h/R}
In this example
1V
will be returned in free format mode, then we switch to fixed format mode, then we issue the
command to poll schedule B. Schedule B will then do the same thing: return 2V in fixed format mode, then switch back to
free format mode so that the next time schedule A runs it will return its value in the correct format.
Note
: In the DT80, commands have higher priority than schedules. If there are any queued commands outstanding, they will be
executed ahead of any schedules that happen to be due. However, once a schedule starts executing, it always runs to completion – any
queued commands will be held off until the schedule completes.
Содержание DT80
Страница 29: ...UM 0085 B09 DT80 Range User Manual Page 29 RG The DT80 File System P114 ...
Страница 184: ...UM 0085 B09 DT80 Range User Manual Page 184 RG Figure 71 DT80 communications options ...
Страница 185: ...UM 0085 B09 DT80 Range User Manual Page 185 RG Figure 72 DT80 communications options integrated modem models ...