tests/logging/plc.xml
changeset 944 52a17be9c4d1
parent 917 401e44bae7c0
child 1014 e2f7d6c95db0
equal deleted inserted replaced
943:da7f80e04a54 944:52a17be9c4d1
     6   <fileHeader companyName="Unknown"
     6   <fileHeader companyName="Unknown"
     7               productName="Unnamed"
     7               productName="Unnamed"
     8               productVersion="1"
     8               productVersion="1"
     9               creationDateTime="2013-01-29T14:01:00"/>
     9               creationDateTime="2013-01-29T14:01:00"/>
    10   <contentHeader name="Unnamed"
    10   <contentHeader name="Unnamed"
    11                  modificationDateTime="2013-01-30T18:24:53">
    11                  modificationDateTime="2013-02-26T16:22:11">
    12     <coordinateInfo>
    12     <coordinateInfo>
    13       <fbd>
    13       <fbd>
    14         <scaling x="0" y="0"/>
    14         <scaling x="0" y="0"/>
    15       </fbd>
    15       </fbd>
    16       <ld>
    16       <ld>
    20         <scaling x="0" y="0"/>
    20         <scaling x="0" y="0"/>
    21       </sfc>
    21       </sfc>
    22     </coordinateInfo>
    22     </coordinateInfo>
    23   </contentHeader>
    23   </contentHeader>
    24   <types>
    24   <types>
    25     <dataTypes>
    25     <dataTypes/>
    26       <dataType name="LOGLEVEL">
       
    27         <baseType>
       
    28           <enum>
       
    29             <values>
       
    30               <value name="CRITICAL"/>
       
    31               <value name="WARNING"/>
       
    32               <value name="INFO"/>
       
    33               <value name="DEBUG"/>
       
    34             </values>
       
    35           </enum>
       
    36         </baseType>
       
    37         <initialValue>
       
    38           <simpleValue value="INFO"/>
       
    39         </initialValue>
       
    40       </dataType>
       
    41     </dataTypes>
       
    42     <pous>
    26     <pous>
    43       <pou name="LOGGER" pouType="functionBlock">
       
    44         <interface>
       
    45           <inputVars>
       
    46             <variable name="TRIG">
       
    47               <type>
       
    48                 <BOOL/>
       
    49               </type>
       
    50             </variable>
       
    51             <variable name="MSG">
       
    52               <type>
       
    53                 <string/>
       
    54               </type>
       
    55             </variable>
       
    56             <variable name="LEVEL">
       
    57               <type>
       
    58                 <derived name="LOGLEVEL"/>
       
    59               </type>
       
    60               <initialValue>
       
    61                 <simpleValue value="INFO"/>
       
    62               </initialValue>
       
    63             </variable>
       
    64           </inputVars>
       
    65           <localVars>
       
    66             <variable name="TRIG0">
       
    67               <type>
       
    68                 <BOOL/>
       
    69               </type>
       
    70             </variable>
       
    71           </localVars>
       
    72         </interface>
       
    73         <body>
       
    74           <ST>
       
    75 <![CDATA[IF TRIG AND NOT TRIG0 THEN
       
    76 {{
       
    77  LogMessage(GetFbVar(LEVEL),GetFbVar(MSG, .body),GetFbVar(MSG, .len));
       
    78 }}
       
    79 END_IF;
       
    80 TRIG0:=TRIG;
       
    81 ]]>
       
    82           </ST>
       
    83         </body>
       
    84       </pou>
       
    85       <pou name="program0" pouType="program">
    27       <pou name="program0" pouType="program">
    86         <interface>
    28         <interface>
    87           <localVars>
    29           <localVars>
    88             <variable name="beat">
    30             <variable name="beat">
    89               <type>
    31               <type>
    97             </variable>
    39             </variable>
    98             <variable name="LOGGER0">
    40             <variable name="LOGGER0">
    99               <type>
    41               <type>
   100                 <derived name="LOGGER"/>
    42                 <derived name="LOGGER"/>
   101               </type>
    43               </type>
       
    44             </variable>
       
    45             <variable name="lvl">
       
    46               <type>
       
    47                 <derived name="LOGLEVEL"/>
       
    48               </type>
       
    49               <initialValue>
       
    50                 <simpleValue value="WARNING"/>
       
    51               </initialValue>
   102             </variable>
    52             </variable>
   103           </localVars>
    53           </localVars>
   104         </interface>
    54         </interface>
   105         <body>
    55         <body>
   106           <FBD>
    56           <FBD>
   286                   </connectionPointOut>
   236                   </connectionPointOut>
   287                 </variable>
   237                 </variable>
   288               </outputVariables>
   238               </outputVariables>
   289             </block>
   239             </block>
   290             <block localId="11" width="65" height="80" typeName="LOGGER" instanceName="LOGGER0">
   240             <block localId="11" width="65" height="80" typeName="LOGGER" instanceName="LOGGER0">
   291               <position x="1183" y="64"/>
   241               <position x="1100" y="98"/>
   292               <inputVariables>
   242               <inputVariables>
   293                 <variable formalParameter="TRIG">
   243                 <variable formalParameter="TRIG">
   294                   <connectionPointIn>
   244                   <connectionPointIn>
   295                     <relPosition x="0" y="30"/>
   245                     <relPosition x="0" y="30"/>
   296                     <connection refLocalId="3" formalParameter="OUT">
   246                     <connection refLocalId="3" formalParameter="OUT">
   297                       <position x="1183" y="94"/>
   247                       <position x="1100" y="128"/>
       
   248                       <position x="631" y="128"/>
       
   249                       <position x="631" y="94"/>
   298                       <position x="272" y="94"/>
   250                       <position x="272" y="94"/>
   299                     </connection>
   251                     </connection>
   300                   </connectionPointIn>
   252                   </connectionPointIn>
   301                 </variable>
   253                 </variable>
   302                 <variable formalParameter="MSG">
   254                 <variable formalParameter="MSG">
   303                   <connectionPointIn>
   255                   <connectionPointIn>
   304                     <relPosition x="0" y="50"/>
   256                     <relPosition x="0" y="50"/>
   305                     <connection refLocalId="8" formalParameter="OUT">
   257                     <connection refLocalId="8" formalParameter="OUT">
   306                       <position x="1183" y="114"/>
   258                       <position x="1100" y="148"/>
   307                       <position x="979" y="114"/>
   259                       <position x="963" y="148"/>
   308                       <position x="979" y="204"/>
   260                       <position x="963" y="204"/>
   309                       <position x="935" y="204"/>
   261                       <position x="935" y="204"/>
   310                     </connection>
   262                     </connection>
   311                   </connectionPointIn>
   263                   </connectionPointIn>
   312                 </variable>
   264                 </variable>
   313                 <variable formalParameter="LEVEL">
   265                 <variable formalParameter="LEVEL">
   314                   <connectionPointIn>
   266                   <connectionPointIn>
   315                     <relPosition x="0" y="70"/>
   267                     <relPosition x="0" y="70"/>
       
   268                     <connection refLocalId="12">
       
   269                       <position x="1100" y="168"/>
       
   270                       <position x="1090" y="168"/>
       
   271                       <position x="1090" y="168"/>
       
   272                       <position x="1057" y="168"/>
       
   273                     </connection>
   316                   </connectionPointIn>
   274                   </connectionPointIn>
   317                 </variable>
   275                 </variable>
   318               </inputVariables>
   276               </inputVariables>
   319               <inOutVariables/>
   277               <inOutVariables/>
   320               <outputVariables/>
   278               <outputVariables/>
   321             </block>
   279             </block>
       
   280             <inVariable localId="12" height="27" width="79">
       
   281               <position x="978" y="155"/>
       
   282               <connectionPointOut>
       
   283                 <relPosition x="79" y="13"/>
       
   284               </connectionPointOut>
       
   285               <expression>WARNING</expression>
       
   286             </inVariable>
   322           </FBD>
   287           </FBD>
   323         </body>
   288         </body>
   324       </pou>
   289       </pou>
   325     </pous>
   290     </pous>
   326   </types>
   291   </types>
   327   <instances>
   292   <instances>
   328     <configurations>
   293     <configurations>
   329       <configuration name="config">
   294       <configuration name="config">
   330         <resource name="resource1">
   295         <resource name="resource1">
   331           <task name="blob" interval="T#10ms" priority="0">
   296           <task name="blob" interval="T#100ms" priority="0">
   332             <pouInstance name="blub" typeName="program0"/>
   297             <pouInstance name="blub" typeName="program0"/>
   333           </task>
   298           </task>
   334         </resource>
   299         </resource>
   335       </configuration>
   300       </configuration>
   336     </configurations>
   301     </configurations>