Could be caused by:
Always start troubleshooting by checking the error, warning, and ready bits and reading the EL5042 manual. The next step is to read the diagnostic SDO bits of the EL5042, see below under the “Diagnostics” heading.
The serial communication is handled by two RS422 channels, one for the clock and one for data. These channels can be measured with a scope:
EC_RATE, default 1kHz). The frequency of the clock pulses should correspond to the setting in your startup script (normally 250kHz..10MHz depending on configuration).Lack of clock or data pulses could be caused by (in order of probability):
Make sure the encoder is powered with the correct voltage. Most encoders require 5V, but there are also some that require 9V, 12V or 24V.
Never apply a higher voltage than the specified operating voltage for the encoder.
The EL5042 can supply 5V or 9V. The default setting is 5V, and in order to change the setting to 9V, a special sequence needs to be executed (see below and the EL5042 manual).
The voltage cannot be different on the two channels. A change to 9V will apply to both channels!
From EL5042 manual:
# Setting the encoder supply voltage
# Condition: To write 0x8008:12 “Supply Voltage”, the value 0x72657375 (ASCII: “user”) must be set in 0xF008 “Code word”.
#
# Set the value into index 0x8008:12 “Supply Voltage” (Specification in steps of 0.1 V).
# Only the values 50 (5.0 V) and 90 (9.0 V) are permissible.
# This setting applies to both channels.
# Before switching to 9.0 V make sure that both BiSS encoders support the extended voltage range!
#
# The encoder supply voltage is set for both channels in object 0x8008:12
# --------------------------------------------------------------------------------------------------------------------------
After the above sequence is executed, the slave must go to INIT state before the new setting is applied. This can be done with the EtherCAT tool:
ethercat states -m<master_id> -p<slave_id> INIT
# then back to preop
ethercat rescan
After ensuring that the encoder is correctly supplied, verify the encoder’s power consumption and compare it with the specified value. If the consumption does not match, the encoder might be broken or the cabling might be faulty.
Long cable lengths can affect both power supply levels and the serial data channels.
Power supply:
Longer cables will normally also result in higher voltage drop. Especially for 5V encoders, this can be an issue. Make sure the voltage is within the specified range by measuring the voltage level close to the encoder.
If the voltage is too low (mainly for 5V encoders):
Serial communication:
The serial communication is also affected by the cable length. For long cable lengths a reduction of the clock rate can be needed. The clock rate can be reduced by setting the CLK_FRQ_KHZ macro in the call to applyComponent.cmd (set clock freq. to 500kHz):
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=1,MACROS='CLK_FRQ_KHZ=500'"
For the EL5042, the following rates are available:
NOTE: The closest frequency equal to or higher than CLK_FRQ_KHZ will be selected.
In ecmccfg, the default encoder frequency is set to the lowest possible value, 100kHz. Sometimes increasing the frequency to 1MHz results in more stable readings. If possible, use ecmccomp instead of ecmccfg for encoder configuration since, in the ecmccomp repo, the default frequency values are higher and normally more stable.
See above for available communication rates.
The diagnostic data can be read from register Index A0p8 FB BiSS-C Diag data (for Ch.1, p = 0; Ch.2, p = 1):
The ecmccfg/utils/read_el5042_diag.sh tool can be used for reading the diagnostics:
bash read_el5042_diag.sh <master_id> <slave_id> <channel_id>
NOTE: The channel id starts at 0. First encoder channel is 0.
Example: master 1, slave 14, channel 0
# first login to ecmc server
$ bash read_el5042_diag.sh 1 14 0
#########################################################
Reading EL5042 Ch 0 status at master id 1 and slave id 14:
Power supply present:
0x01 1
Error:
0x00 0
SDC Error:
0x01 1
WD Error:
0x01 1
Data valid:
0x00 0
Data raw value:
0x0000000000000000 0
#########################################################
Note: The tool ecmccfg/utils/PDO_read can also be used for reading the diagnostics.
When using the LSB offset, the same amount of ones (“1”) will be shifted in as MSB. Therefore the LSB offset should normally not be used.
When using the LSB offset setting, the same number of bits needs to be subtracted from ST_BITS or MT_BITS.
Example: 26bit RLS, no LSB offset
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=1,OFF_BITS=0"
Example: 26bit RLS with 3 bits offset (ST_BITS=23, OFF_BITS=0)
# If the offset is needed, the sum of the bits must still match the encoder bit count. Example: offset 3 LSB bits, set ST_BITS=23 (26-3).
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-Generic-BISS-C,CH_ID=1,MACROS=MT_BITS=0,ST_BITS=23,CLK_FRQ_KHZ=1000,OFF_BITS=3"
MT_BITS and ST_BITS (including status bits and startup bits), see “Offset LSB Bit” above.0x80p8:02) will not work; this seems to be valid only for BiSS-C (as hinted in the manual).If the total bit count does not match, the READY bit of the EL5042 will be low (and sometimes also error or warning).
Example: 26bit RLS encoder with 2 status bits (set ST_BITS=28)
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-Generic-SSI,CH_ID=1,MACROS=MT_BITS=0,ST_BITS=28,CLK_FRQ_KHZ=1000,CODING=0"
Some SSI encoders, i.e. Posital kit SSI, also send startup bits. These also need to be accounted for in ST_BITS and MT_BITS.
Example: Posital kit SSI encoder, KCD-S1X3B-1617-IE4F-GRQ
# Specs:
# Single turn bits 17
# Multiturn bits: 16
# Status bits: 2
# Startup bits 8 (zeros)
# This then results in:
# MT_BITS=16 + 8 = 24 (multi turn bits + startup bits)
# ST_BITS=17 + 2 = 19 (single turn bits + status bits)
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-Generic-SSI,CH_ID=1,MACROS=MT_BITS=24,ST_BITS=19"
The status bits can then be masked away by:
The EL5042 supports encoder supply of 5V (default) or 9V.
The supply voltage is the same for both channels. Make sure both encoders can be operated at the selected voltage.
In order to set the voltage to 9V, a specific procedure must be executed:
addSlave.cmd needs to be disabled since it resets voltage to 5V.epicsEnvSet(ECMC_SLAVE_RESET,false) # Override reset of EL5042
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=14,HW_DESC=EL5042"
0xF008 0x0 needs to be set to 0x72657375 (ASCII “user”).#- To allow change to 9v, 0xF008 must be set to 0x72657375
ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0xF008,0x0,0x72657375,4)"
#- Set voltage to 90 (need also to go down to INIT and back, needs to be done manually)
ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8008,0x12,90,1)"
Example for master 1 and EL5042 at slave position 14:
# Go to init in order to apply the 9V setting
ethercat states -m1 -p14 INIT
# Go back to OP
ethercat states -m1 -p14 OP
Now the EL5042 encoder supply voltage will be 9V. IOC reboot or power cycle of the EL5042 will not change this setting.
If the EL5042 is replaced, the above procedure needs to be repeated.
In order to monitor the voltage an analog input card can be used.
If old-style ecmccfg encoder configuration scripts are used, they normally set the supply voltage to 5V. This can result in the slave not going to OP since it conflicts with the 9V setting. Use ecmccomp configurations instead; in ecmccomp the power setting is not forced.
Issues with the LA11 encoder can be related to the scale being mounted upside down (the two tracks, incremental and absolute, must face the correct sensor in the read head). In this case, the LED on the read head flashes green, flashes red, or stays solid red (all three cases have been observed). The diagnostics from the EL5042 can look like below, which indicates a communication problem, but the actual root cause is mechanical:
sandst_a@sls-ec-rf11-11-01:~$ python3 /ioc/NeedfulThings/ecmc_ec_scripts/ec_diagnostic_messages.py -m0 -s4
DEVICE INFORMATION:
===================
name: EL5042
master id: 0
slave id: 4
vendor id: 0x2
product id: 0x13b23052
host time: 2026-03-04 14:08:45.815998
DIAGNOSTIC MESSAGES:
====================
time text_id text flags dynamic
2026-03-04 11:50:34.276485 0x830c (error) Encoder Single-Cycle-Data Error, channel: 0002 0x102 0x060002000600000006000000
2026-03-04 11:50:34.276464 0x830b (error) Encoder Watchdog Error, channel: 0002 0x102 0x060002000600000006000000
2026-03-04 11:50:34.276440 0x830c (error) Encoder Single-Cycle-Data Error, channel: 0001 0x102 0x060001000600000006000000
2026-03-04 11:50:34.276420 0x830b (error) Encoder Watchdog Error, channel: 0001 0x102 0x060001000600000006000000
2000-01-01 01:00:00.968037 0x1303 (info) Encoder Supply ok 0x10 0x060000000600000006000000
2000-01-01 01:00:00.968000 0x0002 (info) Communication established 0x10 0x060000000600000006000000
When the magnetic strip is correctly mounted, the LED on the read head is in the lower part of the text on the strip (RLS). The read head also needs to be aligned; see the manual.
RLS supplies a credit-card-sized inspection tool for the magnetic strips. With this tool, you can verify that the strip has two tracks with proper magnetization. In a few very rare use cases, the strip has been found to be fully demagnetized. In that case, the magnetic strip needs to be replaced.