If the drive is in error/warning state and not possible to enable, 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. Beckhoff works on a fix…
Use CSP mode until CSV bug is fixed by Beckhoff
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:
0b10101 = 21 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
control: 0 # Bit in encoder control word to arm latch.
status: 1 # Bit in encoder status word for latch triggered status.
armCmd: 21 # Arm command, 0b10101 for EL7062 touch probes
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:
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.