tests/first_steps/plc.xml
changeset 2170 ce5bd74ed552
parent 1552 9a59d1de198a
child 2296 a2ab363f9e90
equal deleted inserted replaced
2169:baa0c5111457 2170:ce5bd74ed552
     1 <?xml version='1.0' encoding='utf-8'?>
     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">
     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="2016-10-24T18:09:22"/>
     3   <fileHeader companyName="Beremiz" productName="Beremiz" productVersion="1" creationDateTime="2016-10-24T18:09:22"/>
     4   <contentHeader name="First Steps" modificationDateTime="2016-10-26T20:18:02">
     4   <contentHeader name="First Steps" modificationDateTime="2018-05-31T12:59:20">
     5     <coordinateInfo>
     5     <coordinateInfo>
     6       <fbd>
     6       <fbd>
     7         <scaling x="0" y="0"/>
     7         <scaling x="0" y="0"/>
     8       </fbd>
     8       </fbd>
     9       <ld>
     9       <ld>
    15     </coordinateInfo>
    15     </coordinateInfo>
    16   </contentHeader>
    16   </contentHeader>
    17   <types>
    17   <types>
    18     <dataTypes/>
    18     <dataTypes/>
    19     <pous>
    19     <pous>
       
    20       <pou name="AverageVal" pouType="function">
       
    21         <interface>
       
    22           <returnType>
       
    23             <REAL/>
       
    24           </returnType>
       
    25           <inputVars>
       
    26             <variable name="Cnt1">
       
    27               <type>
       
    28                 <INT/>
       
    29               </type>
       
    30             </variable>
       
    31             <variable name="Cnt2">
       
    32               <type>
       
    33                 <INT/>
       
    34               </type>
       
    35             </variable>
       
    36             <variable name="Cnt3">
       
    37               <type>
       
    38                 <INT/>
       
    39               </type>
       
    40             </variable>
       
    41             <variable name="Cnt4">
       
    42               <type>
       
    43                 <INT/>
       
    44               </type>
       
    45             </variable>
       
    46             <variable name="Cnt5">
       
    47               <type>
       
    48                 <INT/>
       
    49               </type>
       
    50             </variable>
       
    51           </inputVars>
       
    52           <localVars>
       
    53             <variable name="InputsNumber">
       
    54               <type>
       
    55                 <REAL/>
       
    56               </type>
       
    57               <initialValue>
       
    58                 <simpleValue value="5.0"/>
       
    59               </initialValue>
       
    60               <documentation>
       
    61                 <xhtml:p><![CDATA[Количество входных значений]]></xhtml:p>
       
    62               </documentation>
       
    63             </variable>
       
    64           </localVars>
       
    65         </interface>
       
    66         <body>
       
    67           <ST>
       
    68             <xhtml:p><![CDATA[AverageVal := INT_TO_REAL(Cnt1+Cnt2+Cnt3+Cnt4+Cnt5)/InputsNumber;]]></xhtml:p>
       
    69           </ST>
       
    70         </body>
       
    71       </pou>
    20       <pou name="plc_prg" pouType="program">
    72       <pou name="plc_prg" pouType="program">
    21         <interface>
    73         <interface>
    22           <inputVars>
    74           <inputVars>
    23             <variable name="Reset">
    75             <variable name="Reset">
    24               <type>
    76               <type>
    75               </type>
   127               </type>
    76             </variable>
   128             </variable>
    77             <variable name="CounterLD0">
   129             <variable name="CounterLD0">
    78               <type>
   130               <type>
    79                 <derived name="CounterLD"/>
   131                 <derived name="CounterLD"/>
       
   132               </type>
       
   133             </variable>
       
   134             <variable name="AVCnt">
       
   135               <type>
       
   136                 <REAL/>
    80               </type>
   137               </type>
    81             </variable>
   138             </variable>
    82           </localVars>
   139           </localVars>
    83         </interface>
   140         </interface>
    84         <body>
   141         <body>
   103                     <relPosition x="125" y="40"/>
   160                     <relPosition x="125" y="40"/>
   104                   </connectionPointOut>
   161                   </connectionPointOut>
   105                 </variable>
   162                 </variable>
   106               </outputVariables>
   163               </outputVariables>
   107             </block>
   164             </block>
   108             <inVariable localId="2" executionOrderId="0" height="24" width="79" negated="false">
   165             <inVariable localId="2" executionOrderId="0" height="30" width="79" negated="false">
   109               <position x="35" y="81"/>
   166               <position x="35" y="81"/>
   110               <connectionPointOut>
   167               <connectionPointOut>
   111                 <relPosition x="79" y="12"/>
   168                 <relPosition x="79" y="15"/>
   112               </connectionPointOut>
   169               </connectionPointOut>
   113               <expression>Reset</expression>
   170               <expression>Reset</expression>
   114             </inVariable>
   171             </inVariable>
   115             <outVariable localId="3" executionOrderId="0" height="24" width="106" negated="false">
       
   116               <position x="424" y="81"/>
       
   117               <connectionPointIn>
       
   118                 <relPosition x="0" y="12"/>
       
   119                 <connection refLocalId="1" formalParameter="OUT">
       
   120                   <position x="424" y="93"/>
       
   121                   <position x="332" y="93"/>
       
   122                 </connection>
       
   123               </connectionPointIn>
       
   124               <expression>Cnt1</expression>
       
   125             </outVariable>
       
   126             <block localId="4" typeName="CounterFBD" instanceName="CounterFBD0" executionOrderId="0" height="54" width="121">
   172             <block localId="4" typeName="CounterFBD" instanceName="CounterFBD0" executionOrderId="0" height="54" width="121">
   127               <position x="211" y="145"/>
   173               <position x="211" y="145"/>
   128               <inputVariables>
   174               <inputVariables>
   129                 <variable formalParameter="Reset">
   175                 <variable formalParameter="Reset">
   130                   <connectionPointIn>
   176                   <connectionPointIn>
   143                     <relPosition x="121" y="37"/>
   189                     <relPosition x="121" y="37"/>
   144                   </connectionPointOut>
   190                   </connectionPointOut>
   145                 </variable>
   191                 </variable>
   146               </outputVariables>
   192               </outputVariables>
   147             </block>
   193             </block>
   148             <outVariable localId="5" executionOrderId="0" height="24" width="103" negated="false">
   194             <comment localId="6" height="306" width="434">
   149               <position x="426" y="170"/>
   195               <position x="620" y="130"/>
   150               <connectionPointIn>
       
   151                 <relPosition x="0" y="12"/>
       
   152                 <connection refLocalId="4" formalParameter="OUT">
       
   153                   <position x="426" y="182"/>
       
   154                   <position x="332" y="182"/>
       
   155                 </connection>
       
   156               </connectionPointIn>
       
   157               <expression>Cnt2</expression>
       
   158             </outVariable>
       
   159             <comment localId="6" height="264" width="417">
       
   160               <position x="569" y="55"/>
       
   161               <content>
   196               <content>
   162                 <xhtml:p><![CDATA[In this example function block with the same functionality 
   197                 <xhtml:p><![CDATA[In this example function block with the same functionality 
   163 is created using all five IEC 61131-3 programing languages:
   198 is created using all five IEC 61131-3 programing languages:
   164 - IL;
   199 - IL;
   165 - FBD;
   200 - FBD;
   197                     <relPosition x="121" y="36"/>
   232                     <relPosition x="121" y="36"/>
   198                   </connectionPointOut>
   233                   </connectionPointOut>
   199                 </variable>
   234                 </variable>
   200               </outputVariables>
   235               </outputVariables>
   201             </block>
   236             </block>
   202             <outVariable localId="8" executionOrderId="0" height="24" width="97" negated="false">
       
   203               <position x="431" y="261"/>
       
   204               <connectionPointIn>
       
   205                 <relPosition x="0" y="12"/>
       
   206                 <connection refLocalId="7" formalParameter="OUT">
       
   207                   <position x="431" y="273"/>
       
   208                   <position x="332" y="273"/>
       
   209                 </connection>
       
   210               </connectionPointIn>
       
   211               <expression>Cnt3</expression>
       
   212             </outVariable>
       
   213             <block localId="9" typeName="CounterIL" instanceName="CounterIL0" executionOrderId="0" height="62" width="121">
   237             <block localId="9" typeName="CounterIL" instanceName="CounterIL0" executionOrderId="0" height="62" width="121">
   214               <position x="211" y="322"/>
   238               <position x="211" y="322"/>
   215               <inputVariables>
   239               <inputVariables>
   216                 <variable formalParameter="Reset">
   240                 <variable formalParameter="Reset">
   217                   <connectionPointIn>
   241                   <connectionPointIn>
   230                     <relPosition x="121" y="41"/>
   254                     <relPosition x="121" y="41"/>
   231                   </connectionPointOut>
   255                   </connectionPointOut>
   232                 </variable>
   256                 </variable>
   233               </outputVariables>
   257               </outputVariables>
   234             </block>
   258             </block>
   235             <inVariable localId="10" executionOrderId="0" height="24" width="67" negated="false">
   259             <inVariable localId="10" executionOrderId="0" height="30" width="67" negated="false">
   236               <position x="34" y="351"/>
   260               <position x="34" y="351"/>
   237               <connectionPointOut>
   261               <connectionPointOut>
   238                 <relPosition x="67" y="12"/>
   262                 <relPosition x="67" y="15"/>
   239               </connectionPointOut>
   263               </connectionPointOut>
   240               <expression>Reset</expression>
   264               <expression>Reset</expression>
   241             </inVariable>
   265             </inVariable>
   242             <outVariable localId="11" executionOrderId="0" height="24" width="91" negated="false">
   266             <inVariable localId="12" executionOrderId="0" height="30" width="67" negated="false">
   243               <position x="434" y="351"/>
       
   244               <connectionPointIn>
       
   245                 <relPosition x="0" y="12"/>
       
   246                 <connection refLocalId="9" formalParameter="OUT">
       
   247                   <position x="434" y="363"/>
       
   248                   <position x="332" y="363"/>
       
   249                 </connection>
       
   250               </connectionPointIn>
       
   251               <expression>Cnt4</expression>
       
   252             </outVariable>
       
   253             <inVariable localId="12" executionOrderId="0" height="24" width="67" negated="false">
       
   254               <position x="36" y="261"/>
   267               <position x="36" y="261"/>
   255               <connectionPointOut>
   268               <connectionPointOut>
   256                 <relPosition x="67" y="12"/>
   269                 <relPosition x="67" y="15"/>
   257               </connectionPointOut>
   270               </connectionPointOut>
   258               <expression>Reset</expression>
   271               <expression>Reset</expression>
   259             </inVariable>
   272             </inVariable>
   260             <inVariable localId="13" executionOrderId="0" height="24" width="79" negated="false">
   273             <inVariable localId="13" executionOrderId="0" height="30" width="79" negated="false">
   261               <position x="36" y="170"/>
   274               <position x="36" y="170"/>
   262               <connectionPointOut>
   275               <connectionPointOut>
   263                 <relPosition x="79" y="12"/>
   276                 <relPosition x="79" y="15"/>
   264               </connectionPointOut>
   277               </connectionPointOut>
   265               <expression>Reset</expression>
   278               <expression>Reset</expression>
   266             </inVariable>
   279             </inVariable>
   267             <block localId="14" typeName="CounterLD" instanceName="CounterLD0" executionOrderId="0" height="62" width="124">
   280             <block localId="14" typeName="CounterLD" instanceName="CounterLD0" executionOrderId="0" height="62" width="124">
   268               <position x="210" y="411"/>
   281               <position x="210" y="411"/>
   284                     <relPosition x="124" y="41"/>
   297                     <relPosition x="124" y="41"/>
   285                   </connectionPointOut>
   298                   </connectionPointOut>
   286                 </variable>
   299                 </variable>
   287               </outputVariables>
   300               </outputVariables>
   288             </block>
   301             </block>
   289             <outVariable localId="15" executionOrderId="0" height="24" width="88" negated="false">
   302             <inVariable localId="16" executionOrderId="0" height="30" width="64" negated="false">
   290               <position x="437" y="440"/>
       
   291               <connectionPointIn>
       
   292                 <relPosition x="0" y="12"/>
       
   293                 <connection refLocalId="14" formalParameter="Out">
       
   294                   <position x="437" y="452"/>
       
   295                   <position x="334" y="452"/>
       
   296                 </connection>
       
   297               </connectionPointIn>
       
   298               <expression>Cnt5</expression>
       
   299             </outVariable>
       
   300             <inVariable localId="16" executionOrderId="0" height="24" width="64" negated="false">
       
   301               <position x="36" y="440"/>
   303               <position x="36" y="440"/>
   302               <connectionPointOut>
   304               <connectionPointOut>
   303                 <relPosition x="64" y="12"/>
   305                 <relPosition x="64" y="15"/>
   304               </connectionPointOut>
   306               </connectionPointOut>
   305               <expression>Reset</expression>
   307               <expression>Reset</expression>
   306             </inVariable>
   308             </inVariable>
       
   309             <block localId="17" typeName="AverageVal" executionOrderId="0" height="470" width="90">
       
   310               <position x="514" y="28"/>
       
   311               <inputVariables>
       
   312                 <variable formalParameter="Cnt1">
       
   313                   <connectionPointIn>
       
   314                     <relPosition x="0" y="65"/>
       
   315                     <connection refLocalId="3">
       
   316                       <position x="514" y="93"/>
       
   317                       <position x="474" y="93"/>
       
   318                     </connection>
       
   319                   </connectionPointIn>
       
   320                 </variable>
       
   321                 <variable formalParameter="Cnt2">
       
   322                   <connectionPointIn>
       
   323                     <relPosition x="0" y="155"/>
       
   324                     <connection refLocalId="5">
       
   325                       <position x="514" y="183"/>
       
   326                       <position x="497" y="183"/>
       
   327                       <position x="497" y="182"/>
       
   328                       <position x="473" y="182"/>
       
   329                     </connection>
       
   330                   </connectionPointIn>
       
   331                 </variable>
       
   332                 <variable formalParameter="Cnt3">
       
   333                   <connectionPointIn>
       
   334                     <relPosition x="0" y="245"/>
       
   335                     <connection refLocalId="8">
       
   336                       <position x="514" y="273"/>
       
   337                       <position x="472" y="273"/>
       
   338                     </connection>
       
   339                   </connectionPointIn>
       
   340                 </variable>
       
   341                 <variable formalParameter="Cnt4">
       
   342                   <connectionPointIn>
       
   343                     <relPosition x="0" y="335"/>
       
   344                     <connection refLocalId="11">
       
   345                       <position x="514" y="363"/>
       
   346                       <position x="469" y="363"/>
       
   347                     </connection>
       
   348                   </connectionPointIn>
       
   349                 </variable>
       
   350                 <variable formalParameter="Cnt5">
       
   351                   <connectionPointIn>
       
   352                     <relPosition x="0" y="425"/>
       
   353                     <connection refLocalId="15">
       
   354                       <position x="514" y="453"/>
       
   355                       <position x="495" y="453"/>
       
   356                       <position x="495" y="452"/>
       
   357                       <position x="469" y="452"/>
       
   358                     </connection>
       
   359                   </connectionPointIn>
       
   360                 </variable>
       
   361               </inputVariables>
       
   362               <inOutVariables/>
       
   363               <outputVariables>
       
   364                 <variable formalParameter="OUT">
       
   365                   <connectionPointOut>
       
   366                     <relPosition x="90" y="65"/>
       
   367                   </connectionPointOut>
       
   368                 </variable>
       
   369               </outputVariables>
       
   370             </block>
       
   371             <outVariable localId="18" executionOrderId="0" height="30" width="50" negated="false">
       
   372               <position x="649" y="78"/>
       
   373               <connectionPointIn>
       
   374                 <relPosition x="0" y="15"/>
       
   375                 <connection refLocalId="17" formalParameter="OUT">
       
   376                   <position x="649" y="93"/>
       
   377                   <position x="604" y="93"/>
       
   378                 </connection>
       
   379               </connectionPointIn>
       
   380               <expression>AVCnt</expression>
       
   381             </outVariable>
       
   382             <inOutVariable localId="3" executionOrderId="0" height="30" width="106" negatedOut="false" negatedIn="false">
       
   383               <position x="368" y="78"/>
       
   384               <connectionPointIn>
       
   385                 <relPosition x="0" y="15"/>
       
   386                 <connection refLocalId="1" formalParameter="OUT">
       
   387                   <position x="368" y="93"/>
       
   388                   <position x="332" y="93"/>
       
   389                 </connection>
       
   390               </connectionPointIn>
       
   391               <connectionPointOut>
       
   392                 <relPosition x="106" y="15"/>
       
   393               </connectionPointOut>
       
   394               <expression>Cnt1</expression>
       
   395             </inOutVariable>
       
   396             <inOutVariable localId="5" executionOrderId="0" height="30" width="103" negatedOut="false" negatedIn="false">
       
   397               <position x="370" y="167"/>
       
   398               <connectionPointIn>
       
   399                 <relPosition x="0" y="15"/>
       
   400                 <connection refLocalId="4" formalParameter="OUT">
       
   401                   <position x="370" y="182"/>
       
   402                   <position x="332" y="182"/>
       
   403                 </connection>
       
   404               </connectionPointIn>
       
   405               <connectionPointOut>
       
   406                 <relPosition x="103" y="15"/>
       
   407               </connectionPointOut>
       
   408               <expression>Cnt2</expression>
       
   409             </inOutVariable>
       
   410             <inOutVariable localId="8" executionOrderId="0" height="30" width="97" negatedOut="false" negatedIn="false">
       
   411               <position x="375" y="258"/>
       
   412               <connectionPointIn>
       
   413                 <relPosition x="0" y="15"/>
       
   414                 <connection refLocalId="7" formalParameter="OUT">
       
   415                   <position x="375" y="273"/>
       
   416                   <position x="332" y="273"/>
       
   417                 </connection>
       
   418               </connectionPointIn>
       
   419               <connectionPointOut>
       
   420                 <relPosition x="97" y="15"/>
       
   421               </connectionPointOut>
       
   422               <expression>Cnt3</expression>
       
   423             </inOutVariable>
       
   424             <inOutVariable localId="11" executionOrderId="0" height="30" width="91" negatedOut="false" negatedIn="false">
       
   425               <position x="378" y="348"/>
       
   426               <connectionPointIn>
       
   427                 <relPosition x="0" y="15"/>
       
   428                 <connection refLocalId="9" formalParameter="OUT">
       
   429                   <position x="378" y="363"/>
       
   430                   <position x="332" y="363"/>
       
   431                 </connection>
       
   432               </connectionPointIn>
       
   433               <connectionPointOut>
       
   434                 <relPosition x="91" y="15"/>
       
   435               </connectionPointOut>
       
   436               <expression>Cnt4</expression>
       
   437             </inOutVariable>
       
   438             <inOutVariable localId="15" executionOrderId="0" height="30" width="88" negatedOut="false" negatedIn="false">
       
   439               <position x="381" y="437"/>
       
   440               <connectionPointIn>
       
   441                 <relPosition x="0" y="15"/>
       
   442                 <connection refLocalId="14" formalParameter="Out">
       
   443                   <position x="381" y="452"/>
       
   444                   <position x="334" y="452"/>
       
   445                 </connection>
       
   446               </connectionPointIn>
       
   447               <connectionPointOut>
       
   448                 <relPosition x="88" y="15"/>
       
   449               </connectionPointOut>
       
   450               <expression>Cnt5</expression>
       
   451             </inOutVariable>
   307           </FBD>
   452           </FBD>
   308         </body>
   453         </body>
   309       </pou>
   454       </pou>
   310       <pou name="CounterST" pouType="functionBlock">
   455       <pou name="CounterST" pouType="functionBlock">
   311         <interface>
   456         <interface>