Files
2026-11-15 15:24:08 +01:00
..
up
2026-11-15 15:24:08 +01:00
up
2026-11-15 15:24:08 +01:00
up
2026-11-15 15:24:08 +01:00

OWIS stage with EL7062 CSV and TR SSI encoder

This folder configures the OWIS linear stage with an EL7062 stepper terminal in cyclic synchronous velocity (CSV) mode. Position control is closed through the TR-Electronic LT140-S absolute SSI encoder. The engineering unit is millimetres.

Important EL7062 CSV firmware warning

PSI documents an EL7062 firmware defect in CSV mode: when the drive is disabled, its internal open-loop counter can jump to the nearest full turn (multiples of 1048576 counts). The current PSI best-practice configuration for an EL7062 with external position feedback therefore uses CSP instead of CSV.

Use ../EL7062_CSP for normal operation unless the installed EL7062 firmware is positively identified as containing the vendor fix. Before commissioning this CSV variant, reproduce the enable/move/disable test at low speed and confirm that positionActual01 remains continuous across disable and re-enable.

References reviewed at PSI ecmccfg commit b30e4607:

CSV configuration changes

The CSV folder now differs from ../EL7062_CSP in all mode-dependent settings:

Setting CSV value Reason
Hardware description HW_DESC=EL7062 Loads the EL7062 CSV PDO layout
Axis mode mode: CSV Selects cyclic synchronous velocity operation
Drive setpoint velocitySetpoint01 CSV commands velocity, not position
Drive numerator 500 1 mm/revolution * 500 EtherCAT cycles/second
Drive denominator 2147483648 Signed 32-bit CSV velocity range
CSP drive encoder flag Omitted useAsCSPDrvEnc applies only to CSP
Channel 2 Generic-Ch-Not-Used Completes SDO handling without configuring an absent motor

The CSV drive conversion is therefore:

raw velocity = commanded velocity * 2147483648 / 500
commanded velocity = raw velocity * 500 / 2147483648 mm/s

At the configured 2 mm/s motion velocity, the nominal raw velocity command is approximately 8589935 counts. This calculation must be checked against the live command and actual-velocity entries during low-speed commissioning.

System configuration

Function Configured hardware or setting
ECMC ecmccfg 11.0.8, engineering mode enabled, EC_RATE=500 Hz
Motion axis Axis 1, EPICS name M1, description OWIS Stage EL7062
Stepper terminal EL7062 at EtherCAT slave 10, channel 1, CSV mode
Unused drive channel EL7062 channel 2, Generic-Ch-Not-Used
Motor OWIS two-phase stepper; 0.8 A maximum, 0.5 A standby, 48 V nominal, 7.5 ohm/phase, 3080 uH, 400 full steps/revolution
Primary feedback TR-Electronic LT140-S on EL5042 slave 2, channel 1
Limit-switch supply EL2008 slave 5, channel 4 switched output
Position unit mm

EC_RATE=500 is a 500 Hz EtherCAT rate. PSI describes 100-500 Hz as a normal range for many motion systems.

Encoder configuration

Primary SSI encoder

The EL5042 channel is configured by SDO before the axis is loaded:

  • SSI mode, binary coding
  • 24 position bits, no multiturn or offset bits
  • Status bits disabled and CRC inversion enabled
  • 1 MHz clock
  • 9.0 V encoder supply
  • Scale: 1 / 10000 mm/count, equivalent to 0.1 um/count
  • Absolute offset: -11.826 mm
  • Counter overflow/wraparound disabled

The 10000 counts/mm value is labelled as interferometer-calibrated in cfg/axis.yaml. The files do not establish its calibration uncertainty or confirm the current mechanical datum.

EL7062 open-loop counter

  • Secondary encoder; the SSI encoder remains primary feedback
  • Scale: 1 / 1048576 mm/count for a 1 mm/revolution stage
  • Incremental, 32-bit counter
  • Referenced to the primary SSI encoder at startup (refToEncIDAtStartup: 0)
  • Not selected as a CSP drive encoder

The counter is retained for observation and comparison. It is also the signal affected by the documented CSV disable defect.

Axis behaviour

