Ex72xx option configurations

The OPT wrappers use a common dispatcher and per-channel record/panel interface, with separate PDO mappings and timing policies for EL/EP72xx and ELM72xx. All existing non-OPT hardware configurations, databases and panels are unchanged.

For the EL7411-specific mapping, defaults and CSTCA input diagnostics, see EL7411 OPT. The existing EL/EP/ELM72xx CSTCA behaviour described here is unchanged.

Devices and defaults

HW_DESCChannelsPDO familyDefault MODETPINFO2DIAG
EL7211-9014_OPT1EL72XXCSV1INPUTS1
EP7211-0034_OPT1EL72XXCSV1INPUTS1
EL7201_OPT1EL72XXCSV0ERRORS1
EL7201-0010_OPT1EL72XXCSV1ERRORS1
ELM7231-0010_OPT1ELM72XXCSV0NONE0
ELM7222-0010_OPT2ELM72XXCSV0NONE0

The defaults retain the corresponding legacy CSV/STD mappings and logical entry names, with encoder feedback status additionally enabled on every channel. Set ENC_STAT=0 to omit that addition. The ELM defaults retain the other minimal mappings of the existing ELM CSV configs; there are no ELM STD configs in this repository. ELM channels read their electronic motor nameplates, as in the existing configurations.

