Arbitrary n-bit PDO in NodeInfo for a Specific Device Model

[RMP 10.4.3]

I’m trying to add support for a Beckhoff analog input card, EL3612.

This card has a number of “meta” inputs that describe whether the analog input is meaningful (under range, over range, error, …). Some of these inputs are actually a 2-bit words.

Here are the default PDO entries.

Index     Size/Off          Type           Value      F/W Addr    Name
  102     1/1928            BOOL               0    0x031469b0    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.Underrange
  103     1/1929            BOOL               0    0x03146bc8    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.Overrange
  104     2/1930            BIT2               0    0x03146de0    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.Limit 1
  105     2/1932            BIT2               0    0x03146ff8    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.Limit 2
  106     1/1934            BOOL               0    0x03147210    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.Error
  107     1/1942            BOOL               0    0x03147428    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.TxPDO State
  108     1/1943            BOOL               1    0x03147640    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.TxPDO Toggle
  109    32/1944            DINT           24576    0x03147858    Term 15 (Beckhoff - AI2).AI Inputs Channel 1.Value

  110     1/1976            BOOL               0    0x03147a70    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.Underrange
  111     1/1977            BOOL               0    0x03147c88    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.Overrange
  112     2/1978            BIT2               0    0x03147ea0    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.Limit 1
  113     2/1980            BIT2               0    0x031480b8    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.Limit 2
  114     1/1982            BOOL               0    0x031482d0    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.Error
  115     1/1990            BOOL               0    0x031484e8    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.TxPDO State
  116     1/1991            BOOL               1    0x03148700    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.TxPDO Toggle
  117    32/1992            DINT           67072    0x03148918    Term 15 (Beckhoff - AI2).AI Inputs Channel 2.Value

The item(s) in question are of type BIT2.

How do I make these items analog inputs for this device type only? The normal behavior in NodeInfo involves pattern matching, which means it will apply to all/most devices.

For example, this addition will match the BIT2 items for this device.

<AnalogInputItems>
  ...
  <AnalogInput Size="2" Has="(Beckhoff - AI">.Limit</AnalogInput>
  ...
</AnalogInputItems>

I would prefer not to do it this way since this hardly seems generic enough.

Are there elements I can add to the product element that will accomplish what I want?

<Product Code="0x0E1C3052">
  <ProductName>EL3612 2Ch. Ana. Input, current, 0…20 mA, 24 bit</ProductName>
  <ShortName>Beckhoff - AI2</ShortName>
  <ItemSubType>Term</ItemSubType>
</Product>

This is taken from the CustomNodeInfo.xml that comes with the latest releases. It appears you can specify this for a particular product as desired:

      <!-- Required - Product: One or more Product elements which describe the node. -->
      <!-- Required - Code: This must match  the one displayed RapidSetup's Node page. -->
      <!-- Optional - Pattern: See Patterns block located at the Vendors level. -->
      <Product Code="0xdead" Pattern="FakePatternName">
        <!-- Required - ProductName: Can be anything but we recommend you keep the value specified in the ESI file. -->
        <ProductName>Not a Real Node</ProductName>
        <!-- Required - ShortName: Determines RapidSetup's node name. We recommend the [Vendor Name Product Name] -->
        <ShortName>RSI FakeNode</ShortName>
        <!-- Required - ItemSubType: Can be Drive, Box, or Term. -->
        <ItemSubType>Drive</ItemSubType>
        <!-- Optional - IO: Allows you to specify IO when it is not automatically detected. -->
        <IO>
          <!-- Optional - DigitalInputItems: Add in PDOEntries you want to be identified as Digital Inputs. -->
          <DigitalInputItems>
            <!-- Required - DigitalInput: One or more entries to evaluate. -->
            <!-- Required - SigBits: Specific which bits in the associated PDO entry are treated as IO. This is a bit mask.  Most DS402 IO starts in the upper 4 bytes. -->
            <!-- Required - Size: (In bits) Normally this will be 8, 16, or 32 -->
            <!-- Optional - Home | PosLimit | NegLimit: (Bit Index) Represent DedicatedIO which are automatically tied in with RSI events associated with the axis. -->
            <!-- Required - Value: String to help us find the associated PDO Entry. -->
            <DigitalInput SigBits="0x007F0000" Size="32" Home="16" PosLimit="20" NegLimit="21">Inputs.Digital inputs</DigitalInput>
          </DigitalInputItems>
          <!-- Optional - DigitalOutputItems: Add in PDOEntries you want to be identified as Digital Outputs. -->
          <DigitalOutputItems>
            <!-- Required - DigitalOutput: One or more entries to evaluate. -->
            <!-- Required - SigBits: Specific which bits in the associated PDO entry are treated as IO. This is a bit mask.  Most DS402 IO starts in the upper 4 bytes. -->
            <!-- Required - Size: (In bits) Normally this will be 8, 16, or 32 -->
            <!-- Required - Value: String to help us find the associated PDO Entry. -->
            <DigitalOutput SigBits="0x00030000" Size="32">Outputs.Digital outputs</DigitalOutput>
          </DigitalOutputItems>
          <!-- Optional - AnalogInputItems: Add in PDOEntries you want to be identified as Digital Outputs. -->
          <AnalogInputItems>
            <!-- Required - AnalogInput: One or more entries to evaluate. -->
            <!-- Required - Size: (In bits) Normally this will be 8, 16, or 32 -->
            <!-- Required - Value: String to help us find the associated PDO Entry. -->
            <AnalogInput Size="16">Inputs.AIN.VALUE</AnalogInput>
          </AnalogInputItems>
          <!-- Optional - AnalogOutputItems: Add in PDOEntries you want to be identified as Digital Outputs. -->
          <AnalogOutputItems>
            <!-- Required - AnalogOutput: One or more entries to evaluate. -->
            <!-- Required - Size: (In bits) Normally this will be 8, 16, or 32 -->
            <!-- Required - Value: String to help us find the associated PDO Entry. -->
            <AnalogOutput Size="16">Outputs.AOUT.VALUE</AnalogOutput>
          </AnalogOutputItems>
        </IO>
1 Like