Characteristic Configured value
Default velocity 2 mm/s
Default acceleration/deceleration 2 mm/s^2
Emergency deceleration 10 mm/s^2
S-curve jerk 10 mm/s^3
Jog velocity 1 mm/s
Backward software limit -1 mm
Forward software limit 95 mm
Maximum monitored velocity 3 mm/s
Following-error tolerance 0.05 mm for 10 EtherCAT cycles
At-target tolerance 0.0015 mm for 50 EtherCAT cycles
Auto-enable timeout 10 s
Automatic disable delay 10 s idle

The centralized ECMC controller closes the position loop using the SSI encoder and produces the EL7062 CSV velocity command. The configured gains are:

Parameter Value
Kp 0.02
Ki 0.01
Kd 0.01
Kff 1

PSI notes that CSV normally needs proportional gain at minimum. These local values are retained from the source configuration and must be tuned and verified with the installed mechanics.

The hardware limits use EL7062 channel 1 inputs:

  • Backward limit: binaryInputs01.0
  • Forward limit: binaryInputs01.1
  • Limit-switch power: EL2008 channel 4

Home and external interlock are constant true because no corresponding sensors are assigned. Software limits and axis monitoring remain enabled.

Automatic FAT motion sequence

startup.cmd loads cfg/code_2.plc at a 500 ms PLC sample period. A rising edge on doMotion starts the sequence.

  • Move velocity: 2 mm/s
  • Acceleration and deceleration: 3 mm/s^2
  • Ten measurement positions from 1.0000 mm to 90.0000 mm
  • A preliminary position 0.2 mm below each measurement point, giving a final positive-direction approach
  • Intermediate dwell: 2 PLC scans, nominally 1 s
  • Measurement dwell: 12 PLC scans, nominally 6 s
  • Five forward/backward cycles

The ten (preliminary -> measurement) pairs are:

0.8000  ->  1.0000 mm
10.6900 -> 10.8900 mm
20.5775 -> 20.7775 mm
30.4675 -> 30.6675 mm
40.3550 -> 40.5550 mm
50.2450 -> 50.4450 mm
60.1325 -> 60.3325 mm
70.0225 -> 70.2225 mm
79.9100 -> 80.1100 mm
89.8000 -> 90.0000 mm

The PLC powers off the axis and disables itself if either limit becomes invalid or mc_move_abs() returns an error.

# Start
caput aik-motion-pc5:Set-M1-DoMtn-RB 1

# Stop
caput aik-motion-pc5:Set-M1-DoMtn-RB 0

Remaining commissioning issues

  • The motor component declares R_COIL_MOHM=7500, while the controller component declares R_COIL_MOHM=2471. Resolve this mismatch before enabling the drive. Motor resistance, inductance, and controller parameters should be obtained from the installed motor and EL7062 autotune.
  • The PLC currently accepts busy-low plus attarget as move completion without first latching that busy became high. Validate the helper behaviour or add the established execute/busy handshake before unattended operation.
  • The configured 9.0 V EL5042 supply must be checked physically and confirmed against the exact encoder order code before connecting the encoder.
  • Static source consistency does not prove PDO compatibility, correct polarity, stable control, or safe motion on the installed hardware.

Relevant files

  • startup.cmd - EtherCAT slaves, SSI SDOs, CSV hardware description, motor and controller components, axis loading, and PLC loading
  • cfg/axis.yaml - CSV drive mapping, primary SSI feedback, trajectory, limits, controller, and monitoring
  • cfg/enc_open_loop.yaml - secondary EL7062 open-loop counter
  • cfg/code_2.plc - active multi-position FAT sequence
  • cfg/code.plc - alternate older sequence, not loaded by startup.cmd

Commissioning sequence

  1. Confirm that the IOC is loading ECMC/EL7062_CSV/startup.cmd.
  2. Verify the installed EL7062 firmware and resolve the CSV counter-defect gate.
  3. Confirm channel 1 motor wiring and that channel 2 is physically unused.
  4. Resolve the 7500/2471 mOhm resistance mismatch, run autotune, and apply the resulting motor/controller parameters.
  5. Confirm 9.0 V at the EL5042 connector before attaching the encoder.
  6. With motion disabled, verify SSI readiness, raw position, status bits, limit inputs, and limit-switch supply.
  7. Enable at reduced current and command a very low positive velocity. Confirm motor direction, SSI direction, velocitySetpoint01, and actual velocity.
  8. Move within one motor revolution, disable, and verify that positionActual01 does not jump to a multiple of 1048576 counts.
  9. Verify following error, settling, software limits, and stop behaviour.
  10. Validate the PLC execute/busy handshake before running the complete FAT sequence.