AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

How-to

Configuring MC_BR_ReceiveNetworkEnc for an SSI absolute encoder

Sensors, encoders and machine vision on the machine Published 6 min read By AutomateDirectUSA engineering team

Short answer

Configure MC_BR_ReceiveNetworkEnc for an SSI absolute encoder by putting the X20DC1198 on the same POWERLINK network as the drive, entering the valid SSI bit length with status bits removed, setting the increment value range to 33,554,432 for a 25-bit single-turn encoder, measuring ScaleIncrements and ScaleUnits over full travel, and setting the value-change timeout inside its documented range. Error 29217 means invalid configuration; errors 6057 and 7033 call for a motion trace on ENCOD0.

On this page
  1. Check the prerequisites before enabling the function
  2. Enter the SSI data format on the card
  3. Worked example: a 25-bit single-turn encoder on a 45 degree angular axis
  4. Set the value-change timeout
  5. Assign the two-encoder parameter IDs
  6. Trace ENCOD0 when errors 6057 or 7033 persist
  7. What each symptom decides
  8. Questions asked

MC_BR_ReceiveNetworkEnc turns an SSI absolute encoder read by an X20DC1198 card into an external encoder position on a drive axis. The configuration that works: put the card on the same POWERLINK network as the receiving drive, enter the valid SSI bit length with the status bits removed, set the increment value range from the encoder's full-scale count, measure ScaleIncrements and ScaleUnits over the real travel, set the value-change timeout inside its documented range, and give the vector and position controllers different encoder parameter IDs. Error 29217 means the parameter configuration is invalid; errors 6057 and 7033 during motion mean the external position is jumping, and only a motion trace on ENCOD0 shows it.

Check the prerequisites before enabling the function #

  1. Configure the encoder type and the X20DC1198 card path that reads the encoder. A wrong type or path returns error 29217, the invalid-parameter-configuration code.
  2. Put the card on the same POWERLINK network as the drive that consumes its data. A card configured next to a BC module needs no external POWERLINK setting; anywhere else, establish a broadcast channel first. Without it, Encod0 is never generated and error 29217 is returned.
  3. Enable the function block only while the axis is powered down — enabling it on a live axis can command motion from an unvalidated encoder value.
  4. Set the cyclic class tolerance to zero.

Enter the SSI data format on the card #

Start from the total SSI bit length; single-turn versus multi-turn does not matter at this step. The valid SSI length is the total minus the encoder's output status bits such as power failure, busy and error. The encoder worked through here is a 25-bit single-turn device with one bit reserved for power failure, so the valid SSI bit length is 24.

Take the clock rate from the encoder's datasheet, not from another project. Configure the monoflop check only when the encoder actually supports it, selecting high or low level to match the interface; this encoder has no monoflop function, so the check stays off.

Worked example: a 25-bit single-turn encoder on a 45 degree angular axis #

Inputs, each from the encoder datasheet or measured on the documented installation:

  • Total SSI length: 25 bits, single-turn, with 1 bit reserved for power failure.
  • Resolution basis for the value range: the full-scale count of a 25-bit encoder, 2^25.
  • Measured external-encoder change across full travel: 87636 increments, measured by driving the axis with the internal motor encoder.
  • Angular travel: 45 degrees, represented in the application at a resolution of 100 units for each degree, so ScaleUnits := 45*100 = 4500 units. Unit scaling in this form is what MpAxisBasic expects for the external value.
  • UDINT boundary for the value-range fields: 4294967296 (2^32).

The rule in words: the encoder measurement range in increments equals the resolution in increments per revolution multiplied by the number of multi-turn revolutions. A single-turn encoder has one revolution, so its range is simply 2 to the power of its bit count.

The arithmetic: 2^25 = 33554432 increments. That is below the UDINT boundary of 4294967296, so the whole range fits in the low word:

MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.IncValueRangeHW := 0;
MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.IncValueRangeLW := 33554432;
MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.ScaleIncrements := 87636;
MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.ScaleUnits := 45*100;

Decision: any range up to 4294967296 goes into IncValueRangeLW with IncValueRangeHW at zero; a larger range must be split between the high and low words.

The physical scaling is measured, not calculated. With the axis on the internal motor encoder — the external encoder must not be the motion feedback during this move:

  1. Save the internal-encoder count at the negative travel limit before moving.
  2. Drive the axis to the positive travel limit using the internal motor encoder.
  3. Subtract the saved negative-limit count from the internal count at the positive limit. That difference is the external encoder's increment change over full travel: 87636 increments here, and it becomes ScaleIncrements.
  4. Multiply the physical travel by the application's measurement resolution to get ScaleUnits: 45 degrees times 100 equals 4500. For a linear axis, write the measured linear distance in the application's configured unit resolution instead of the angular value.

This measure-the-endpoints method is the same approach used to scale a wire draw absolute encoder by measured endpoints.

One distinction to settle before commissioning: the 24-bit valid SSI length is the card's data-format setting, while the 2^25 range is the full-scale count used for the value range. Read the encoder's data format to learn whether the reserved power-failure bit sits outside the position value or reduces the usable position resolution, and carry that result consistently into the card setting and the range calculation.

Set the value-change timeout #

