Appendix A. Program Example
*Table 1 Programs |
| |
01: | 1 | Sec. execution interval |
1: Do (P86) |
| |
1: | 1 | Call Subroutine 1 |
If
2: 1 | If Flag/Port (P9) | |
1: | 21 | Do if flag 1 is low |
2: | 19 | Set high Flag 9 |
3: If X<=>F (P89) |
| |
1: | 1 | X Loc state #1 |
2: | 4 | < |
3: | 0 | F |
4: | 19 | Set high Flag 9 |
OUTPUT STATE AND AVERAGE DUTY CYCLE EVERY 5 MINUTES. | ||
4: If time is (P92) |
| |
1: | 0 | minutes into a |
2: | 5 | minute interval |
3: | 10 | Set high Flag 0 (output) |
5: Real Time (P77) |
| |
1: | 110 | |
6: Sample (P70) |
| |
1: | 8 | Reps |
2: | 1 | Loc state #1 |
7: Average (P71) |
| |
1: | 16 | Reps |
2: | 9 | Loc duty #1 |
******* START TRAPPING ROUTINES *******
8: If Flag/Port (P91)
1: | 19 | Do if flag 9 is high |
2: | 30 | Then Do |
9: If Flag/Port (P91) | ||
1: | 11 | Do if flag 1 is high |
2: | 30 | Then Do |
************* RESET ROUTINE *************
To force a watchdog reset, increment reset counter, output time and number of resets, and set flag 1 low.