edouard@3936: SVGHMI instances configuration edouard@3936: ============================== edouard@3925: edouard@3936: .. list-table:: edouard@3936: edouard@3936: * - Multiple SVGHMI instances can be configured simultaneously in the same Beremiz :doc:`../programming/configuration`, exposing different HMIs. edouard@3936: edouard@3936: .. image:: svghmi_multi.png edouard@3936: edouard@3936: - .. figure:: svghmi_configuration.png edouard@3936: edouard@3936: SVGHMI configuration panel edouard@3936: edouard@3936: Ports, interfaces, path and MaxConnections edouard@3936: ------------------------------------------ edouard@3936: edouard@3936: Each SVGHMI instance must bind to different interface-port-path triplet. In case of conflict, a build error is issued. edouard@3936: edouard@3936: By default, interface is set to ``localhost``, port to ``8008`` and path is set to :doc:`../programming/configuration` Node's name: ``{name}``. edouard@3936: 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`` edouard@3936: edouard@3936: Up to ``MaxConnections`` clients (i.e. web browser) can connect to the same SVGHMI instance simultaneously. edouard@3936: This number has an influence on memory footprint of generated code. edouard@3936: In case of repeated connection loss with long TCP `TTL `_, small ``MaxConnections`` number can lead to connection refusal. edouard@3936: edouard@3936: edouard@3936: edouard@3936: About Security edouard@3936: ^^^^^^^^^^^^^^ edouard@3936: edouard@3936: .. edouard@3936: TODO : edouard@3936: edouard@3925: edouard@3925: Watchdog edouard@3925: -------- edouard@3925: edouard@3936: Purpose of SVGHMI watchdog is to detect if HMI is still functioning and connected to PLC. edouard@3936: ``/HEARTBEAT`` variable is periodically updated by PLC and HMI to detect failure. edouard@3936: edouard@3936: When SVHGMI server doesn't receive HMI heartbeat in due time, watchdog is triggered, and ``OnWatchdog`` command is executed. edouard@3936: For example, ``OnWatchdog`` can be used to restart a new web browser in case it did crash. edouard@3925: edouard@3936: 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. edouard@3936: edouard@3936: ``WatchdogInitial`` and ``WatchdogInterval`` define how long watchdog will accept to wait before receiving first heartbeat, edouard@3936: and then how long it will wait in between heartbeats once first heartbeat has been received. edouard@3936: edouard@3936: edouard@3936: Starting and stopping browser edouard@3936: ----------------------------- edouard@3936: edouard@3936: ``OnStart`` and ``OnStop`` configuration settings are commands meant control web browser execution when PLC is started or stopped. edouard@3936: PID of commands are monitored, and the end of web browser process is awaited after command. edouard@3936: If web browser process isn't finished 3s after calling ``OnStop`` command, warning is logged.