Move tests/project/modbus in exemples.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/beremiz.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8'?> +<BeremizRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema" URI_location="LOCAL://"> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_0@ModbusRequest/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="ModbusRequest_0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_0@ModbusRequest/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<ModbusRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" Function="16 - Write Multiple Registers" SlaveID="0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_1@ModbusRequest/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="1" Name="ModbusRequest_1"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_1@ModbusRequest/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<ModbusRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" Function="04 - Read Input Registers" SlaveID="0" Start_Address="0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="ModbusTCPclient_0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<ModbusTCPclient xmlns:xsd="http://www.w3.org/2001/XMLSchema" Remote_Port_Number="1502"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/HoldingRegs@MemoryArea/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="HoldingRegs"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/HoldingRegs@MemoryArea/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<MemoryArea xmlns:xsd="http://www.w3.org/2001/XMLSchema" MemoryAreaType="03 - Holding Registers" Nr_of_Channels="1"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/InputRegs@MemoryArea/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="1" Name="InputRegs"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/InputRegs@MemoryArea/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<MemoryArea xmlns:xsd="http://www.w3.org/2001/XMLSchema" MemoryAreaType="04 - Input Registers"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="1" Name="ModbusTCPserver_0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<ModbusServerNode xmlns:xsd="http://www.w3.org/2001/XMLSchema" Local_Port_Number="1502" Local_IP_Address="127.0.0.1"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/baseconfnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="modbus_0"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/modbus_0@modbus/confnode.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='utf-8'?> +<ModbusRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema"/> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/exemples/modbus/plc.xml Wed Oct 18 19:36:20 2023 +0200
@@ -0,0 +1,314 @@
+<?xml version='1.0' encoding='utf-8'?> +<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201"> + <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2018-07-27T13:19:12"/> + <contentHeader name="Modbus" modificationDateTime="2018-07-27T15:43:56"> + <pou name="program0" pouType="program"> + <variable name="Counter"> + <variable name="CounterReadBack"> + <variable name="MasterWriteToReg0" address="%QW0.0.0.0"> + <variable name="MasterReadFromReg1" address="%IW0.0.1.0"> + <variable name="SlaveHoldReg0" address="%IW0.1.0.0"> + <variable name="SlaveInputReg0" address="%QW0.1.1.0"> + <variable name="Generator0"> + <derived name="Generator"/> + <comment localId="4" height="109" width="350"> + <position x="102" y="438"/> + <xhtml:p><![CDATA[Modbus TCP Master writes counter value to one holding register on Modbus TCP Slave and reads it back from other input register.]]></xhtml:p> + <comment localId="3" height="407" width="680"> + <position x="21" y="15"/> + <xhtml:p><![CDATA[This examples shows how to work with Modbus extension. It uses Modbus TCP, but the same functions are available for Modbus RTU as well. Buth protocols are supported. +Modbus extensions requires native Modbus RTU/TCP library to be installed nearby Beremiz. +Following directory structure is expected: +If Modbus library is installed elsewhere, then place corresponding paths +in CFLAGS/LDFLAGS in project settings. +For GNU/Linux to install Modbus library in parent directory run following commands: +$ hg clone https://bitbucket.org/mjsousa/modbus Modbus +After that Modbus extension is ready to be used in Beremiz projects.]]></xhtml:p> + <block localId="5" typeName="CTU" instanceName="CTU0" executionOrderId="0" height="80" width="52"> + <position x="346" y="605"/> + <variable formalParameter="CU" edge="rising"> + <relPosition x="0" y="30"/> + <connection refLocalId="6" formalParameter="OUT"> + <position x="346" y="635"/> + <position x="303" y="635"/> + <variable formalParameter="R"> + <relPosition x="0" y="50"/> + <variable formalParameter="PV"> + <relPosition x="0" y="70"/> + <connection refLocalId="7"> + <position x="346" y="675"/> + <position x="324" y="675"/> + <position x="324" y="703"/> + <position x="302" y="703"/> + <variable formalParameter="Q"> + <relPosition x="52" y="30"/> + <variable formalParameter="CV"> + <relPosition x="52" y="50"/> + <block localId="6" typeName="Generator" instanceName="Generator0" executionOrderId="0" height="60" width="79"> + <position x="224" y="605"/> + <variable formalParameter="PON"> + <relPosition x="0" y="30"/> + <connection refLocalId="1"> + <position x="224" y="635"/> + <position x="154" y="635"/> + <variable formalParameter="POFF"> + <relPosition x="0" y="50"/> + <connection refLocalId="1"> + <position x="224" y="655"/> + <position x="189" y="655"/> + <position x="189" y="635"/> + <position x="154" y="635"/> + <variable formalParameter="OUT"> + <relPosition x="79" y="30"/> + <inVariable localId="1" executionOrderId="0" height="30" width="138" negated="false"> + <position x="16" y="620"/> + <relPosition x="138" y="15"/> + <expression>T#1s</expression> + <inVariable localId="7" executionOrderId="0" height="30" width="138" negated="false"> + <position x="164" y="688"/> + <relPosition x="138" y="15"/> + <expression>32767</expression> + <inOutVariable localId="2" executionOrderId="0" height="30" width="138" negatedOut="false" negatedIn="false"> + <position x="544" y="640"/> + <relPosition x="0" y="15"/> + <connection refLocalId="5" formalParameter="CV"> + <position x="544" y="655"/> + <position x="398" y="655"/> + <relPosition x="138" y="15"/> + <expression>Counter</expression> + <outVariable localId="8" executionOrderId="0" height="30" width="138" negated="false"> + <position x="762" y="640"/> + <relPosition x="0" y="15"/> + <connection refLocalId="2"> + <position x="762" y="655"/> + <position x="682" y="655"/> + <expression>MasterWriteToReg0</expression> + <inVariable localId="9" executionOrderId="0" height="30" width="152" negated="false"> + <position x="81" y="747"/> + <relPosition x="152" y="15"/> + <expression>MasterReadFromReg1</expression> + <outVariable localId="10" executionOrderId="0" height="30" width="137" negated="false"> + <position x="547" y="747"/> + <relPosition x="0" y="15"/> + <connection refLocalId="9"> + <position x="547" y="762"/> + <position x="233" y="762"/> + <expression>CounterReadBack</expression> + <comment localId="11" height="109" width="350"> + <position x="85" y="825"/> + <xhtml:p><![CDATA[Modbus TCP Slave just copies received register value from holding register to input register.]]></xhtml:p> + <inVariable localId="12" executionOrderId="0" height="30" width="152" negated="false"> + <position x="82" y="970"/> + <relPosition x="152" y="15"/> + <expression>SlaveHoldReg0</expression> + <outVariable localId="13" executionOrderId="0" height="30" width="123" negated="false"> + <position x="548" y="970"/> + <relPosition x="0" y="15"/> + <connection refLocalId="12"> + <position x="548" y="985"/> + <position x="234" y="985"/> + <expression>SlaveInputReg0</expression> + <pou name="Generator" pouType="functionBlock"> + <xhtml:p><![CDATA[T1( IN := NOT T2.Q, PT := POFF); +T2( IN := T1.Q, PT := PON); +OUT := T2.Q;]]></xhtml:p> + <configuration name="config"> + <resource name="resource1"> + <task name="task0" priority="0" interval="T#20ms"> + <pouInstance name="instance0" typeName="program0"/> --- a/tests/projects/modbus/beremiz.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BeremizRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema" URI_location="LOCAL://">
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_0@ModbusRequest/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="ModbusRequest_0"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_0@ModbusRequest/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<ModbusRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" Function="16 - Write Multiple Registers" SlaveID="0"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_1@ModbusRequest/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="1" Name="ModbusRequest_1"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/ModbusRequest_1@ModbusRequest/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<ModbusRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" Function="04 - Read Input Registers" SlaveID="0" Start_Address="0"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="ModbusTCPclient_0"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPclient_0@ModbusTCPclient/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<ModbusTCPclient xmlns:xsd="http://www.w3.org/2001/XMLSchema" Remote_Port_Number="1502"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/HoldingRegs@MemoryArea/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="HoldingRegs"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/HoldingRegs@MemoryArea/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<MemoryArea xmlns:xsd="http://www.w3.org/2001/XMLSchema" MemoryAreaType="03 - Holding Registers" Nr_of_Channels="1"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/InputRegs@MemoryArea/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="1" Name="InputRegs"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/InputRegs@MemoryArea/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<MemoryArea xmlns:xsd="http://www.w3.org/2001/XMLSchema" MemoryAreaType="04 - Input Registers"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="1" Name="ModbusTCPserver_0"/>
--- a/tests/projects/modbus/modbus_0@modbus/ModbusTCPserver_0@ModbusTCPserver/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<ModbusServerNode xmlns:xsd="http://www.w3.org/2001/XMLSchema" Local_Port_Number="1502" Local_IP_Address="127.0.0.1"/>
--- a/tests/projects/modbus/modbus_0@modbus/baseconfnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<BaseParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" IEC_Channel="0" Name="modbus_0"/>
--- a/tests/projects/modbus/modbus_0@modbus/confnode.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<ModbusRoot xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
--- a/tests/projects/modbus/plc.xml Wed Oct 18 19:28:35 2023 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
- <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2018-07-27T13:19:12"/>
- <contentHeader name="Modbus" modificationDateTime="2018-07-27T15:43:56">
- <pou name="program0" pouType="program">
- <variable name="Counter">
- <variable name="CounterReadBack">
- <variable name="MasterWriteToReg0" address="%QW0.0.0.0">
- <variable name="MasterReadFromReg1" address="%IW0.0.1.0">
- <variable name="SlaveHoldReg0" address="%IW0.1.0.0">
- <variable name="SlaveInputReg0" address="%QW0.1.1.0">
- <variable name="Generator0">
- <derived name="Generator"/>
- <comment localId="4" height="109" width="350">
- <position x="102" y="438"/>
- <xhtml:p><![CDATA[Modbus TCP Master writes counter value to one holding register on Modbus TCP Slave and reads it back from other input register.]]></xhtml:p>
- <comment localId="3" height="407" width="680">
- <position x="21" y="15"/>
- <xhtml:p><![CDATA[This examples shows how to work with Modbus extension. It uses Modbus TCP, but the same functions are available for Modbus RTU as well. Buth protocols are supported.
-Modbus extensions requires native Modbus RTU/TCP library to be installed nearby Beremiz.
-Following directory structure is expected:
-If Modbus library is installed elsewhere, then place corresponding paths
-in CFLAGS/LDFLAGS in project settings.
-For GNU/Linux to install Modbus library in parent directory run following commands:
-$ hg clone https://bitbucket.org/mjsousa/modbus Modbus
-After that Modbus extension is ready to be used in Beremiz projects.]]></xhtml:p>
- <block localId="5" typeName="CTU" instanceName="CTU0" executionOrderId="0" height="80" width="52">
- <position x="346" y="605"/>
- <variable formalParameter="CU" edge="rising">
- <relPosition x="0" y="30"/>
- <connection refLocalId="6" formalParameter="OUT">
- <position x="346" y="635"/>
- <position x="303" y="635"/>
- <variable formalParameter="R">
- <relPosition x="0" y="50"/>
- <variable formalParameter="PV">
- <relPosition x="0" y="70"/>
- <connection refLocalId="7">
- <position x="346" y="675"/>
- <position x="324" y="675"/>
- <position x="324" y="703"/>
- <position x="302" y="703"/>
- <variable formalParameter="Q">
- <relPosition x="52" y="30"/>
- <variable formalParameter="CV">
- <relPosition x="52" y="50"/>
- <block localId="6" typeName="Generator" instanceName="Generator0" executionOrderId="0" height="60" width="79">
- <position x="224" y="605"/>
- <variable formalParameter="PON">
- <relPosition x="0" y="30"/>
- <connection refLocalId="1">
- <position x="224" y="635"/>
- <position x="154" y="635"/>
- <variable formalParameter="POFF">
- <relPosition x="0" y="50"/>
- <connection refLocalId="1">
- <position x="224" y="655"/>
- <position x="189" y="655"/>
- <position x="189" y="635"/>
- <position x="154" y="635"/>
- <variable formalParameter="OUT">
- <relPosition x="79" y="30"/>
- <inVariable localId="1" executionOrderId="0" height="30" width="138" negated="false">
- <position x="16" y="620"/>
- <relPosition x="138" y="15"/>
- <expression>T#1s</expression>
- <inVariable localId="7" executionOrderId="0" height="30" width="138" negated="false">
- <position x="164" y="688"/>
- <relPosition x="138" y="15"/>
- <expression>32767</expression>
- <inOutVariable localId="2" executionOrderId="0" height="30" width="138" negatedOut="false" negatedIn="false">
- <position x="544" y="640"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="5" formalParameter="CV">
- <position x="544" y="655"/>
- <position x="398" y="655"/>
- <relPosition x="138" y="15"/>
- <expression>Counter</expression>
- <outVariable localId="8" executionOrderId="0" height="30" width="138" negated="false">
- <position x="762" y="640"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="2">
- <position x="762" y="655"/>
- <position x="682" y="655"/>
- <expression>MasterWriteToReg0</expression>
- <inVariable localId="9" executionOrderId="0" height="30" width="152" negated="false">
- <position x="81" y="747"/>
- <relPosition x="152" y="15"/>
- <expression>MasterReadFromReg1</expression>
- <outVariable localId="10" executionOrderId="0" height="30" width="137" negated="false">
- <position x="547" y="747"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="9">
- <position x="547" y="762"/>
- <position x="233" y="762"/>
- <expression>CounterReadBack</expression>
- <comment localId="11" height="109" width="350">
- <position x="85" y="825"/>
- <xhtml:p><![CDATA[Modbus TCP Slave just copies received register value from holding register to input register.]]></xhtml:p>
- <inVariable localId="12" executionOrderId="0" height="30" width="152" negated="false">
- <position x="82" y="970"/>
- <relPosition x="152" y="15"/>
- <expression>SlaveHoldReg0</expression>
- <outVariable localId="13" executionOrderId="0" height="30" width="123" negated="false">
- <position x="548" y="970"/>
- <relPosition x="0" y="15"/>
- <connection refLocalId="12">
- <position x="548" y="985"/>
- <position x="234" y="985"/>
- <expression>SlaveInputReg0</expression>
- <pou name="Generator" pouType="functionBlock">
- <xhtml:p><![CDATA[T1( IN := NOT T2.Q, PT := POFF);
-T2( IN := T1.Q, PT := PON);
-OUT := T2.Q;]]></xhtml:p>
- <configuration name="config">
- <resource name="resource1">
- <task name="task0" priority="0" interval="T#20ms">
- <pouInstance name="instance0" typeName="program0"/>