Configuring EL5101 for Full Resolution

[RMP 10.5.5]

EL5101 Setup for Full Encoder Resolution

I’m trying to configure things for a Beckhoff EL5101 encoder card and get 32-bit position data from it. (It has two modes: “compact” and an unnamed, non-compact one.)

When I try to switch which PDO collections come in, RMP no longer provides the current position as if the node were an axis.

Here’s the default config in NodeInfo.xml.

<Product Code="0x13ed3052">
  <ProductName>EL5101 1Ch. Encoder 5V</ProductName>
  <ShortName>Beckhoff - EL5101</ShortName>
  <ItemSubType>Term</ItemSubType>
</Product>

Here’s what I’m using. (0x1a04 in the input PDO I want)

<Product Code="0x13ed3052">
    <ProductName>EL5101 1Ch. Encoder 5V</ProductName>
    <ShortName>Beckhoff - EL5101</ShortName>
    <ItemSubType>Box</ItemSubType>
    <AxisCount>1</AxisCount>
    <PositionActual Size="32">ENC Status.Counter value</PositionActual>
    <PDOs>
      <PDOAssignment Index="0x1a00" IsOutput="False" Include="False"/>
      <PDOAssignment Index="0x1a01" IsOutput="False" Include="False"/>
      <PDOAssignment Index="0x1a02" IsOutput="False" Include="False"/>
      <PDOAssignment Index="0x1a03" IsOutput="False" Include="False"/>
      <PDOAssignment Index="0x1a04" IsOutput="False" Include="True"/>

      <PDOAssignment Index="0x1a05" IsOutput="False" Include="False"/>

      <PDOAssignment Index="0x1600" IsOutput="True"  Include="True"/>
      <PDOAssignment Index="0x1601" IsOutput="True"  Include="False"/>
    </PDOs>
</Product>

When I use this, I see a number of network data inputs. Here are the ones for this device.

Inputs
 Idx    Size/Off    Type    Value    F/W Addr    Input Name
...
# 68     1/ 1672    BOOL        0    (0x3142288)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Latch C valid
# 69     1/ 1673    BOOL        0    (0x31424a0)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Latch extern valid
# 70     1/ 1674    BOOL        0    (0x31426b8)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Set counter done
# 71     1/ 1675    BOOL        0    (0x31428d0)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Counter underflow
# 72     1/ 1676    BOOL        1    (0x3142ae8)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Counter overflow
# 73     1/ 1677    BOOL        1    (0x3142d00)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Status of input status
# 74     1/ 1678    BOOL        0    (0x3142f18)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Open circuit
# 75     1/ 1679    BOOL        0    (0x3143130)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Extrapolation stall
# 76     1/ 1680    BOOL        0    (0x3143348)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Status of input A
# 77     1/ 1681    BOOL        1    (0x3143560)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Status of input B
# 78     1/ 1682    BOOL        0    (0x3143778)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Status of input C
# 79     1/ 1683    BOOL        0    (0x3143990)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Status of input gate
# 80     1/ 1684    BOOL        0    (0x3143ba8)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Status of extern latch
# 81     1/ 1685    BOOL        0    (0x3143dc0)    Box 13 (Beckhoff - EL5101).ENC Status.Status__Sync error
# 82     1/ 1686    BOOL        0    (0x3143fd8)    Box 13 (Beckhoff - EL5101).ENC Status.Status__TxPDO State
# 83     1/ 1687    BOOL        1    (0x31441f0)    Box 13 (Beckhoff - EL5101).ENC Status.Status__TxPDO Toggle
# 84    32/ 1688    UDINT       7    (0x3144408)    Box 13 (Beckhoff - EL5101).ENC Status.Counter value
# 85    32/ 1720    UDINT    4137    (0x3144620)    Box 13 (Beckhoff - EL5101).ENC Status.Latch value
...

The name for #84 looks like what I have for PositionActual: ENC Status.Counter value

However, if I try to resolve the axis features for this node/axis, RMP doesn’t have anything for it.

