tests/projects/modbus/plc.xml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Mon, 25 Jul 2022 11:51:41 +0200
branchwxPython4
changeset 3562 165dc0e97f1d
parent 3416 53c66c4aefa3
permissions -rw-r--r--
tests: Change OCR options to be more reliable on small fonts.
2252
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     1
<?xml version='1.0' encoding='utf-8'?>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     2
<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">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     3
  <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2018-07-27T13:19:12"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     4
  <contentHeader name="Modbus" modificationDateTime="2018-07-27T15:43:56">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     5
    <coordinateInfo>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     6
      <fbd>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     7
        <scaling x="0" y="0"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     8
      </fbd>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
     9
      <ld>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    10
        <scaling x="0" y="0"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    11
      </ld>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    12
      <sfc>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    13
        <scaling x="0" y="0"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    14
      </sfc>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    15
    </coordinateInfo>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    16
  </contentHeader>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    17
  <types>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    18
    <dataTypes/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    19
    <pous>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    20
      <pou name="program0" pouType="program">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    21
        <interface>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    22
          <localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    23
            <variable name="Counter">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    24
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    25
                <INT/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    26
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    27
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    28
            <variable name="CounterReadBack">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    29
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    30
                <INT/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    31
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    32
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    33
          </localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    34
          <localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    35
            <variable name="MasterWriteToReg0" address="%QW0.0.0.0">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    36
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    37
                <INT/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    38
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    39
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    40
            <variable name="MasterReadFromReg1" address="%IW0.0.1.0">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    41
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    42
                <INT/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    43
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    44
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    45
            <variable name="SlaveHoldReg0" address="%IW0.1.0.0">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    46
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    47
                <WORD/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    48
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    49
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    50
            <variable name="SlaveInputReg0" address="%QW0.1.1.0">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    51
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    52
                <WORD/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    53
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    54
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    55
          </localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    56
          <localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    57
            <variable name="CTU0">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    58
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    59
                <derived name="CTU"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    60
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    61
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    62
            <variable name="Generator0">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    63
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    64
                <derived name="Generator"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    65
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    66
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    67
          </localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    68
        </interface>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    69
        <body>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    70
          <FBD>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    71
            <comment localId="4" height="109" width="350">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    72
              <position x="102" y="438"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    73
              <content>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    74
                <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>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    75
              </content>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    76
            </comment>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    77
            <comment localId="3" height="407" width="680">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    78
              <position x="21" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    79
              <content>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    80
                <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.
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    81
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    82
Modbus extensions requires native Modbus RTU/TCP library to be installed nearby Beremiz.
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    83
Following directory structure is expected:
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    84
<Parent directory>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    85
  "beremiz"
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    86
  "Modbus"
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    87
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    88
If Modbus library is installed elsewhere, then place corresponding paths
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    89
in CFLAGS/LDFLAGS in project settings.
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    90
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    91
For GNU/Linux to install Modbus library in parent directory run following commands:
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    92
$ hg clone https://bitbucket.org/mjsousa/modbus Modbus
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    93
$ cd Modbus
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    94
$ make
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    95
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    96
After that Modbus extension is ready to be used in Beremiz projects.]]></xhtml:p>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    97
              </content>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    98
            </comment>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
    99
            <block localId="5" typeName="CTU" instanceName="CTU0" executionOrderId="0" height="80" width="52">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   100
              <position x="346" y="605"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   101
              <inputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   102
                <variable formalParameter="CU" edge="rising">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   103
                  <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   104
                    <relPosition x="0" y="30"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   105
                    <connection refLocalId="6" formalParameter="OUT">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   106
                      <position x="346" y="635"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   107
                      <position x="303" y="635"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   108
                    </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   109
                  </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   110
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   111
                <variable formalParameter="R">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   112
                  <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   113
                    <relPosition x="0" y="50"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   114
                  </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   115
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   116
                <variable formalParameter="PV">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   117
                  <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   118
                    <relPosition x="0" y="70"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   119
                    <connection refLocalId="7">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   120
                      <position x="346" y="675"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   121
                      <position x="324" y="675"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   122
                      <position x="324" y="703"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   123
                      <position x="302" y="703"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   124
                    </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   125
                  </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   126
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   127
              </inputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   128
              <inOutVariables/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   129
              <outputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   130
                <variable formalParameter="Q">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   131
                  <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   132
                    <relPosition x="52" y="30"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   133
                  </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   134
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   135
                <variable formalParameter="CV">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   136
                  <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   137
                    <relPosition x="52" y="50"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   138
                  </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   139
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   140
              </outputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   141
            </block>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   142
            <block localId="6" typeName="Generator" instanceName="Generator0" executionOrderId="0" height="60" width="79">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   143
              <position x="224" y="605"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   144
              <inputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   145
                <variable formalParameter="PON">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   146
                  <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   147
                    <relPosition x="0" y="30"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   148
                    <connection refLocalId="1">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   149
                      <position x="224" y="635"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   150
                      <position x="154" y="635"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   151
                    </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   152
                  </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   153
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   154
                <variable formalParameter="POFF">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   155
                  <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   156
                    <relPosition x="0" y="50"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   157
                    <connection refLocalId="1">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   158
                      <position x="224" y="655"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   159
                      <position x="189" y="655"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   160
                      <position x="189" y="635"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   161
                      <position x="154" y="635"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   162
                    </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   163
                  </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   164
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   165
              </inputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   166
              <inOutVariables/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   167
              <outputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   168
                <variable formalParameter="OUT">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   169
                  <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   170
                    <relPosition x="79" y="30"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   171
                  </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   172
                </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   173
              </outputVariables>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   174
            </block>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   175
            <inVariable localId="1" executionOrderId="0" height="30" width="138" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   176
              <position x="16" y="620"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   177
              <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   178
                <relPosition x="138" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   179
              </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   180
              <expression>T#1s</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   181
            </inVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   182
            <inVariable localId="7" executionOrderId="0" height="30" width="138" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   183
              <position x="164" y="688"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   184
              <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   185
                <relPosition x="138" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   186
              </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   187
              <expression>32767</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   188
            </inVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   189
            <inOutVariable localId="2" executionOrderId="0" height="30" width="138" negatedOut="false" negatedIn="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   190
              <position x="544" y="640"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   191
              <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   192
                <relPosition x="0" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   193
                <connection refLocalId="5" formalParameter="CV">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   194
                  <position x="544" y="655"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   195
                  <position x="398" y="655"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   196
                </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   197
              </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   198
              <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   199
                <relPosition x="138" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   200
              </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   201
              <expression>Counter</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   202
            </inOutVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   203
            <outVariable localId="8" executionOrderId="0" height="30" width="138" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   204
              <position x="762" y="640"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   205
              <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   206
                <relPosition x="0" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   207
                <connection refLocalId="2">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   208
                  <position x="762" y="655"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   209
                  <position x="682" y="655"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   210
                </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   211
              </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   212
              <expression>MasterWriteToReg0</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   213
            </outVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   214
            <inVariable localId="9" executionOrderId="0" height="30" width="152" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   215
              <position x="81" y="747"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   216
              <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   217
                <relPosition x="152" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   218
              </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   219
              <expression>MasterReadFromReg1</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   220
            </inVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   221
            <outVariable localId="10" executionOrderId="0" height="30" width="137" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   222
              <position x="547" y="747"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   223
              <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   224
                <relPosition x="0" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   225
                <connection refLocalId="9">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   226
                  <position x="547" y="762"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   227
                  <position x="233" y="762"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   228
                </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   229
              </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   230
              <expression>CounterReadBack</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   231
            </outVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   232
            <comment localId="11" height="109" width="350">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   233
              <position x="85" y="825"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   234
              <content>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   235
                <xhtml:p><![CDATA[Modbus TCP Slave just copies received register value from holding register to input register.]]></xhtml:p>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   236
              </content>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   237
            </comment>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   238
            <inVariable localId="12" executionOrderId="0" height="30" width="152" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   239
              <position x="82" y="970"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   240
              <connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   241
                <relPosition x="152" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   242
              </connectionPointOut>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   243
              <expression>SlaveHoldReg0</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   244
            </inVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   245
            <outVariable localId="13" executionOrderId="0" height="30" width="123" negated="false">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   246
              <position x="548" y="970"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   247
              <connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   248
                <relPosition x="0" y="15"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   249
                <connection refLocalId="12">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   250
                  <position x="548" y="985"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   251
                  <position x="234" y="985"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   252
                </connection>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   253
              </connectionPointIn>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   254
              <expression>SlaveInputReg0</expression>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   255
            </outVariable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   256
          </FBD>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   257
        </body>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   258
      </pou>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   259
      <pou name="Generator" pouType="functionBlock">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   260
        <interface>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   261
          <outputVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   262
            <variable name="OUT">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   263
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   264
                <BOOL/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   265
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   266
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   267
          </outputVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   268
          <inputVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   269
            <variable name="PON">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   270
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   271
                <TIME/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   272
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   273
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   274
            <variable name="POFF">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   275
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   276
                <TIME/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   277
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   278
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   279
          </inputVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   280
          <localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   281
            <variable name="T1">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   282
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   283
                <derived name="TON"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   284
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   285
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   286
            <variable name="T2">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   287
              <type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   288
                <derived name="TOF"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   289
              </type>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   290
            </variable>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   291
          </localVars>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   292
        </interface>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   293
        <body>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   294
          <ST>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   295
            <xhtml:p><![CDATA[T1( IN := NOT T2.Q, PT := POFF);
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   296
T2( IN := T1.Q,     PT := PON);
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   297
OUT := T2.Q;]]></xhtml:p>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   298
          </ST>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   299
        </body>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   300
      </pou>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   301
    </pous>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   302
  </types>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   303
  <instances>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   304
    <configurations>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   305
      <configuration name="config">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   306
        <resource name="resource1">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   307
          <task name="task0" priority="0" interval="T#20ms">
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   308
            <pouInstance name="instance0" typeName="program0"/>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   309
          </task>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   310
        </resource>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   311
      </configuration>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   312
    </configurations>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   313
  </instances>
de3f7c183e62 Add Modbus example
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents:
diff changeset
   314
</project>