If encoder values are not refreshed within this interval, processing aborts and an error is generated; when the timeout is not configured at all, Encod0 is not generated and error 29217 is returned. The documented range is 0.0004 to 0.0163 s, and the example sets 0.01 s:

MC_BR_InitReceiveNetworkEnc_0.ReceiveConfiguration.Timeout := 0.01;

Set it long enough for the card's conversion and the network update, and short enough that a stale value cannot survive a real disturbance. When the budget is tight, the relationship between an absolute encoder input card's response time and its count rate tells you what the hardware can actually deliver at your clock rate.

Assign the two-encoder parameter IDs #

Two-encoder control lives in the ACOPOS parameter table and is active when VCTRL_S_ACT_PARID and PCTRL_S_ACT_PARID differ: the motor encoder feeds the vector controller, the external encoder feeds the position controller. For a configuration using motor 1, set VCTRL_S_ACT_PARID to ENCOD1_S_ACT; with motor 2, use ENCOD2_S_ACT. Then write the parameter ID produced at MC_BR_InitReceiveNetworkEnc_0.PositionParID into ENCOD0_S_ACT_FILTER, so the position controller consumes the external value through that ID.

Trace ENCOD0 when errors 6057 or 7033 persist #

With the configuration verified, errors 6057 and 7033 point to instantaneous jumps in the external position under disturbance. A trace taken over a cyclic task does not show them: use the motion trace, configured on ENCOD0, with timing set to capture the disturbance at the position-controller rate.

If the trace shows jumps, hunt the source in mechanics, encoder cabling, cable diagrams and grounding — the same feedback-path checks that clear a servo external scale error alarm apply here. A filter is not a repair.

When the axis must keep moving while that work is scheduled, use ENCOD0_S_FILTER_T10, the disturbance filter: a value below 7 times the task cycle leaves it inactive (2.8 ms at a 400 µs position-controller cycle), and the documented installation with a 2 ms cycle used 14 ms. You can go higher, but encoder control then suffers serious delay. Use ENCOD0_S_FILTER_TE, the extrapolation filter, to compensate delays and dead times in actual-position coupling. Repeat the motion trace and a commanded move afterwards to confirm the jumps and the errors are gone.

What each symptom decides #

  • Error 29217 at initialization: the encoder type, the card path, the broadcast channel or the value-change timeout is wrong or missing — fix the parameter set before anything else.
  • Encod0 never appears: the card and the drive are not sharing the network, or the broadcast channel is missing on a card that is not next to a BC module.
  • Errors 6057 or 7033 during motion: run a motion trace on ENCOD0. Jumps mean disturbance in mechanics, cabling or grounding — correct the cause, and treat the filters as a temporary measure that buys motion at the cost of control delay.

Questions asked

What does error 29217 from MC_BR_ReceiveNetworkEnc mean?

It means the parameter configuration is invalid. The usual causes are a wrong encoder type or card path, a missing broadcast channel when the X20DC1198 is not mounted next to a BC module, and a value-change timeout that was never configured. Fix those in that order and re-enable the function block while the axis is powered down.

Why is Encod0 not generated even though the card is configured?

Check that the X20DC1198 and the drive consuming its data sit on the same POWERLINK network. A card mounted next to a BC module needs no external POWERLINK setting, but one placed elsewhere needs a broadcast channel; without it the external encoder value is never created. A missing value-change timeout has the same effect.

Can a cyclic task trace show external encoder position jumps?

No. Errors 6057 and 7033 come from instantaneous jumps in the external position, and a trace over a cyclic task routinely misses them. Use the motion trace on ENCOD0 with timing set to catch the disturbance, then chase the source in mechanics, cabling and grounding before touching any filter.

How does ENCOD0_S_FILTER_T10 behave?

It is the disturbance filter for the external encoder value. Any value below seven times the task cycle leaves it inactive, for example 2.8 ms at a 400 microsecond position-controller cycle. Raising it lets the axis move through a disturbance but adds real delay to encoder control, so treat it as a stopgap while you fix the cabling or grounding.

Keep reading

  • Troubleshooting

    Why an SSI encoder position stays at zero on an EtherCAT module

    A position value frozen at zero while the shaft turns means the EtherCAT module is not decoding the SSI frame. The even/odd status reply proves the cyclic data path works, so the fix is matching the encoder's frame length, code and clock rate in the module's startup configuration object, not sweeping the control word.

    Sensors, encoders and machine vision on the machine

  • Selection guide

    Absolute encoder input card response time vs count rate

    Keep the 3-9 ms DC input card. Gray code changes one bit per count, so at a 10 ms count rate each input holds its level for two counts, 20 ms, against a 9 ms worst-case delay, and no transition is lost. The lag to budget is card delay plus PLC scan, about one to three encoder counts, which cam-switch replacement tolerates; the 0.8 ms card buys less than one count, so it is not worth a PLC family change.

    Sensors, encoders and machine vision on the machine

  • Comparison

    Absolute joint encoders for a stepper robot arm without homing

    Fit a single-turn magnetic absolute encoder to the output side of each joint, after the gearbox: it reads the joint angle the moment the arm powers up, so no homing move or switch is needed. A 14-bit part resolves about 0.022 degrees per count, roughly 0.12 millimetres at the tip of a 300 millimetre link.

    Sensors, encoders and machine vision on the machine