SSI Absolute Encoder using with MC_BR_ReceiveNetworkEnc

There are input parameters and different steps to check. First, after the axis is referenced on the axis input, the encoder type and the X20DC1198 card path where reads the encoder information must be configured correctly. Otherwise, error 29217 is returned. This error indicates invalid parameter configuration.

•To use the function, X20DC1198 card must be in the same POWERLINK network as the drive that is reading from it. There is no external POWERLINK setting required for X20DC1198 encoder cards configured next to BC modules. However, if the X20DC1198 encoder card is not connected next to a BC module, it is necessary to establish a broadcast channel for proper communication. Otherwise, Encod0 is not generated and error 29217 is returned.

•This function must be enabled when the axis is not powered on.

•Cyclic class tolerance must be set as zero.

Steps for configuring 25-bit SSI single turn absolute encoder;

1. Configuring X20DC1198 Encoder card

X20DC1198 encoder card must be configured as shown below.

• Total SSI bit length must be evaluated. Multi-turn or single turn is not considered in this step.

• Valid SSI bit length can be found by subtracting output bits of encoder such as power failure, busy, error etc. from the total SSI bits.

• The encoder in our example is 25 bits and single turn, and since 1 bit is reserved for power failure, the valid SSI bit length is found to be 24.

• Clock rate must be checked and written from the datasheet of encoder that is used.

• Monoflop check is not possible for our example encoder. If configured encoder has monoflop check function, it can be selected as high or low level. This is up to user.

2. Configuring IncValueRangeLW/HW

Formula → Measurement range of the encoder [Inc.] = Resolution [Inc./Rev] x multi-turn revolutions

In our example external encoder is single turn and it has 25 bits.
So, based on this;
Measurement range of the encoder [Inc.] = 2^25 (for 25 bit encoder)
= 33 554 432

If the value range is larger than can be represented by the UDINT data type
(2^32 = 4 294 967 296), this must be split into high and low ranges. If not, this is not necessary. Found value can be directly used as LW in case of it is lower than UDINT range.
Since the value in our example is lower than the UDINT limit, it can be used directly as LW.

MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.IncValueRangeHW := 0; MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.IncValueRangeLW := 33554432;

Examples can be found on B&R Online Help for multiturn encoders.

3. Identifying scale increments and scale units

By using the internal encoder on the motor (not external), the axis is moved from the beginning to the end until the movement limits. It is very important to save the number of encoder pulses in the negative limit before performing such movements. When the positive limit is reached, the difference between the value of the encoder and the value in the negative limit is saved. This difference determines the amount of pulse that the external encoder will receive during the entire movement. In our case it is;

MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.ScaleIncrements := 87636;

Unit scaling is required for the MpAxisBasic function to handle external value. In our example we had an angled axis that moves 45 degrees at the end of the 87636 pulse change. If the application to be made is linear, you can directly write the physical path taken in the amount of pulse you found. After finding the path distance traveled, you must change it to unit by multiplying measurement resolution.

MC_BR_InitReceiveNetworkEnc_0.EncoderParameters.ScaleUnits := 45*100;

4. Timeout for values change

If values are not refreshed during this time, processing is aborted and an error message [s] is generated. If it is not configured Encod0 is not generated and error 29217 is returned. Range of values: 0.0004 - 0.0163 [s]

MC_BR_InitReceiveNetworkEnc_0.ReceiveConfiguration.Timeout := 0.01;

5. Configuring Two Encoder Control

• These parameters should be assigned in ACOPOS parameter table. In two encoder control process, the motor encoder position is used for the vector controller and the external encoder position is used for the position controller.

• VCTRL_S_ACT_PARID != PCTRL_S_ACT_PARID means that two encoder control is active.

• Vector controller is configured as the motor internal encoder. In our configuration, since motor 1 is used for two encoder control, VCTRL_S_ACT_PARID is selected ENCOD1_S_ACT. If motor 2 was selected, it should be changed to ENCOD2_S_ACT.

• ENCOD0_S_ACT_FILTER is the same parameter id that is generated on MC_BR_InitReceiveNetworkEnc_0.PositionParID output.

6. ERROR CODES 6057, 7033 etc.

If you are totally sure about your configuration is true, if you still get errors codes like 6057, 7033 you must consider these parameters. It is highly important.
Taking a trace over any cyclic task may not show you that there is a problem with the encoder configuration. If the external encoder you have created is exposed to disturbance, instantaneous value changes in the encoder, you will get errors 6057 and 7033. And you cannot see these situations in cyclic tasks traces. You should use motion trace which is located above test with certain parameters.

image


Trace Configuration for detecting position jumps on ENCOD0

image
Trace Timing for detecting position jumps on ENCOD0

After you realized that you have signal disturbance or position jumps which causes errors 7033, 6057, you must use filters to eliminate these jumps. But it is not certain solution, it just allows you to perform movement. In case of this situation, you must check your mechanical elements, cable diagrams, grounding etc… The parameters are shown below,
ENCOD0_S_FILTER_T10
ENCOD0_S_FILTER_TE

ENCOD0_S_FILTER_T10 is disturbance filter. It is used to set the “filter dynamic” and to activate the filter. Values below 7xTaskCycle deactivate the filter (2.8ms for a position controller cycle time of 400 μs). In our example cycle time is configured 2ms. So, this parameter id is configured 14ms. You can use more than that. However, your encoder control may experience serious delays.
ENCOD0_S_FILTER_TE is the extrapolation filter. It is used for compensating delays and dead times at actual position couplings (external set value).

5 Likes