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 EL7041 and TR SSI encoder

This folder contains the ECMC configuration used for the OWIS linear stage with an EL7041-0052 stepper terminal and a TR-Electronic LT140-S absolute linear encoder. The configured engineering unit is millimetres.

System configuration

Function Configured hardware or setting
ECMC ecmccfg 11.0.8, engineering mode enabled, master 0, EC_RATE=500
Motion axis Axis 1, EPICS name M1, description OWIS stage with TR SSI encoder
Stepper terminal EL7041-0052 at EtherCAT slave 7, configured for CSV
Motor OWIS two-phase stepper; 0.8 A maximum current, 0.5 A standby current, 48 V nominal, 7.5 ohm/phase, 400 full steps/revolution
Primary feedback TR-Electronic LT140-S on EL5042 slave 2, channel 1
Position unit mm

The EL7041 distributed-clock configuration uses ASSIGN_ACTIVATE=0x0300, a 2,000,000 ns Sync0 cycle, and zero Sync0 shift.

Encoder and motion scaling

Primary SSI encoder

The EL5042 channel is explicitly 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 described in cfg/axis.yaml as the measured encoder scale. These files do not independently establish the calibration uncertainty or confirm the current mechanical datum.

EL7041 drive and open-loop counter

  • CSV velocity scaling: 5 / 32768 mm/s per raw setpoint unit
  • The source comment identifies 5 mm/s as 2000 full steps/s at 400 steps/mm.
  • Open-loop scale: 1 / 25600 mm/count
  • Open-loop position width: 16 bits
  • The open-loop encoder is secondary; the SSI encoder is primary feedback.
  • At startup, the open-loop encoder references encoder ID 1.

Axis behaviour

Characteristic Configured value
Default velocity 2 mm/s
Default acceleration/deceleration 3 mm/s^2
Emergency deceleration 5 mm/s^2
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 15 s
Automatic disable delay 15 s idle

The trajectory generator is configured for an S-curve profile. Automatic enable at startup is disabled, and the EPICS motor record is disabled in this axis configuration. External axis commands remain enabled.

The external interlock and home inputs are constant true because no external interlock or home sensor is assigned. The hardware limits are read from the EL7041 drive status word:

  • Backward limit: driveStatus01.11
  • Forward limit: driveStatus01.12

Controller configuration

ECMC uses the TR SSI encoder as the primary position feedback and applies these controller values from cfg/axis.yaml:

Parameter Value
Kp 1
Ki 0.1
Kd 1.5
Kff 1

These are configured values; the files do not show when or how they were tuned.

Automatic FAT motion sequence

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

The sequence uses:

  • Move velocity: 2 mm/s
  • Acceleration and deceleration: 2 mm/s^2
  • Ten positions from 1.0000 mm to 90.0000 mm
  • Dwell: 12 PLC scans, nominally 6 s at each position
  • Five forward/backward cycles

The configured positions are:

1.0000 mm
10.8575 mm
20.1050 mm
31.8050 mm
38.3275 mm
51.9900 mm
57.6875 mm
71.4650 mm
81.2450 mm
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 and stop commands documented by startup.cmd are:

caput aik-motion-pc5:Set-M1-DoMtn-RB 1
caput aik-motion-pc5:Set-M1-DoMtn-RB 0

Configuration caveats

  • ECMC_SLAVE_RESET is set to false before the EL5042 is added and remains false after its SDO configuration. Confirm that retaining this reset override is intentional for the installed terminal and startup procedure.
  • No limit-switch feed-output mapping is enabled in cfg/axis.yaml; the feedSwitchesOutput line is commented out.
  • The PLC considers a move complete whenever drive busy is low and attarget is true; it does not first latch that drive busy became high. Confirm this execute/busy behaviour with the installed ECMC helper before relying on the unattended sequence.
  • The 16-bit open-loop counter and its overflow behaviour should be checked over the required travel. No explicit overflow setting is present in cfg/enc_open_loop.yaml.

Relevant files

  • startup.cmd - EtherCAT slave setup, EL5042 SDOs, EL7041 motor component, distributed clocks, axis loading, and PLC loading
  • cfg/axis.yaml - axis, primary encoder, limits, trajectory, controller, and monitoring configuration
  • cfg/enc_open_loop.yaml - EL7041 secondary/open-loop encoder configuration
  • cfg/code.plc - active multi-position FAT sequence

Checks required before operation

  1. Verify the loaded IOC working directory and confirm that this startup.cmd and cfg/code.plc are the active files.
  2. Verify EL7041 channel assignment, motor phase wiring, phase resistance, configured currents, and controller tuning.
  3. Confirm the EL5042 output voltage is 9.0 V before connecting the encoder, and verify the encoder's permitted supply voltage from its documentation.
  4. Confirm that the encoder is ready and has no warning or error bits.
  5. Confirm that positive motor motion produces positive SSI position motion.
  6. Verify the encoder scale and absolute offset against a traceable displacement reference if the encoder or stage datum has changed.
  7. Exercise both hardware limit switches at low velocity and confirm their raw status bits and configured directions.
  8. Validate following error, settling, software limits, open-loop counter behaviour, and the PLC move handshake at reduced speed before running the complete automatic sequence.