Distributed Emergency Dragscript

Here is my dragscript for the Distributed Emergency Plugin. I have done some testing with it and so far, it all seems to be working well.

Figured I would run it by all the smart people here and see if there are any holes or things that could be done better or more reliably.

I currently do not have park sensors that will communicate to Viking for my piers and I am working on that but my roof controller does, so instead of waiting for Viking to confirm the mounts are parked, I put in a 2 minute delay. If thats not enough, then the roof still wont close due to the roof controller’s physical, proprietary park sensors.

Anyway … All opinions are welcome.


1 - Start: Events At Start are DISABLE
2 - Script
3 - Remark: ============================================================================================================
4 - Remark: South Wall UP version
5 - Remark: ============================================================================================================
6 - Block: CLOSE ROOF
7 - Remark: ============================================================================================================
8 - Remark: Close roof if open - Temporary delay for mount parking added
9 - Remark: ============================================================================================================
10 - Disable Events
11 - Set Distributed Emergency Status: Status=EXIT
12 - Block: CLOSE ROOF WITH ERROR LOOP
13 - Wait Time: 00:02:00 [hh:mm:ss] Interval
14 - Close Shutter
15 - If OK
16 - Exit Block
17 - Repeat Block For n Times: 2
18 - GoTo Block: UNRECOVERABLE ERROR
19 - Block: DISTRIBUTED SAFE
20 - Remark: ============================================================================================================
21 - Remark: Configure operational parameters
22 - Remark: ============================================================================================================
23 - Disable Events
24 - Set Distributed Emergency Status: Status=EXIT
25 - Distributed SAFE: NIGHT Configuration Nautical - Manual Data [ LAT:41° 14’ 34" N LON: 104° 50’ 34" W] - END Offset (After) 00:20:00 [hh:mm:ss] - Check Exit - Check Suspend
26 - If Error
27 - GoTo Block: UNRECOVERABLE ERROR
28 - If TIMEOUT
29 - GoTo Block: CLOSE ROOF
30 - Block: OPEN ROOF
31 - Remark: ============================================================================================================
32 - Remark: Condition are SAFE … Open Roof
33 - Remark: ============================================================================================================
34 - Open Shutter
35 - If OK
36 - Exit Block
37 - Repeat Block For n Times: 2
38 - GoTo Block: UNRECOVERABLE ERROR
39 - Block: DISTRIBUTE INIT
40 - Remark: ============================================================================================================
41 - Remark: Weather conditions are SAFE and roof is open … Set Distributed Status to SAFE
42 - Remark: ============================================================================================================
43 - Remark: Check Roof Status before issuing Distributed SAFE
44 - Remark: ============================================================================================================
45 - Wait Low Level In: 3 - 5[s] - TimeOut : 60[s] - ClientID 1
46 - If TIMEOUT
47 - GoTo Block: UNRECOVERABLE ERROR
48 - Set Distributed Emergency Status: Status=SAFE
49 - Enable Events
50 - Block: LOOP INTO NIGHT
51 - Remark: ============================================================================================================
52 - Remark: LOOP until the night end as defined in DISTRUBUTED SAFE block - Check every minute
53 - Remark: When the night is finished, the script will return to CLOSE ROOF and wait for the next night
54 - Remark: ============================================================================================================
55 - DO IF DISTRIBUTED SAFE END
56 - GoTo Block: CLOSE ROOF
57 - Wait Time: 00:01:00 [hh:mm:ss] Interval
58 - GoTo Block: LOOP INTO NIGHT
59 - Block: UNRECOVERABLE ERROR
60 - Remark: ============================================================================================================
61 - Remark: Set EXIT and send Perpetual Unrecoverable Error message
62 - Remark: ============================================================================================================
63 - Set Distributed Emergency Status: Status=EXIT
64 - Send Telegram: Unrecoverable Error …!!! Observatory
65 - Wait Time: 00:00:10 [hh:mm:ss] Interval
66 - GoTo Block: UNRECOVERABLE ERROR
67 - End
68 - Events
69 - Emergency Exit
70 - Remark: ============================================================================================================
71 - Remark: EXIT commands for Observatory
72 - Remark: ============================================================================================================
73 - Set Distributed Emergency Status: Status=EXIT
74 - Restart DragScript
75 - Emergency Suspend: Wait Resume until Distributed SAFE End - On Resume Timeout Exec Emergency Exit Event
76 - Remark: ============================================================================================================
77 - Remark: SUSPEND commands for Observatory - Temporary delay for mount parking added
78 - Remark: ============================================================================================================
79 - Set Distributed Emergency Status: Status=SUSPEND
80 - Wait Time: 00:02:00 [hh:mm:ss] Interval
81 - Block: CLOSE ROOF SUSPEND
82 - Close Shutter
83 - If OK
84 - Exit Block
85 - Repeat Block For n Times: 2
86 - Block: SUSPEND - ROOF OPEN ERROR BLOCK
87 - Remark: ============================================================================================================
88 - Remark: Perpetual Error Messaging Loop
89 - Remark: ============================================================================================================
90 - Send Telegram: SUSPEND - ROOF OPEN
91 - Wait Time: 00:00:10 [hh:mm:ss] Interval
92 - GoTo Block: SUSPEND - ROOF OPEN ERROR BLOCK
93 - Emergency Resume
94 - Remark: ============================================================================================================
95 - Remark: RESUME commands for Observatory
96 - Remark: ============================================================================================================
97 - Block: RESUME - OPEN ROOF
98 - Open Shutter
99 - If OK
100 - Exit Block
101 - Remark: ============================================================================================================
102 - Remark: Check Roof Status before issung Distributed SAFE
103 - Remark: ============================================================================================================
104 - Wait Low Level In: 3 - 5[s] - TimeOut : 60[s] - ClientID 1
105 - If TIMEOUT
106 - Raise Emergency Exit Event
107 - Set Distributed Emergency Status: Status=SAFE
108 - Events RoboTarget