Node #13
   Name              : Beckhoff - EL5101
   Vendor ID         : 0x2
   Vendor Name       : Beckhoff Automation GmbH
   Product Name      : EL5101 1Ch. Encoder 5V
   Product Code      : 0x13ed3052
   Revision          : 0x4000000
   Station Alias     : 0
   Serial Number     : 0
     Axis Count      : 1
       Axis #0       : #6 (global)
  STATUS_WORD_INDEX                   (  0): INPUT #65535 "<NO_NAME>"
  POSITION_ACTUAL_INDEX               (  1): INPUT #65535 "<NO_NAME>"
  VELOCITY_ACTUAL_INDEX               (  2): INPUT #65535 "<NO_NAME>"
  TORQUE_ACTUAL_INDEX                 (  3): INPUT #65535 "<NO_NAME>"
  DIGITAL_INPUT_INDEX                 (  4): INPUT #65535 "<NO_NAME>"
  ANALOG_INPUT_INDEX                  (  5): INPUT #65535 "<NO_NAME>"
  PDO_POSITION_ERROR_INDEX            (  6): INPUT #65535 "<NO_NAME>"
  AUX_POSITION_FEEDBACK_INDEX         (  7): INPUT #65535 "<NO_NAME>"
  CONTROL_WORD_INDEX                  (  8): OUTPUT#65535 "<NO_NAME>"
  POSITION_DEMAND_INDEX               (  9): OUTPUT#65535 "<NO_NAME>"
  VELOCITY_DEMAND_INDEX               ( 10): OUTPUT#65535 "<NO_NAME>"
  TARGET_TORQUE_INDEX                 ( 11): OUTPUT#65535 "<NO_NAME>"
  MODE_OF_OPERATION_INDEX             ( 12): INPUT #65535 "<NO_NAME>"
  DIGITAL_OUTPUT_INDEX                ( 13): OUTPUT#65535 "<NO_NAME>"
  ANALOG_OUTPUT_INDEX                 ( 14): OUTPUT#65535 "<NO_NAME>"

Of these, I would only expect POSITION_ACTUAL_INDEX to resolve to something besides -1.

Naturally, RapidSetup behaves accordingly, showing me nothing for the axis’s current position.

If I look at the PDO value for #84 (Box 13 (Beckhoff - EL5101).ENC Status.Counter value), it changes when I rotate the encoder.

What am I doing wrong? Why is RMP confused about PositionActual?

Could you try this instead of Box ?

<ItemSubType>Drive</ItemSubType>

@jacob is out today but should be able to help us in the morning…

1 Like

OK. That seems to get around this issue.

Is there any description of the different sub-types? I assume these are key words used by RMP.

As this is strictly an input, are there things I should do in order to keep RMP from attempting to command motion on this drive?

For example, if I want to do gearing or other things with this encoder value, would I need to put it into a multi axis?

Hi @todd_mm,

Just popping in to take a quick look.
It is likely one of two things. First the default size of ENC Status.Counter value is 16 not 32. This might be your issue. If you are doing the PDOs work as seen, I wouldn’t expect that to be included though. Instead I would use:
ENC Frequency.Frequency value
If you are using 0x1a05 instead of the default.
You might also want to use VelocityActual instead of PositionActual

Drive is more appropriate but doesn’t matter. edit: This was wrong

I’ll be available tomorrow to dig in if needed.

I’m using 0x1a04, 0x1a05, 0x1a07, and (corrected) 0x1603. We’ll probably want to use both the position and velocity (in terms of capabilities that must be preconfigured in NodeInfo.xml).

The ESI seems to me to suggest that for 0x1a04, “ENC Status.Counter value” corresponds to 0x6010/17, which says it’s a 32-bit value (UDINT, BitLen:32).
I did try with Size="16", Size="32" and without the Size attribute. It didn’t make a difference.

Curiously, merely changing the sub-type to “Drive” did produce different/better behavior (at least, the axis object has an actual position).

Also, is there a way to remove content that includes the subindex? All of the items in 0x1a04 have the same index, but differ by subindex. How do I specify the subindex? Or, can I not do that for booleans?

Here’s what the ESI lists for 0x1a04:

 Index SubIndex BitLen                            Name DataType
#x6010        1      1           Status__Latch C valid     BOOL
#x6010        2      1      Status__Latch extern valid     BOOL
#x6010        3      1        Status__Set counter done     BOOL
#x6010        4      1       Status__Counter underflow     BOOL
#x6010        5      1        Status__Counter overflow     BOOL
#x6010        6      1  Status__Status of input status     BOOL
#x6010        7      1            Status__Open circuit     BOOL
#x6010        8      1     Status__Extrapolation stall     BOOL
#x6010        9      1       Status__Status of input A     BOOL
#x6010       10      1       Status__Status of input B     BOOL
#x6010       11      1       Status__Status of input C     BOOL
#x6010       12      1    Status__Status of input gate     BOOL
#x6010       13      1  Status__Status of extern latch     BOOL
#x6010       14      1              Status__Sync error     BOOL
#x6010       15      1             Status__TxPDO State     BOOL
#x6010       16      1            Status__TxPDO Toggle     BOOL
#x6010       17     32                   Counter value    UDINT
#x6010       18     32                     Latch value    UDINT

Can I remove some of the bools? I’m never going to want to look at “toggle,” nor would I ever care to monitor the state of A, B, or C. Can I mask those off or “remove” them?

Hi @todd_mm,

There isn’t currently a way to remove a PDO entry based on SubIndex. Its very doable but not something we’ve had a need for yet. I’ve created a story to add this functionality. You could hack up the ESI file but I wouldn’t recommend that.

I’ve confirmed that yes we do require Drive rather than Box or Term for Axis like behavior. I was wrong about that.