--- a/LPCExtension.py Fri Apr 18 15:00:12 2025 +0200
+++ b/LPCExtension.py Tue Apr 08 15:27:53 2025 +0200
@@ -22,6 +22,7 @@
product = GetLPCProduct()
if product in SOM28_modules + SOM6_modules:
features.libraries += [('Python', 'py_ext.PythonLibrary', True),
+ ('Common', SimplePOULibraryFactory(_poulibpath("Common")), True), ('RTC', SimplePOULibraryFactory(_poulibpath("RTC")), True),
('MQTT', 'mqtt.MQTTLibrary', True)]
if product in WX_GOT_modules + SVG_GOT_modules:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Pous/pousCommon.xml Tue Apr 08 15:27:53 2025 +0200
@@ -0,0 +1,747 @@
+<?xml version='1.0' encoding='utf-8'?> +<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xsi:schemaLocation="http://www.plcopen.org/xml/tc6_0201"> + <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="0.0" creationDateTime="2008-12-14T16:53:26"/> + <contentHeader name="Beremiz non-standard POUs library" modificationDateTime="2025-04-08T14:47:31"> + <pou name="connect_to_wifi" pouType="functionBlock"> + <variable name="RESULT"> + <variable name="py_eval"> + <derived name="python_eval"/> + <variable name="INTERFACE_NAME"> + <variable name="AUTHENTICATION_TYPE"> + <variable name="PASSWORD"> + <inVariable localId="3" height="35" width="56" executionOrderId="0" negated="false"> + <position x="264" y="416"/> + <relPosition x="56" y="16"/> + <expression>TRIG</expression> + <block localId="1" width="125" height="110" typeName="python_eval" instanceName="py_eval" executionOrderId="0"> + <position x="464" y="392"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="40"/> + <connection refLocalId="3"> + <position x="464" y="432"/> + <position x="320" y="432"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="88"/> + <connection refLocalId="2"> + <position x="464" y="480"/> + <position x="392" y="480"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="40"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="88"/> + <outVariable localId="5" height="35" width="45" executionOrderId="0" negated="false"> + <position x="689" y="417"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="ACK"> + <position x="689" y="432"/> + <position x="589" y="432"/> + <expression>ACK</expression> + <outVariable localId="6" height="35" width="75" executionOrderId="0" negated="false"> + <position x="689" y="462"/> + <relPosition x="0" y="18"/> + <connection refLocalId="1" formalParameter="RESULT"> + <position x="689" y="480"/> + <position x="589" y="480"/> + <expression>RESULT</expression> + <block localId="7" typeName="CONCAT" executionOrderId="0" height="203" width="67"> + <position x="512" y="80"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="32"/> + <connection refLocalId="8"> + <position x="512" y="112"/> + <position x="480" y="112"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="48"/> + <connection refLocalId="9"> + <position x="512" y="128"/> + <position x="224" y="128"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="72"/> + <connection refLocalId="10"> + <position x="512" y="152"/> + <position x="480" y="152"/> + <variable formalParameter="IN4"> + <relPosition x="0" y="88"/> + <connection refLocalId="15"> + <position x="512" y="168"/> + <position x="221" y="168"/> + <variable formalParameter="IN5"> + <relPosition x="0" y="112"/> + <connection refLocalId="4"> + <position x="512" y="192"/> + <position x="480" y="192"/> + <variable formalParameter="IN6"> + <relPosition x="0" y="128"/> + <connection refLocalId="11"> + <position x="512" y="208"/> + <position x="224" y="208"/> + <variable formalParameter="IN7"> + <relPosition x="0" y="152"/> + <connection refLocalId="13"> + <position x="512" y="232"/> + <position x="480" y="232"/> + <variable formalParameter="IN8"> + <relPosition x="0" y="168"/> + <connection refLocalId="12"> + <position x="512" y="248"/> + <position x="224" y="248"/> + <variable formalParameter="IN9"> + <relPosition x="0" y="192"/> + <connection refLocalId="14"> + <position x="512" y="272"/> + <position x="480" y="272"/> + <variable formalParameter="OUT"> + <relPosition x="67" y="32"/> + <inVariable localId="8" executionOrderId="0" height="32" width="192" negated="false"> + <position x="288" y="96"/> + <relPosition x="192" y="16"/> + <expression>'ConnectToWiFi("'</expression> + <inVariable localId="9" executionOrderId="0" height="32" width="128" negated="false"> + <position x="96" y="112"/> + <relPosition x="128" y="16"/> + <expression>INTERFACE_NAME</expression> + <inVariable localId="10" executionOrderId="0" height="32" width="112" negated="false"> + <position x="368" y="136"/> + <relPosition x="112" y="16"/> + <expression>'", "'</expression> + <inVariable localId="11" executionOrderId="0" height="32" width="112" negated="false"> + <position x="112" y="192"/> + <relPosition x="112" y="16"/> + <expression>SSID</expression> + <inVariable localId="14" executionOrderId="0" height="32" width="112" negated="false"> + <position x="368" y="256"/> + <relPosition x="112" y="16"/> + <expression>'")'</expression> + <connector name="Code" localId="30" height="28" width="128"> + <position x="600" y="96"/> + <relPosition x="0" y="16"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="600" y="112"/> + <position x="579" y="112"/> + <continuation name="Code" localId="2" width="128" height="32"> + <position x="264" y="464"/> + <relPosition x="128" y="16"/> + <inVariable localId="4" executionOrderId="0" height="32" width="112" negated="false"> + <position x="368" y="176"/> + <relPosition x="112" y="16"/> + <expression>'", "'</expression> + <inVariable localId="12" executionOrderId="0" height="32" width="112" negated="false"> + <position x="112" y="232"/> + <relPosition x="112" y="16"/> + <expression>PASSWORD</expression> + <inVariable localId="13" executionOrderId="0" height="32" width="112" negated="false"> + <position x="368" y="216"/> + <relPosition x="112" y="16"/> + <expression>'", "'</expression> + <inVariable localId="15" executionOrderId="0" height="35" width="165" negated="false"> + <position x="56" y="152"/> + <relPosition x="165" y="16"/> + <expression>AUTHENTICATION_TYPE</expression> + <pou name="get_network_settings" pouType="functionBlock"> + <variable name="RESULT"> + <variable name="py_eval"> + <derived name="python_eval"/> + <variable name="INTERFACE_NAME"> + <variable name="FIELD_NAME"> + <inVariable localId="3" height="35" width="56" executionOrderId="0" negated="false"> + <position x="256" y="352"/> + <relPosition x="56" y="16"/> + <expression>TRIG</expression> + <block localId="1" width="125" height="110" typeName="python_eval" instanceName="py_eval" executionOrderId="0"> + <position x="456" y="328"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="40"/> + <connection refLocalId="3"> + <position x="456" y="368"/> + <position x="312" y="368"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="88"/> + <connection refLocalId="2"> + <position x="456" y="416"/> + <position x="384" y="416"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="40"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="88"/> + <outVariable localId="5" height="35" width="45" executionOrderId="0" negated="false"> + <position x="681" y="353"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="ACK"> + <position x="681" y="368"/> + <position x="581" y="368"/> + <expression>ACK</expression> + <outVariable localId="6" height="35" width="75" executionOrderId="0" negated="false"> + <position x="681" y="398"/> + <relPosition x="0" y="18"/> + <connection refLocalId="1" formalParameter="RESULT"> + <position x="681" y="416"/> + <position x="581" y="416"/> + <expression>RESULT</expression> + <block localId="7" typeName="CONCAT" executionOrderId="0" height="192" width="64"> + <position x="512" y="80"/> + <variable formalParameter="IN1"> + <relPosition x="0" y="40"/> + <connection refLocalId="8"> + <position x="512" y="120"/> + <position x="464" y="120"/> + <variable formalParameter="IN2"> + <relPosition x="0" y="72"/> + <connection refLocalId="9"> + <position x="512" y="152"/> + <position x="248" y="152"/> + <variable formalParameter="IN3"> + <relPosition x="0" y="104"/> + <connection refLocalId="10"> + <position x="512" y="184"/> + <position x="464" y="184"/> + <variable formalParameter="IN4"> + <relPosition x="0" y="136"/> + <connection refLocalId="11"> + <position x="512" y="216"/> + <position x="248" y="216"/> + <variable formalParameter="IN5"> + <relPosition x="0" y="176"/> + <connection refLocalId="14"> + <position x="512" y="256"/> + <position x="464" y="256"/> + <variable formalParameter="OUT"> + <relPosition x="64" y="40"/> + <inVariable localId="8" executionOrderId="0" height="32" width="192" negated="false"> + <position x="272" y="104"/> + <relPosition x="192" y="16"/> + <expression>'GetNetworkSettings("'</expression> + <inVariable localId="9" executionOrderId="0" height="32" width="128" negated="false"> + <position x="120" y="136"/> + <relPosition x="128" y="16"/> + <expression>INTERFACE_NAME</expression> + <inVariable localId="10" executionOrderId="0" height="32" width="112" negated="false"> + <position x="352" y="168"/> + <relPosition x="112" y="16"/> + <expression>'", "'</expression> + <inVariable localId="11" executionOrderId="0" height="32" width="112" negated="false"> + <position x="136" y="200"/> + <relPosition x="112" y="16"/> + <expression>FIELD_NAME</expression> + <inVariable localId="14" executionOrderId="0" height="32" width="112" negated="false"> + <position x="352" y="240"/> + <relPosition x="112" y="16"/> + <expression>'")'</expression> + <connector name="Code" localId="30" height="28" width="128"> + <position x="632" y="104"/> + <relPosition x="0" y="16"/> + <connection refLocalId="7" formalParameter="OUT"> + <position x="632" y="120"/> + <position x="576" y="120"/> + <continuation name="Code" localId="2" width="128" height="32"> + <position x="256" y="400"/> + <relPosition x="128" y="16"/> + <pou name="get_image_version" pouType="functionBlock"> + <variable name="RESULT"> + <variable name="py_eval"> + <derived name="python_eval"/> + <inVariable localId="4" height="40" width="168" executionOrderId="0" negated="false"> + <position x="72" y="102"/> + <relPosition x="168" y="18"/> + <expression>'GetImageVersion()'</expression> + <inVariable localId="3" height="35" width="56" executionOrderId="0" negated="false"> + <position x="72" y="56"/> + <relPosition x="56" y="16"/> + <expression>TRIG</expression> + <block localId="1" width="125" height="110" typeName="python_eval" instanceName="py_eval" executionOrderId="0"> + <position x="272" y="32"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="40"/> + <connection refLocalId="3"> + <position x="272" y="72"/> + <position x="128" y="72"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="88"/> + <connection refLocalId="4"> + <position x="272" y="120"/> + <position x="127" y="120"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="40"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="88"/> + <outVariable localId="5" height="35" width="45" executionOrderId="0" negated="false"> + <position x="497" y="57"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="ACK"> + <position x="497" y="72"/> + <position x="397" y="72"/> + <expression>ACK</expression> + <outVariable localId="6" height="35" width="75" executionOrderId="0" negated="false"> + <position x="497" y="102"/> + <relPosition x="0" y="18"/> + <connection refLocalId="1" formalParameter="RESULT"> + <position x="497" y="120"/> + <position x="397" y="120"/> + <expression>RESULT</expression> + <pou name="get_linux_version" pouType="functionBlock"> + <variable name="RESULT"> + <variable name="py_eval"> + <derived name="python_eval"/> + <inVariable localId="4" height="40" width="168" executionOrderId="0" negated="false"> + <position x="72" y="102"/> + <relPosition x="168" y="18"/> + <expression>'GetLinuxVersion()'</expression> + <inVariable localId="3" height="35" width="56" executionOrderId="0" negated="false"> + <position x="72" y="56"/> + <relPosition x="56" y="16"/> + <expression>TRIG</expression> + <block localId="1" width="125" height="110" typeName="python_eval" instanceName="py_eval" executionOrderId="0"> + <position x="272" y="32"/> + <variable formalParameter="TRIG"> + <relPosition x="0" y="40"/> + <connection refLocalId="3"> + <position x="272" y="72"/> + <position x="128" y="72"/> + <variable formalParameter="CODE"> + <relPosition x="0" y="88"/> + <connection refLocalId="4"> + <position x="272" y="120"/> + <position x="127" y="120"/> + <variable formalParameter="ACK"> + <relPosition x="125" y="40"/> + <variable formalParameter="RESULT"> + <relPosition x="125" y="88"/> + <outVariable localId="5" height="35" width="45" executionOrderId="0" negated="false"> + <position x="497" y="57"/> + <relPosition x="0" y="15"/> + <connection refLocalId="1" formalParameter="ACK"> + <position x="497" y="72"/> + <position x="397" y="72"/> + <expression>ACK</expression> + <outVariable localId="6" height="35" width="75" executionOrderId="0" negated="false"> + <position x="497" y="102"/> + <relPosition x="0" y="18"/> + <connection refLocalId="1" formalParameter="RESULT"> + <position x="497" y="120"/> + <position x="397" y="120"/> + <expression>RESULT</expression>