Use this page for EL7062-specific behavior such as warnings, open-loop counter issues, autotuning, and touch-probe/index homing setup.
If the drive is in error/warning state and cannot be enabled, see drive refuses to enable.
The most common reason for this error is:
The EL7062 has a firmware bug if configured to run in open loop CSV.
When disabling the amplifier, the open-loop counter jumps to the nearest full-turn value. Upgrade the terminal firmware if a fixed firmware is available for the installed hardware revision. See Firmware Update Over FoE for the update procedure.
Use CSP mode until the terminal has firmware where the CSV bug is fixed.
Motor might move during tuning sequence
If tuning is off an autotune sequence can be executed from the hardware expert panel. The auto tuning sequence measures coil resistance and inductance and sets initial values for control loop parameters:
The autotune process also creates a MACROS string that can be used with ecmccomp to set the parameters at startup.
Requirements for successful tuning:
For more info, see Beckhoff docs.
Sometimes further fine-tuning of the parameters might be needed.
Motor might move during tuning sequence
The incremental interface of the EL7062 works in a similar way to EL72xx servos and is different from the EL5101 interface. For EL7062, the latch functionality is called touch probes. Each drive channel is equipped with two touch probes, which can be configured to latch on a digital input or on the index pulse of the incremental encoder. The encoder source of the touch probes can also be configured as open-loop counter or incremental encoder (secondary encoder).
The following commands can be used (see Beckhoff manual for more info):
# CH1 Set touch probe to latch on index pulse
ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8001,0x11,5,2)"
# CH2 Set touch probe to latch on index pulse
ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8101,0x11,5,2)"
# CH1 Set touch probe source 01 to secondary encoder
ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8001,0x15,1,2)"
# CH2 Set touch probe source 01 to secondary encoder
ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8101,0x15,1,2)"
These commands are also accessible via the Encoder-Generic-INC component of ecmccomp:
The following macros are implemented:
TP1_POS_SRC : Touchprobe 1 source
PRIM: primary encoder (open loop counter)
SEC: secondary encoder (incremental encoder)
TP2_POS_SRC : Touchprobe 2 source
PRIM: primary encoder (open loop counter)
SEC: secondary encoder (incremental encoder)
TP1_TRG : Touchprobe 1 trigger
TPBI: touch probe input 1
INDEX: encoder index pulse
TP2_TRG : Touchprobe 2 trigger
TPBI: touch probe input 2
INDEX: encoder index pulse
Example:
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-Generic-INC, CH_ID=2, MACROS='ST_ENC_RES=4000,TP1_POS_SRC=SEC,TP1_TRG=INDEX'"
Arming a latch/touch probe is a bit more complex than when using EL5101 and is done by the touch probe control word (covering both touch probes):
| bit | tp ch | desc |
|---|---|---|
| 0 | 1 | enable touch probe |
| 1 | 1 | enable continuous latching |
| 2 | 1 | trig mode B1 |
| 3 | 1 | trig mode B2 |
| 4 | 1 | latch on positive edge |
| 5 | 1 | latch on negative edge |
| 6 | 1 | reserved |
| 7 | 1 | reserved |
| 8 | 2 | enable touch probe |
| 9 | 2 | enable continuous latching |
| 10 | 2 | trig mode B1 |
| 11 | 2 | trig mode B2 |
| 12 | 2 | latch on positive edge |
| 13 | 2 | latch on negative edge |
| 14 | 2 | reserved |
| 15 | 2 | reserved |
The ecmc parameter for accessing the control word is:
As an example, arming the touch probe for the following scenario:
would require the following bits in ec0.s$(ENC_SID).touchProbeControl01 to be set:
0b10001 = 17 decWhen setting up homing for an encoder in ecmccfg, the latch/touch probe then needs to be configured in the following way:
encoder:
desc: Inc RS422
numerator: 360 # Scaling numerator example 1 mm/rev
denominator: 1048576 # Scaling denominator example 4096 ticks per 360 degree
type: 0 # Type: 0=Incremental, 1=Absolute
bits: 32 # Total bit count of encoder raw data
absBits: 0 # Absolute bit count (for absolute encoders) always least significant part of 'bits'
position: ec0.s$(ENC_SID).positionActual${ENC_CH=01}_2 # Ethercat entry for actual position input (encoder)
status: ec0.s$(ENC_SID).touchProbeStatus${ENC_CH=01} # mandatory only if 'warning' or 'error' are used
control: ec0.s$(ENC_SID).touchProbeControl${ENC_CH=01}
primary: True
latch:
position: ec0.s$(ENC_SID).touchProbePositionPos$(ENC_CH=01)_1 # Link to latched value 1
timestamp: ec0.s$(ENC_SID).touchProbeTimestampPos$(ENC_CH=01)_1 # 32-bit DC time of the same positive edge
control: 0 # Bit in encoder control word to arm latch.
status: 1 # Bit in encoder status word for latch triggered status.
armCmd: 17 # Arm command, 0b10001 for EL7062 touch probe 1 positive edge
armBits: 5 # Arm command bit size, 5 bits for EL7062 touch probes
homing:
type: 12 # Homing sequence type
position: 0 # Position to reference encoder to
velocity:
to: 30 # Velocity to cam/sensor (used for some homing seqs)
from: 20 # Velocity from cam/sensor (used for some homing seqs)
acceleration: 20 # Acceleration during homing
deceleration: 100 # Deceleration during homing
latchCount: 1 # latch number to ref on (1=ref on first latch)
Here the following controls the arming of the latch:
encoder.latch is still the correct section when the latch is owned by a
homing sequence. If the same hardware touch-probe should be used as a separate
runtime feature, configure the same style of entries under encoder.touchProbe
instead. That keeps normal homing latch behavior separate from the
touch-probe API:
encoder:
touchProbe:
position: ec0.s$(ENC_SID).touchProbePositionPos$(ENC_CH=01)_1
timestamp: ec0.s$(ENC_SID).touchProbeTimestampPos$(ENC_CH=01)_1
control: ec0.s$(ENC_SID).touchProbeControl${ENC_CH=01}
controlBit: 0
status: ec0.s$(ENC_SID).touchProbeStatus${ENC_CH=01}
statusBit: 1
armCmd: 17
armBits: 5
For the ED7062 timestamp fields, load HW_DESC=ED7062_TPDC. The normal
ED7062/EL7062 descriptors are unchanged. The touch-probe API belongs to the
axis; the encoder mapping above is the hardware adapter. Encoder numbers are
one-based in these commands:
AxisTouchProbeArm(axis,encoder,1)
AxisPrintTouchProbe(axis,encoder)
AxisTouchProbeArm(axis,encoder,0)
Without timestamp, the result remains usable but is marked cycle-bounded.
With a 32- or 64-bit timestamp it is marked hardware-timestamped. Positive
position and positive timestamp must be paired (or both negative) so they
describe the same physical edge.
The EL7062/ED7062 touch-probe timestamp gives the event time, but the normal encoder PDO still has to be sampled and transferred at a stable point in the EtherCAT cycle. The configured DC/SYNC shift can therefore affect the stability of position reconstruction and position-compare tests.
In one EL7062 test setup, moving the DC shift into the approximately 200 us
range gave more stable results than the previous phase. Treat this as a setup
hint, not a universal default: the useful margin depends on cycle rate, cable
topology, frame length and which terminals are present. After changing the
topology or EtherCAT rate, re-check the timing with EcPrintSlaveConfig,
EcPrintControlTiming and a touch-probe/position-compare test.
require ecmccfg "ENG_MODE=1"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=3,HW_DESC=EL7062_CSP"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper, CH_ID=1, MACROS='I_MAX_MA=1000, I_STDBY_MA=100, U_NOM_MV=24000,L_COIL_UH=3050,R_COIL_MOHM=2630'"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Drive-Generic-Ctrl-Params, CH_ID=1, MACROS='I_TI=12,I_KP=58,V_TI=150,V_KP=176,P_KP=10'"
# configure touch probe to latch on index pulse of secondary encoder (incremental)
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Encoder-Generic-INC, CH_ID=1, MACROS='ST_ENC_RES=4000,TP1_POS_SRC=SEC,TP1_TRG=INDEX'"
epicsEnvSet(DRV_SID,${ECMC_EC_SLAVE_NUM})
# Configure axis and open loop encoder
${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=./cfg/axis.yaml, DEV=${IOC}, AX_NAME=M1, AXIS_ID=1, DRV_SID=${DRV_SID}, ENC_SID=${DRV_SID}, ENC_CH=01"
# Configure incremental encoder
${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlEnc.cmd, "FILE=./cfg/enc_inc.yaml, DEV=${IOC}, ENC_SID=${DRV_SID},ENC_CH=02"
See the hardware diagnostics page.