Generate ENI: Error in EtherCATNodeInfo.xml: Object reference not set to an instance of an object

I’m trying to add support for a Yaskawa Sigma7 400V drive.

I downloaded the ESI file from Yaskawa.

I copied the Sigma-7 Product element, changed the code and the product name. When I attempt to generate an ENI file in RapidSetup, I get this error:

Error in EtherCATNodeInfo.xml: Object reference not set to an instance of an object.

There are no real details here, except that something might refer to something else that’s not defined. (It would be convenient of the dangling reference was named.)

Can you tell me what might be missing?

I’m running 8.1.5. The drive in question is not actually on the network (I’m doing software setup, but we have these drives).

Here’s what I added to the EtherCATNodeInfo.xml

  <!-- a copy of SGD7S, except for product code and name -->
  <!-- https://www.yaskawa.com/downloads/search-index/details?showType=details&docnum=SW.Sigma-7.01 -->
  <Product Code="0x02200401">
    <ProductName>Yaskawa SGD7S 400V</ProductName>
    <ShortName>Yaskawa</ShortName>
    <ItemSubType>Drive</ItemSubType>
    <AxisCount>1</AxisCount>
    <StatusWord>1st Transmit PDO mapping.Status word</StatusWord>
    <PositionActual>1st Transmit PDO mapping.Position actual value</PositionActual>
    <TorqueActual>1st Transmit PDO mapping.Torque actual value</TorqueActual>
    <ControlWord>1st Receive PDO mapping.Control word</ControlWord>
    <PositionDemand>1st Receive PDO mapping.Target position</PositionDemand>
    <VelocityDemand>1st Receive PDO mapping.Target velocity</VelocityDemand>
    <TargetTorque>1st Receive PDO mapping.Target torque</TargetTorque>
    <PDOs>
      <PDOAssignment Index="0x1601" IsOutput="True" Include="False" />
      <PDOAssignment Index="0x1a01" IsOutput="False" Include="True" RemoveContent="0x6041 0x6064">
        <AddEntry Name="Digital inputs" Index="0x60FD" SubIndex="0x0" BitLen="32" DataType="UDINT" />
      </PDOAssignment>
      <PDOAssignment Index="0x1600" IsOutput="True" Include="True" RemoveContent="0x6060 0x6072">
        <AddEntry Name="Physical outputs" Index="0x60FE" SubIndex="0x1" BitLen="32" DataType="UDINT" />
      </PDOAssignment>
      <PDOAssignment Index="0x1a00" IsOutput="False" Include="True" RemoveContent="0x6061">
        <AddEntry Name="Velocity actual value" Index="0x606C" SubIndex="0x0" BitLen="32" DataType="DINT" />
      </PDOAssignment>
    </PDOs>
    <IO>
      <DigitalInputItems>
        <!-- Home="2" PosLimit="1" NegLimit="0" -->
        <!-- Specify your limits as a DigitalInput Attribute similiar to Size with  Home="22" PosLimit="18" NegLimit="17"-->
        <!-- [PREVIOUS] SigBits="0x007F0000" -->
        <DigitalInput SigBits="0x037F0000" Size="32">1st Transmit PDO mapping.Digital inputs</DigitalInput>
      </DigitalInputItems>
      <DigitalOutputItems>
        <!-- [PREVIOUS] SigBits="0x000E0000" -->
        <DigitalOutput SigBits="0x00030000" Size="32">1st Receive PDO mapping.Physical outputs</DigitalOutput>
      </DigitalOutputItems>
    </IO>
  </Product>

I see this post that suggests it’s a .NET error, but I don’t know what the underlying issue might be.

I tried removing pieces of the Product element, but even without the PDOs and IO elements, it still complains the same way.

Hi Todd,

It may be the way you are trying to generate an ENI file. You said this is without an active Network which the utility isn’t designed to do. If you use the original file and try to generate the same way does it also fail? Are you using RapidSetup or RSI.System.dll to do the generation?

Jacob

There is an active network. The node in question just isn’t on it.
I’m going through RapidSetup: “Discover Network Nodes”, “Generate ENI File”
If I remove the offending Product element, ENI generation doesn’t complain.

…and this very thing worked in 8.1.3.

@todd_mm

Is the product copy within the Vendor tag? Can you send me the broken new EtherCATNodeInfo.xml to do some testing with?

It’s in the same container as all the other Yaskawa elements.

@todd_mm

It looks like it is a problem with using Comments within the Vendor Area (in front of the Product block). I believe we are casting the next sibling as a Product without checking that it is a product. If you either delete the comment or move it inside the product block, you will not have that error. I’ve created a story to resolve this bug for a future release.

Sorry about the trouble.

1 Like

So, is there a Correct Way™ to use comments in the XML?

Version 8.1.6 supports XML Comments. Place them wherever you would like.