Jekyll2023-11-17T16:21:55+00:00https://beremiz.org/feed.xmlberemiz.orgBeremiz is Open Source PLC. It brings Free Software IDE (GPL) and Runtime (LGPL) for machine automation, conforming to IEC-61131.Beremiz SAS, FranceIntroducing SVGHMI2023-10-29T00:00:00+00:002023-10-29T00:00:00+00:00https://beremiz.org/2023/10/29/svghmi<table>
<tbody>
<tr>
<td><img src="/assets/img/2023-10-29-svghmi/svhgmi_pitch.svg" alt="SVGHMI" /></td>
<td>SVGHMI is a SVG based HMI toolkit. With it, PLC programmers and HMI designers can efficiently produce Scalable Web Based HMIs. <br /> <br /> HMI design happens in <strong><a href="https://inkscape.org">Inkscape</a></strong>. Designer freely draws HMI pages and widgets following WYSIWYG principle.</td>
</tr>
</tbody>
</table>
<!--more-->
<h2 id="wysiwyg-hmi-design-with-inkscape">WYSIWYG HMI design with Inkscape</h2>
<blockquote>
<p>WYSIWYG, or <strong><em>“What You See Is What You Get”</em></strong>, is a system in which editing software allows content to be edited
in a form that resembles its appearance when printed or displayed as a finished product.
[Oxford English Dictionary]</p>
</blockquote>
<p>Widgets can be selected from customizable widget library and drag’n’dropped directly in Inkscape.</p>
<p><img src="/assets/img/2023-10-29-svghmi/svghmi_dnd.svg" alt="SVGHMI" class="center-image" /></p>
<p>SVGHMI’s Page and Widget roles are assigned to SVG elements by changing objects name and description in Inkscape.</p>
<p><img src="/assets/img/2023-10-29-svghmi/svhgmi_inkscape.svg" alt="SVGHMI" class="center-image" /></p>
<h2 id="open-and-proven-solution">Open and proven solution</h2>
<p>Free and Open Source Software + Open Standards. No hidden license cost.</p>
<p>SVGHMI development was sponsored by <a href="https://www.smarteh.com/">Smarteh</a>. Source code was published as part of Beremiz in 2021.</p>
<table>
<thead>
<tr>
<th style="text-align: center">SVGHMI enabled products</th>
<th style="text-align: center">Use cases</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center"><a href="https://www.smarteh.com/novica/new-lpc-3-got-012-7-lcd-plc-based-hmi-touch-panel/"><img src="https://www.smarteh.com/wp-content/uploads/2022/04/new-lpc-3-got-012-7e280b3-lcd-plc-based-hmi-touch-panel.jpg" alt="" /> <br /> Smarteh’s GOT-012 Panel</a> (<a href="https://www.smarteh.com/products/industrial-automation/operator-terminals/7-lcd-plc-based-touch-screens/">specs</a>, <a href="https://www.youtube.com/playlist?list=PLrpKIKRJ1QHiNwNIi4Lh7E_-ajb8SYGJf">tutorials</a>)</td>
<td style="text-align: center"><a href="https://www.halton.com/products/kmc-mobile-recirculating-station-halton-mobichef-ce/"><img src="https://www.halton.com/wp-content/uploads/2021/07/KMC-Mini-TS.png" alt="" /> <br /> Halton MobiChef</a> <br /> <a href="https://www.smarteh.com/novica/new-lbt-1-gw1-modbus-rtu-bluetooth-gateway/"><img src="https://www.smarteh.com/wp-content/uploads/2023/03/smarteh-lbt-1-bluetooth-mesh-solution_video.jpg" alt="LBT-1.GW1" /> LBT-1.GW1 Modbus RTU Bluetooth gateway</a></td>
</tr>
<tr>
<td style="text-align: center"><a href="https://snapcraft.io/beremiz"><img src="/assets/img/2023-10-29-svghmi/rpi.svg" alt="Raspberry PI" /> <br /> Snap</a></td>
<td style="text-align: center"><a href="">Educational and DIY projects</a></td>
</tr>
</tbody>
</table>
<h2 id="grow-plc-and-hmi-in-harmony">Grow PLC and HMI in harmony</h2>
<p>In SVGHMI, <strong>scalability</strong> applies to both graphics and data. Once HMI and PLC are associated in a first version of a machine, it is easy to extend both of them simultaneously. In most cases DRY principle applies. PLC code or SVG elements can be re-used and extended.</p>
<p>PLC data exposed to HMI is represented in an “HMI Tree” deduced from PLC program. More precisely, HMI Tree is a simplified subset of POU instances tree. PLC programmer selects variables to be exposed by assigning them a derived HMI_* type. For example HMI_REAL is used instead of REAL to expose a floating point variable.</p>
<p><img src="/assets/img/2023-10-29-svghmi/svghmi_trees.svg" alt="svghmi_trees" class="center-image" /></p>
<p>In order to reduce HMI Tree complexity, structure of POU instance tree is not preserved by default. Only POUs having a single HMI_NODE variable defined appear in HMI Tree. This allows to expose variables that are spread in a complex hierarchy of POUs in a single HMI Tree node.</p>
<p><img src="/assets/img/2023-10-29-svghmi/svghmi_types.svg" alt="svghmi_types" class="center-image" /></p>
<h2 id="re-usable-widgets-and-pages">Re-usable widgets and pages</h2>
<p>HMI elements are SVG elements whose labels start with <code class="language-plaintext highlighter-rouge">HMI:</code>. They can be widgets or pages, and can point to locations in HMI tree with a path starting with a <code class="language-plaintext highlighter-rouge">/</code>, and with <code class="language-plaintext highlighter-rouge">/</code>-separated hierarchical levels. For example, <code class="language-plaintext highlighter-rouge">/THIS/IS/A/VALID/HMI_TREE/PATH</code>.</p>
<blockquote>
<p><strong>HMI:Switch@/GREENLIGHT</strong></p>
<p>“Switch” type widget bound to a variable named GREENLIGHT at root of HMI tree</p>
</blockquote>
<p>Each <code class="language-plaintext highlighter-rouge">HMI:Page</code> has a unique name. <code class="language-plaintext highlighter-rouge">HMI:Jump</code> and <code class="language-plaintext highlighter-rouge">HMI:Back</code> widgets are used to switch to other pages. PLC can also trigger page change autonomously. HMI must have at least one SVG element labelled <code class="language-plaintext highlighter-rouge">HMI:Page:Home</code>. <code class="language-plaintext highlighter-rouge">Home</code> is a special page name: it will make this page the landing page when HMI is loaded.</p>
<p><img src="/assets/img/2023-10-29-svghmi/svhgmi_pages.svg" alt="svhgmi_pages" class="center-image" /></p>
<blockquote>
<p><strong>HMI:Page:Home</strong></p>
<p>Mandatory “Home” page declaration</p>
</blockquote>
<blockquote>
<p><strong>HMI:Jump:Home</strong></p>
<p>Change current page to “Home” page when clicked</p>
</blockquote>
<blockquote>
<p><strong>HMI:Back</strong></p>
<p>Change current page back to previous page when clicked</p>
</blockquote>
<p>Pages and groups of widgets can be dynamically re-based to another compatible HMI Tree location. They can then be be re-used as HMI components, paired with corresponding POU instances on PLC side.</p>
<h2 id="simple-yet-powerful-widgets">Simple yet powerful widgets</h2>
<p>Widgets are meant to be as simple as possible. Still, they can become complex when implementing interactions that cannot be broken down into multiple independent widgets.</p>
<table>
<thead>
<tr>
<th style="text-align: center">Meter Widget Template (<code class="language-plaintext highlighter-rouge">HMI:Meter</code>)</th>
<th style="text-align: center">Voltmeter (<code class="language-plaintext highlighter-rouge">HMI:Meter</code>)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center"><img src="/assets/img/2023-10-29-svghmi/svghmi_meter.svg" alt="svhgmi_meter" /></td>
<td style="text-align: center"><img src="/assets/img/2023-10-29-svghmi/svghmi_voltmeter.svg" alt="svhgmi_voltmeter" /></td>
</tr>
</tbody>
</table>
<p>HMI and pages have their own local variables allowing interaction in between widgets bypassing HMI Tree. For example, position of <code class="language-plaintext highlighter-rouge">HMI:Scrollbar</code> can be directly connected to a position in <code class="language-plaintext highlighter-rouge">HMI:JSONTable</code> with a page local variable.</p>
<h2 id="how-does-it-work-">How does it work ?</h2>
<p>HMI’s client and server code is generated during SVGHMI build, based on PLC code and HMI design.</p>
<p><img src="/assets/img/2023-10-29-svghmi/svghmi_overview.svg" alt="SVGHMI" class="center-image" /></p>
<p>SVGHMI build is part of Beremiz build, available in IDE and command line.</p>Edouard TisserantSVGHMI is a SVG based HMI toolkit. With it, PLC programmers and HMI designers can efficiently produce Scalable Web Based HMIs. HMI design happens in Inkscape. Designer freely draws HMI pages and widgets following WYSIWYG principle.New Homepage2022-05-05T00:00:00+00:002022-05-05T00:00:00+00:00https://beremiz.org/2022/05/05/website<p>Beremiz project homepage now uses <a href="https://pages.github.com/">GitHub Pages</a>.</p>
<!--more-->
<ul>
<li>10y+ old YML2 based website was becoming tricky to maintain.</li>
<li>Switching to Jekyll Markdown and GitHub facilitates contribution and maintenance.</li>
</ul>
<p>Website source is in GitHub repository <a href="https://github.com/beremiz/beremiz.github.io">beremiz/beremiz.github.io</a></p>Edouard TisserantBeremiz project homepage now uses GitHub Pages.OSIE, OPC-UA2022-03-05T00:00:00+00:002022-03-05T00:00:00+00:00https://beremiz.org/2022/03/05/osie-OPC-UA<p>Beremiz project is used in <a href="https://www.osie-project.eu/">OSIE project</a> and gains support for OPC-UA client.</p>
<table>
<tbody>
<tr>
<td><img src="/assets/img/2022-03-05-osie-OPC-UA/NXD-Media.Logo.Osie.png" alt="OSIE" /></td>
<td><a href="https://www.osie-project.eu/">OSIE</a> aims to transforms industrial automation into a branch of the open source software and hardware ecosystems.</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td><img src="/assets/img/2022-03-05-osie-OPC-UA/opcua.png" alt="OPC UA" /></td>
<td>OPC UA is a cross-platform, open-source, IEC62541 standard for data exchange from sensors to cloud applications developed by the <a href="https://opcfoundation.org/">OPC Foundation</a>.</td>
</tr>
</tbody>
</table>
<!--more-->
<h2 id="beremiz-and-osie">Beremiz and OSIE</h2>
<p>OSIE will cut prices by an order of magnitude, eliminate interoperability blockers, accelerate data-driven business and provide flexibility for Industry 4.0. It will support real-time orchestration and deterministic, end-to-end communication at the edge using generic hardware.</p>
<p>Beremiz is the IEC-61131 IDE and toolchain selected by the <a href="https://www.osie-project.eu/">OSIE project</a>.</p>
<p>OSIE demonstrated a <a href="https://www.osie-project.eu/P-OSIE.HowTo.Control.A.Coupler.Over.Modbus.With.Beremiz">Proof Of Concept with Beremiz and Modbus</a>.</p>
<h2 id="opc-ua-client-for-beremiz">OPC-UA Client for Beremiz</h2>
<p>OPC-UA Client Beremiz extension let programmer browse OPC-UA server directly in Bermiz IDE, thanks to <a href="https://github.com/FreeOpcUa/python-opcua">FreeOpcUa’s python-opcua</a> implementation.
According to configured servers and selected variables, C code is generated so that runtime can interact with <a href="https://github.com/open62541/open62541">open62541</a> stack to collect and change values of selected server’s variables.</p>
<p><img src="/assets/img/2022-03-05-osie-OPC-UA/OPC-UA-extension.jpg" alt="OPC-UA client extension" /></p>
<p>Extension was developed with re-use and testing in mind. First was developed a simple standalone wxPython app allowing selection of OPC-UA server variables, saving and loading selection, and generate C code of a standalone process that read and write selected variables in a loop. Standalone app is available in source code and can be launched with <code class="language-plaintext highlighter-rouge">python opc_ua/opcua_client_maker.py</code>.</p>
<p><img src="/assets/img/2022-03-05-osie-OPC-UA/OPC-UA-standalone.jpg" alt="OPC-UA Standalone client generator app" /></p>Edouard TisserantBeremiz project is used in OSIE project and gains support for OPC-UA client. OSIE aims to transforms industrial automation into a branch of the open source software and hardware ecosystems. OPC UA is a cross-platform, open-source, IEC62541 standard for data exchange from sensors to cloud applications developed by the OPC Foundation.Support for wxPython 42022-02-28T00:00:00+00:002022-02-28T00:00:00+00:00https://beremiz.org/2022/02/28/wpython4<table>
<tbody>
<tr>
<td><img src="https://github.com/wxWidgets/Phoenix/raw/master/demo/bitmaps/splash.png" alt="" /></td>
<td><a href="http://wxpython.org/">wxPython</a> is a cross-platform GUI toolkit for the <a href="http://www.python.org/">Python</a> programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a set of Python extension modules that wrap the GUI components of the popular <a href="http://wxwidgets.org/">wxWidgets</a> cross platform library, which is written in C++.</td>
</tr>
</tbody>
</table>
<p>As for python 2, wxPython 3.x is depricated. Supporting wxPython 4 is a necessary step in the migration to python 3.</p>
<!--more-->
<h2 id="wxpython-4-together-with-wxpython-3">wxPython 4 together with wxPython 3</h2>
<p>A <a href="https://github.com/beremiz/beremiz/tree/wxPython4">dedicated branch</a> supports wxPython 4. That branch cannot merge with default branch, since many changes are incompatibles. Both branches will be maintained until WxPython 3 can be safely dropped.</p>Edouard TisserantwxPython is a cross-platform GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a set of Python extension modules that wrap the GUI components of the popular wxWidgets cross platform library, which is written in C++. As for python 2, wxPython 3.x is depricated. Supporting wxPython 4 is a necessary step in the migration to python 3.