Could be caused by:
Always start troubleshooting by checking the error, warning and ready bits and reading the EL5042 manual. Next step is to read the diagnostic SDO bits of the EL5042, see below under heading “Diagnostics”.
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:
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 need 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, then verify the power consumption of the encoder and compare with the specified consumption. If the power consumption does not match, the encoder might be broken or a faulty cabling.
Long cable lengths can affect both power supply levels and the serial data channels.
Power supply:
Longer cables will normally also result in a higher voltage drops. Especially for 5V encoders this can be an issue. Make sure that the voltage are within the specified range by measuring the voltage level close to the encoder.
If the voltage is to 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} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=1,MACROS='CLK_FRQ_KHZ=500'"
For EL5042 the following rates are available:
NOTE: The closest freq. equal or higher than CLK_FRQ_KHZ will be selected.
In ecmccfg the default frequency for encoders are set to the lowest possible value, 100kHz. Sometimes increaseing the frequence to 1MHz will result in a more stable reading. If possible use ecmccomp instead of ecmccfg for configutration of encoders since, in the ecmccomp repo, the default frequency values are higher and normally more stable.
See above for available communications 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 amount of bits needs to be subtracted from the ST_BITS or MT_BITS
Example: 26bit RLS, no LSB offset
${SCRIPTEXEC} ${ecmccomp_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 then the sum of the bit's still need to match the bit-count of the encoder. Example: Offset 3 LSB bits, set ST_BITS=23 (26-3)
${SCRIPTEXEC} ${ecmccomp_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"
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} ${ecmccomp_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 needs to be accounted for in the 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} ${ecmccomp_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: