tests/ethercat/wago_sanyo/ethercat@etherlab/master@EthercatNode/config.xml
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 09 Aug 2018 13:58:47 +0300
changeset 2275 1bb8afa02409
parent 2165 02a2b5dee5e3
permissions -rw-r--r--
Improve fix wrong code generation if EN/ENO are used in FBD/LD/SFC

Commit c9915bc6 "Fix wrong code generation if EN/ENO are used in
FBD/LD/SFC" caused following backtrace in some cases:

File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 476, in GenerateProgram
self.GeneratePouProgram(pou_name)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 258, in GeneratePouProgram
program = pou_program.GenerateProgram(pou)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 1713, in GenerateProgram
self.ComputeProgram(pou)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 997, in ComputeProgram
eno_var = self.GetUsedEno(body, connections)
File "/home/developer/WorkData/PLC/beremiz/beremiz/PLCGenerator.py", line 929, in GetUsedEno
for invar in blk.inputVariables.getvariable():
File "/home/developer/WorkData/PLC/beremiz/beremiz/xmlclass/xmlclass.py", line 1363, in getattrMethod
return DefaultElementClass.__getattribute__(self, name)
<type 'exceptions.AttributeError'>: 'inOutVariable' object has no attribute 'inputVariables'
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EtherCATConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EtherCATInfo.xsd">
  <Config>
    <Master>
      <Info>
        <Name></Name>
        <Destination>00</Destination>
        <Source>00</Source>
      </Info>
    </Master>
    <Slave>
      <Info>
        <Name>EK1100</Name>
        <PhysAddr>0</PhysAddr>
        <AutoIncAddr>0</AutoIncAddr>
        <Physics></Physics>
        <VendorId>2</VendorId>
        <ProductCode>72100946</ProductCode>
        <RevisionNo>65536</RevisionNo>
        <SerialNo>0</SerialNo>
      </Info>
    </Slave>
    <Slave>
      <Info>
        <Name>EL1088</Name>
        <PhysAddr>1</PhysAddr>
        <AutoIncAddr>0</AutoIncAddr>
        <Physics></Physics>
        <VendorId>2</VendorId>
        <ProductCode>71315538</ProductCode>
        <RevisionNo>1048576</RevisionNo>
        <SerialNo>0</SerialNo>
      </Info>
    </Slave>
    <Slave>
      <Info>
        <Name>EL2088</Name>
        <PhysAddr>2</PhysAddr>
        <AutoIncAddr>0</AutoIncAddr>
        <Physics></Physics>
        <VendorId>2</VendorId>
        <ProductCode>136851538</ProductCode>
        <RevisionNo>1048576</RevisionNo>
        <SerialNo>0</SerialNo>
      </Info>
    </Slave>
    <Slave>
      <Info>
        <Name>SanyoDenki RS2 EtherCAT</Name>
        <PhysAddr>3</PhysAddr>
        <AutoIncAddr>1</AutoIncAddr>
        <Physics></Physics>
        <VendorId>441</VendorId>
        <ProductCode>2</ProductCode>
        <RevisionNo>0</RevisionNo>
        <SerialNo>0</SerialNo>
      </Info>
    </Slave>
  </Config>
</EtherCATConfig>