${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "HW_DESC=EL7201-0010_OPT"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "HW_DESC=EL7211-9014_OPT,OPT='MODE=CSP,ENC_STAT=1,TP=0,INFO2=TEMP'"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "HW_DESC=ELM7231-0010_OPT,OPT='MODE=CST,DIAG=1'"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "HW_DESC=ELM7222-0010_OPT,OPT='MODE_1=CSV,MODE_2=CSP,TP_2=1,DIAG_2=1,INFO2_2=TEMP'"

Example: three EL7211-9014 drives

This PSI engineering-startup excerpt configures three consecutive slaves on master 0: slave 36 in CST, slave 37 in CSV and slave 38 in CSP. addSlave.cmd increments SLAVE_ID after each call, so only the first position is specified. Apply the motor component immediately after each slave: it configures the most recently added drive.

require ecmccfg sandst_a "ENG_MODE=1,MASTER_ID=0,ECMC_VER=v11.1.0_RC1"

#- ec0.s36: cyclic synchronous torque.
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=36,HW_DESC=EL7211-9014_OPT,OPT='MODE=CST'"
#- Limit maximum current to 1355 mA: half the motor nominal current of 2710 mA.
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Beckhoff-AM8111-XFX0,MACROS='I_MAX_MA=1355'"

#- ec0.s37: cyclic synchronous velocity.
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7211-9014_OPT,OPT='MODE=CSV'"
#- Limit maximum current to 1355 mA: half the motor nominal current of 2710 mA.
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Beckhoff-AM8111-XFX0,MACROS='I_MAX_MA=1355'"

#- ec0.s38: cyclic synchronous position.
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7211-9014_OPT,OPT='MODE=CSP'"
#- Limit maximum current to 1355 mA: half the motor nominal current of 2710 mA.
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Beckhoff-AM8111-XFX0,MACROS='I_MAX_MA=1355'"

The sandst_a module build and v11.1.0_RC1 version are specific to this example’s environment. applyComponent.cmd requires access to ecmccomp. Use the normal IOC startup sequence to apply the completed bus configuration.

The AM8111-XFX0 component defines nominal current as 2710 mA. I_MAX_MA=1355 overrides the maximum-current setting; the nominal-current setting remains 2710 mA. All three profiles retain the default ENC_STAT=1, TP=1, INFO2=INPUTS and DIAG=1.

Options and capabilities

MODE accepts CSV, CSP, CST or CSTCA for every wrapper. Each channel explicitly selects its mode by a one-byte startup SDO: CSV = 9, CSP = 8, CST = 10, CSTCA = 11. Channel 1 uses 0x7010:03; ELM channel 2 uses 0x7110:03.

TP accepts 0 or 1 and maps touch-probe status, including input levels. EL7201 with resolver feedback does not support this option; TP=1 is rejected. Other wrappers support it. Touch-probe control and captured positions are not part of this option.

DIAG=1 maps actual velocity, actual torque and DC link voltage, and loads their records. DIAG=0 omits them. ELM CSP additionally maps following error when DIAG=1. EL/EP CSP always maps following error, as in CSP_STD. EL/EP CSV and CSP map torque offset; ELM does not map torque offset. CST and CSTCA use torque demand. ENC_STAT=1 is the default on every listed wrapper in CSV, CSP and CST. CSTCA omits feedback PDOs regardless of this option. It maps encoder feedback status and loads its records. ENC_STAT=0 omits the PDO and records; ENC_STAT_1 / ENC_STAT_2 can override each channel separately. CfgEncoderStatus and the panel link reflect the resolved selection.

EL/EP use PDO 0x1A0C; ELM uses 0x1A02 for channel 1 and 0x1A42 for channel 2. Each carries the same 16-bit layout: padding in bits 0–12, position-invalid in bit 13, and the input cycle counter in bits 14–15. The shared records retain encoderStatus01/02, Enc01/02-Stat and Enc01/02-NotValid.

INFO2MeaningSupported wrappers
INPUTSDigital inputs 1/2 and STO, selection 10EL7211-9014, EP7211-0034
TEMPPCB temperature, selection 4All listed wrappers
ERRORSRaw drive error bitmap, selection 5EL/EP wrappers
NONEOmit Info2 PDO and recordsAll listed wrappers

Velocity/position demand records and velocity diagnostics use the EL STD scaling on EL/EP (2.3406E-5, rad/s). ELM retains the existing raw demand convention (1, RAW), also used for its optional velocity diagnostics. VEL_ESLO, VEL_EGU, POS_ESLO and POS_EGU override record scaling/units when needed for the drive’s configured scaling. They do not change drive SDO scaling. Torque records use 0.1 percent per count in both families.

The ELM INPUTS selection is deliberately not exposed through the STO-oriented input template. Use TP=1 for the two touch-probe input levels. Error bitmap records expose the raw word; interpreting individual bits requires the matching drive revision’s documentation.

MODE_1, TP_1, INFO2_1, DIAG_1 and ENC_STAT_1 override the shared option for channel 1. ELM7222 also accepts the corresponding _2 overrides. A channel-specific value wins over the shared value, which wins over the wrapper default. Second-channel options on a single-channel wrapper are rejected. All channels are validated before resetting or configuring the slave. No ecmcIf state is used.

CSTCA: external commutation angle

Select MODE=CSTCA to send torque and the electrical commutation angle over EtherCAT. MODE_1=CSTCA and MODE_2=CSTCA select it independently on ELM7222.

${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "HW_DESC=EL7211-9014_OPT,OPT='MODE=CSTCA'"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "HW_DESC=ELM7222-0010_OPT,OPT='MODE_1=CST,MODE_2=CSTCA'"

CSTCA uses a minimal TxPDO configuration: only 0x1A01 DRV Statusword on EL/EP, plus 0x1A05 Info2 inputs when INFO2=INPUTS is selected on a supported wrapper. INFO2=NONE selects statusword only. ELM uses its corresponding drive statusword PDO (0x1A10 / 0x1A50); ELM does not support INFO2=INPUTS. Position feedback, encoder status, touch probe, velocity, torque and voltage telemetry are omitted in CSTCA, even when ENC_STAT, TP or DIAG are enabled. INFO2=TEMP and INFO2=ERRORS are also omitted in this mode. Configuration PVs report the effective selection, and position widgets and unavailable feature links are hidden. Other channels retain their own selected mode’s mappings.

The torque PDO and Drv01-Trq / Drv01-Trq-RB records are shared with CST. CSTCA additionally maps commutationAngle01 (commutationAngle02 on channel 2) as UINT16 at 0x7010:0E (0x7110:0E). EL/EP use RxPDO 0x1603; ELM uses 0x1614 / 0x1654. Other modes do not map this output.

Drv01-ComAngle is writable in electrical degrees; Drv01-ComAngle-RB reads back the PDO demand, not a measured rotor angle. Channel 2 uses Drv02. The scale is 360/65536 degrees per count, with a writable range of 0 through 359.9945068359375 degrees. Real-time logic can write the raw commutationAngle01/02 entry in counts (0–65535). The controller supplies the angle cyclically when running external commutation; the EPICS record is a manual setpoint. The CSTCA detail panel includes torque controls and the angle setpoint/readback. CfgMode=3 selects that panel.

Sources: EL output objects, EP output objects, ELM output objects, and the family PDO references below.

Timing and startup policy

SettingEL7211-9014 / EP7211-0034 / EL7201-0010EL7201 resolverELM72xx
Sync0 periodEtherCAT cycleEtherCAT cycle62500 ns
Sync0 shift0Half EtherCAT cycleECMC_SYNC_0_OFFSET_NS, default 0
Sync1 period00EtherCAT cycle
Sync1 shift00ECMC_SYNC_1_OFFSET_NS, default 0
Initial peak-current SDO100 mA, motor config overwrites itSameNameplate policy; no EL peak-current override

EtherCAT port-wiring checks are enabled by the EP wrapper only. EL and ELM wrappers do not enable this check.

All wrappers accept SYNC_0_CYCLE, SYNC_0_SHIFT, SYNC_1_CYCLE and SYNC_1_SHIFT overrides in ns. ELM timing does not issue EL-specific 0x1C32:02 and 0x1C33:02 cycle-time SDOs. The watchdog helper retains its sample-rate-based defaults and accepts WATCHDOG_DIVIDER and WATCHDOG_INTERVALS. The existing ECMC_EC_STARTUP_DELAY_EL72XX startup-delay setting is retained.

Extending a family

Device wrappers fix product identity, family, channel count, capabilities and defaults. ecmcEX72XX_OPT.cmd validates channels before slave reset, dispatches the mappings and applies the family’s timing policy.

  • ecmcEX72XX_OPT_EL72XX_pdo.cmd and _timing.cmd implement EL/EP policy.
  • ecmcEX72XX_OPT_ELM72XX_pdo.cmd and _timing.cmd implement ELM policy, including the second channel’s PDO and object offsets.
  • ecmcEX72XX_OPT_channel.cmd shares mode SDO selection, feature records and configuration readbacks across families.

The mapping preserves common logical entry names such as driveControl01, velocitySetpoint01 and positionActual01. ELM channel 2 uses suffix 02. The EL7201-0010 following-error object uses subindex 0x06; the existing EL7211-9014/EP7211-0034 STD mapping uses 0x09.

These wrappers support the MDP742 layout only. DS402-profile device variants need their own family mapping and are not aliases for these wrappers. Likewise, adding another ELM or EL variant requires checking its exact ESI/revision and capabilities; the family name alone does not establish compatibility.

References: EL OCT PDO mapping, EL resolver mapping, ELM PDO mapping, ELM input objects, MDP742 versus DS402.

Panels and records

Single-channel wrappers select ecmcEX72XX_OPT.ui. ELM7222 selects the dedicated ecmcEX72XX_OPT_2ch.ui top-level overview. Both keep the standard 128 x 500 slave frame and the IOC, MasterID and SlaveID macros.

The two-channel overview shows each channel’s mode, encoder position, decoded DS402 state and Fault/Warning LEDs, with equal links to open channel 1 or channel 2. It does not embed one channel’s detailed controls. Each link opens the shared channel panel with its own explicit ChID, CfgSuffix and ChannelTitle macros. The single-channel overview passes an empty title; two-channel subpanels show Channel 1 or Channel 2.

The channel panel’s Drive tab groups motion mode, encoder position, drive state, Fault/Warning LEDs and configured drive-detail links. The Setup tab groups touch-probe and Info2 configuration readbacks and their detail links.

caQtDM -macro 'IOC=IOC_PREFIX,MasterID=0,SlaveID=1' ecmcEX72XX_OPT.ui
caQtDM -macro 'IOC=IOC_PREFIX,MasterID=0,SlaveID=1' ecmcEX72XX_OPT_2ch.ui

Configuration PVs use the slave’s ECMC_P, normally $(IOC):m$(MasterID)s$(SlaveID)-:

SuffixValues
CfgChannels1 or 2
CfgMode0 = CSV, 1 = CSP, 2 = CST, 3 = CSTCA
CfgTouchProbe0 = Not mapped, 1 = Mapped
CfgInfo20 = INPUTS, 1 = TEMP, 2 = ERRORS, 3 = NONE
CfgDiagnostics0 = Not mapped, 1 = Mapped
CfgTorqueOffset0 = Not mapped, 1 = Mapped
CfgFollowingError0 = Not mapped, 1 = Mapped
CfgEncoderStatus0 = Not mapped, 1 = Mapped

Channel 2 adds 02 to each per-channel configuration suffix (for example CfgMode02 and CfgInfo202). These are startup readbacks; changing options requires restarting the IOC. Feature links appear only when the relevant PDOs and records are configured. Hidden links subscribe to configuration PVs only; feature records are subscribed when their detail panel is opened. A connection failure remains a connection failure, rather than implying a disabled feature. CSV, CSP, CST and CSTCA detail panels expose DS402 enable and Disable buttons. From the overview, open the desired channel and select its mode’s detail link. The buttons process that channel’s Drv01-TrgDS402Ena.PROC and Drv01-TrgDS402Dis.PROC records (channel 2 uses Drv02). The enable sequence writes control words 128, 6, 7 and 15 with fixed 10 ms delays; disable writes 0. These are direct PDO controls and require no axis object. The sequence uses fixed delays rather than waiting for status transitions; the panel displays the status word, warning and error readbacks alongside the controls.

All mode detail panels use a compact 350 x 260 layout with writable target and separate PDO demand readback:

ModeWritable PV suffixDemand readback
CSVDrv01-SpdDrv01-Spd-RB
CSPDrv01-PosCmdDrv01-PosCmd-RB
CSTDrv01-TrqDrv01-Trq-RB
CSTCADrv01-Trq, Drv01-ComAngleDrv01-Trq-RB, Drv01-ComAngle-RB

The torque-offset detail panel also has a writable target, Drv01-TrqOff, and a separate Drv01-TrqOff-RB readback with a trend button. Enter the offset in percent and press Enter to write. This link is available for the EL72XX PDO family (EL/EP) in CSV and CSP, where the offset is mapped. The current ELM72XX and 7062 OPT configurations do not map a torque offset.

The CST panel also shows actual torque (Drv01-TrqAct / Drv02-TrqAct), in percent, alongside the demand readback. It uses the existing DIAG=1 telemetry; with DIAG=0 the panel says Not mapped and does not subscribe to that absent record. Both readbacks fit on one row, retaining the 350 x 260 panel size.

Channel 2 uses Drv02. Enter the target in the record’s configured units and press Enter to write. Torque is in percent; velocity and position use the scaling described above. These records do not require an axis object. When an axis controls the drive, use the axis panel for motion commands.

Small > buttons beside readbacks open the existing ecmcGraph_v1.ui trend panel, using the same IOC, TITLE and PV macros as the MO7221 panels. They are available for actual position in the channel/two-channel overviews, actual torque, velocity and DC link voltage in Diagnostics, CST torque demand readback and actual torque, CSP position demand readback, CSV velocity demand readback, following error, PCB temperature, and torque offset readback. Each graph targets the selected channel’s exact readback PV. Links are available only for mapped features; DIAG=0 does not offer trends for absent diagnostic records. Panel dimensions are unchanged.

DS402 state and LEDs

The detail panels show Drv01-DS402State (channel 2: Drv02-DS402State), decoded from the existing status PDO. Ready, On, Enabled, Fault and Warning use LEDs instead of long binary readback strings. Hover over an LED for its bit meaning; open State guide for a compact reference to all states. Warning is a separate bit and can coexist with Operation enabled.

Decoded stateMeaning
Not ready to switch onDrive is initializing.
Switch on disabledOutput stage is disabled.
Ready to switch onShutdown command accepted.
Switched onReady for operation enable.
Operation enabledAccepts the selected mode’s setpoint.
Quick stop activeHandling a quick-stop request.
Fault reaction activeExecuting its fault response.
FaultFault response complete; resolve cause.
UnknownStatus bits do not match a defined state.

The decoder uses the DS402 state-bit patterns, ignoring voltage, warning and mode/manufacturer-specific bits. See the manufacturer reference for state coding.

The new OPT-only derived records refresh locally at 10 Hz and propagate invalid source alarms. They add no PDOs or SDOs. Reload the IOC database/restart the IOC to load them before using the new state readback. The existing enable sequence still uses fixed delays rather than waiting for decoded state transitions.

The encoder-status panel uses a 180 x 126 layout with a Position valid LED: green when status bit 13 is 0, red when it is 1. The two blue/grey Cycle [1:0] LEDs show the counter MSB on the left (bit 15) and LSB on the right (bit 14). The counter advances each process-data cycle and wraps from 3 to 0; it may look static at GUI sampling rates and is not a standstill/communication-health indicator. Bits 0–12 are padding, with no additional encoder diagnostics in this PDO. The raw word remains available below the LEDs, and tooltips explain each field. See the feedback-status layout and feedback validity/counter meanings.

Input/STO and touch-probe panels use compact 180 x 126 layouts. Input LEDs are green for high and grey for low. The STO OK LED is green for feedback OK (1) and red for STO active (0). Tooltips explain the colors. The touch-probe panel retains the raw status word below its two input LEDs.

Temperature records now consistently use the drive channel, for example Drv01-TmpAct or Drv02-TmpAct, backed by temperatureActual01/02. The earlier EP-specific panels and substitutions remain intact, but the EP OPT wrapper selects the shared resources.

Validation

Run python3 tests/test_ex72xx_opt.py. The tests cover default PDO compatibility with legacy scripts plus the enabled encoder-status PDO, supported option combinations, independent ELM channels, mode-selection SDOs, native EPICS decoding of every 16-bit statusword, writable target PVs, timing/watchdog defaults and overrides, invalid-option rejection before reset, database expansion, record sources and visible panel channels. Database expansion needs EPICS msi; UI compilation needs Qt uic. Those checks are skipped individually if the respective tool is unavailable.

Before deployment, check EtherCAT OP, live Channel Access readbacks and panel behaviour on the actual device/revision. Static checks do not establish hardware PDO acceptance, drive mode transitions or live panel behaviour.