tests/projects/wamp/plc.xml
changeset 3416 53c66c4aefa3
parent 2298 10cfc280927c
equal deleted inserted replaced
3415:c270b6c8162b 3416:53c66c4aefa3
       
     1 <?xml version='1.0' encoding='utf-8'?>
       
     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">
       
     3   <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2015-02-05T11:44:55" contentDescription=" &#10;&#10;"/>
       
     4   <contentHeader name="WAMPTest" modificationDateTime="2018-08-27T11:11:30">
       
     5     <coordinateInfo>
       
     6       <fbd>
       
     7         <scaling x="0" y="0"/>
       
     8       </fbd>
       
     9       <ld>
       
    10         <scaling x="0" y="0"/>
       
    11       </ld>
       
    12       <sfc>
       
    13         <scaling x="0" y="0"/>
       
    14       </sfc>
       
    15     </coordinateInfo>
       
    16   </contentHeader>
       
    17   <types>
       
    18     <dataTypes/>
       
    19     <pous>
       
    20       <pou name="program0" pouType="program">
       
    21         <interface>
       
    22           <localVars>
       
    23             <variable name="LocalVar0">
       
    24               <type>
       
    25                 <DINT/>
       
    26               </type>
       
    27               <initialValue>
       
    28                 <simpleValue value="1"/>
       
    29               </initialValue>
       
    30             </variable>
       
    31           </localVars>
       
    32           <externalVars>
       
    33             <variable name="PyVar0">
       
    34               <type>
       
    35                 <DINT/>
       
    36               </type>
       
    37             </variable>
       
    38             <variable name="PyVar1">
       
    39               <type>
       
    40                 <DINT/>
       
    41               </type>
       
    42             </variable>
       
    43           </externalVars>
       
    44         </interface>
       
    45         <body>
       
    46           <FBD>
       
    47             <inVariable localId="1" executionOrderId="0" height="30" width="55" negated="false">
       
    48               <position x="57" y="540"/>
       
    49               <connectionPointOut>
       
    50                 <relPosition x="55" y="15"/>
       
    51               </connectionPointOut>
       
    52               <expression>PyVar0</expression>
       
    53             </inVariable>
       
    54             <block localId="3" typeName="ADD" executionOrderId="0" height="60" width="67">
       
    55               <position x="168" y="525"/>
       
    56               <inputVariables>
       
    57                 <variable formalParameter="IN1">
       
    58                   <connectionPointIn>
       
    59                     <relPosition x="0" y="30"/>
       
    60                     <connection refLocalId="1">
       
    61                       <position x="168" y="555"/>
       
    62                       <position x="112" y="555"/>
       
    63                     </connection>
       
    64                   </connectionPointIn>
       
    65                 </variable>
       
    66                 <variable formalParameter="IN2">
       
    67                   <connectionPointIn>
       
    68                     <relPosition x="0" y="50"/>
       
    69                     <connection refLocalId="4">
       
    70                       <position x="168" y="575"/>
       
    71                       <position x="151" y="575"/>
       
    72                       <position x="151" y="595"/>
       
    73                       <position x="112" y="595"/>
       
    74                     </connection>
       
    75                   </connectionPointIn>
       
    76                 </variable>
       
    77               </inputVariables>
       
    78               <inOutVariables/>
       
    79               <outputVariables>
       
    80                 <variable formalParameter="OUT">
       
    81                   <connectionPointOut>
       
    82                     <relPosition x="67" y="30"/>
       
    83                   </connectionPointOut>
       
    84                 </variable>
       
    85               </outputVariables>
       
    86             </block>
       
    87             <inVariable localId="4" executionOrderId="0" height="30" width="73" negated="false">
       
    88               <position x="39" y="580"/>
       
    89               <connectionPointOut>
       
    90                 <relPosition x="73" y="15"/>
       
    91               </connectionPointOut>
       
    92               <expression>LocalVar0</expression>
       
    93             </inVariable>
       
    94             <comment localId="5" height="459" width="788">
       
    95               <position x="23" y="10"/>
       
    96               <content>
       
    97                 <xhtml:p><![CDATA[Communication between Beremiz and PLC runtime isn't bound to any specific protocol and could be extended by writing corresponding connector (see 'connectors' directory).
       
    98 Beremiz reference runtime implementation supports PYRO and WAMP protocols.
       
    99 This example shows how to use Web Application Messaging Protocol (WAMP).
       
   100 
       
   101 WAMP can be used to build distributed systems out of application components which are loosely coupled and communicate in real-time. No direct connection between IDE and PLC are necessary.
       
   102 
       
   103 WAMP is in a process to be published as official IETF standard. Draft specification is already available on IETF website.
       
   104 	
       
   105 To use this example you need WAMP router and standalone running Beremiz_service.
       
   106 1. See README file in project's directory with detailed instructions for
       
   107 setup Crossbar.io, router for open Web Application Messaging Protocol (WAMP).
       
   108 2. Run crossbar
       
   109 3. Create service working directory and copy wampconf.json from project_files to created directory
       
   110 4. Run Beremiz_service:
       
   111 ./Beremiz_service.py -x 0 <working directory>
       
   112 ]]></xhtml:p>
       
   113               </content>
       
   114             </comment>
       
   115             <inOutVariable localId="2" executionOrderId="0" height="30" width="55" negatedOut="false" negatedIn="false">
       
   116               <position x="270" y="540"/>
       
   117               <connectionPointIn>
       
   118                 <relPosition x="0" y="15"/>
       
   119                 <connection refLocalId="3" formalParameter="OUT">
       
   120                   <position x="270" y="555"/>
       
   121                   <position x="235" y="555"/>
       
   122                 </connection>
       
   123               </connectionPointIn>
       
   124               <connectionPointOut>
       
   125                 <relPosition x="55" y="15"/>
       
   126               </connectionPointOut>
       
   127               <expression>PyVar1</expression>
       
   128             </inOutVariable>
       
   129             <outVariable localId="6" executionOrderId="0" height="30" width="55" negated="false">
       
   130               <position x="362" y="540"/>
       
   131               <connectionPointIn>
       
   132                 <relPosition x="0" y="15"/>
       
   133                 <connection refLocalId="2">
       
   134                   <position x="362" y="555"/>
       
   135                   <position x="325" y="555"/>
       
   136                 </connection>
       
   137               </connectionPointIn>
       
   138               <expression>PyVar0</expression>
       
   139             </outVariable>
       
   140           </FBD>
       
   141         </body>
       
   142       </pou>
       
   143     </pous>
       
   144   </types>
       
   145   <instances>
       
   146     <configurations>
       
   147       <configuration name="config">
       
   148         <resource name="resource1">
       
   149           <task name="Task0" priority="0" interval="T#100ms">
       
   150             <pouInstance name="Instance0" typeName="program0"/>
       
   151           </task>
       
   152         </resource>
       
   153       </configuration>
       
   154     </configurations>
       
   155   </instances>
       
   156 </project>