Wszystko ustaw jako Cyclic, nie używaj Freewheeling.
Proponowałbym tak:
PLC_PRG(), priority 4, 30ms
UpdateClock, priority 25, 500ms (nie 5000!)
MB_RTU_MASTER_TASK - priority 20, 100 ms (średni czas masz 9ms, nie ustawiaj więc wykonania co 5ms)
Satel, priority 26, 500ms
Ten Twój UpdateClock jakoś podejrzanie długo się wykonuje. Co tam w nim robisz?
Zmieniłem i teraz jest OK. Od razu widać różnicę w repsonsywności webvisu. W dokumentacji oczywiście wszystko jest napisane:
The "freewheeling" task call option is not suitable in conjunction
with the "WebVisu"; as in this case, the high-priority PLC program suppresses the
web server. Instead of this, use the "cyclic" task call option with a realistic value.
W zadaniu UpdateClock, oprócz odczytu aktualnego czasu była wywołana funkcja sprawdzająca jaka jest taryfa prądu - na razie jej nie uzywam, więc usunąłem ją, został więc tylko odczyt czasu.
Aktualne czasy:
Number of Tasks: 4
Task 0: Main, ID: 0
Cycle count: 61066
Cycletime: 1 ms
Cycletime (min): 1 ms
Cycletime (max): 7 ms
Cycletime (avg): 1 ms
Status: RUN
Mode: UNHANDLED
----
Priority: 4
Intervall: 30 ms
Event: NONE
----
Function pointer: 16#28D19244
Function index: 116
Task 1: UpdateClock, ID: 1
Cycle count: 3664
Cycletime: 3 ms
Cycletime (min): 2 ms
Cycletime (max): 13 ms
Cycletime (avg): 4 ms
Status: RUN
Mode: UNHANDLED
----
Priority: 25
Intervall: 500 ms
Event: NONE
----
Function pointer: 16#28D19340
Function index: 119
Task 2: MB_RTU_MASTER_TASK, ID: 2
Cycle count: 18321
Cycletime: 1 ms
Cycletime (min): 1 ms
Cycletime (max): 90 ms
Cycletime (avg): 1 ms
Status: RUN
Mode: UNHANDLED
----
Priority: 20
Intervall: 100 ms
Event: NONE
----
Function pointer: 16#28D19298
Function index: 117
Task 3: Satel, ID: 3
Cycle count: 3665
Cycletime: 1 ms
Cycletime (min): 1 ms
Cycletime (max): 8 ms
Cycletime (avg): 1 ms
Status: RUN
Mode: UNHANDLED
----
Priority: 26
Intervall: 500 ms
Event: NONE
----
Function pointer: 16#28D192EC
Function index: 118