1 Configure SVGHMI instances |
1 SVGHMI instances configuration |
2 ========================== |
2 ============================== |
3 |
3 |
4 Ports and interfaces |
4 .. list-table:: |
5 -------------------- |
5 |
|
6 * - Multiple SVGHMI instances can be configured simultaneously in the same Beremiz :doc:`../programming/configuration`, exposing different HMIs. |
|
7 |
|
8 .. image:: svghmi_multi.png |
|
9 |
|
10 - .. figure:: svghmi_configuration.png |
|
11 |
|
12 SVGHMI configuration panel |
|
13 |
|
14 Ports, interfaces, path and MaxConnections |
|
15 ------------------------------------------ |
|
16 |
|
17 Each SVGHMI instance must bind to different interface-port-path triplet. In case of conflict, a build error is issued. |
|
18 |
|
19 By default, interface is set to ``localhost``, port to ``8008`` and path is set to :doc:`../programming/configuration` Node's name: ``{name}``. |
|
20 As an example, in case SVGHMI instance is first node in :doc:`../programming/configuration`, default URL to reach HMI is ``http://localhost:8008/svghmi_0`` |
|
21 |
|
22 Up to ``MaxConnections`` clients (i.e. web browser) can connect to the same SVGHMI instance simultaneously. |
|
23 This number has an influence on memory footprint of generated code. |
|
24 In case of repeated connection loss with long TCP `TTL <https://en.wikipedia.org/wiki/Time_to_live>`_, small ``MaxConnections`` number can lead to connection refusal. |
|
25 |
|
26 |
|
27 |
|
28 About Security |
|
29 ^^^^^^^^^^^^^^ |
|
30 |
|
31 .. |
|
32 TODO : |
|
33 |
6 |
34 |
7 Watchdog |
35 Watchdog |
8 -------- |
36 -------- |
9 |
37 |
10 Launching browser |
38 Purpose of SVGHMI watchdog is to detect if HMI is still functioning and connected to PLC. |
11 ----------------- |
39 ``/HEARTBEAT`` variable is periodically updated by PLC and HMI to detect failure. |
|
40 |
|
41 When SVHGMI server doesn't receive HMI heartbeat in due time, watchdog is triggered, and ``OnWatchdog`` command is executed. |
|
42 For example, ``OnWatchdog`` can be used to restart a new web browser in case it did crash. |
12 |
43 |
13 Static files |
44 Only one single client can use watchdog at a time, and ``Watchdog`` configuration setting can be active on only one SVGHMI instance at a time. |
14 ------------ |
45 |
|
46 ``WatchdogInitial`` and ``WatchdogInterval`` define how long watchdog will accept to wait before receiving first heartbeat, |
|
47 and then how long it will wait in between heartbeats once first heartbeat has been received. |
|
48 |
|
49 |
|
50 Starting and stopping browser |
|
51 ----------------------------- |
|
52 |
|
53 ``OnStart`` and ``OnStop`` configuration settings are commands meant control web browser execution when PLC is started or stopped. |
|
54 PID of commands are monitored, and the end of web browser process is awaited after command. |
|
55 If web browser process isn't finished 3s after calling ``OnStop`` command, warning is logged. |