8.0 KiB
OWIS stage with EL7062 CSP-PC and TR SSI encoder
This folder configures the OWIS linear stage in CSP-PC mode: cyclic synchronous position with dual position loops. The EL7062 closes its inner position loop using its internal motor-position counter, while ECMC closes an outer position loop using the TR-Electronic LT140-S absolute SSI linear encoder.
The engineering unit for the drive and both encoders is millimetres.
How CSP-PC is selected
ECMC does not use a separate mode: CSP_PC YAML value. PSI documents CSP-PC as
this combination:
- Load the CSP PDO layout with
HW_DESC=EL7062_CSP. - Set the axis to
mode: CSP. - Map
positionSetpoint01as the drive setpoint. - Define the external SSI encoder as the primary encoder.
- Define the EL7062 internal position counter as a secondary encoder and set
useAsCSPDrvEnc: 1. - Configure and tune the ECMC controller for the outer position loop.
The defining local settings are:
startup.cmd: HW_DESC=EL7062_CSP
cfg/axis.yaml: mode: CSP
cfg/axis.yaml: setpoint: ...positionSetpoint01
cfg/axis.yaml: primary: true # TR SSI encoder
cfg/enc_open_loop.yaml: useAsCSPDrvEnc: 1 # EL7062 drive encoder
References:
- PSI drive modes: CSV, CSP, and CSP-PC
- PSI EL7062/EL5042 best-practice example
- PSI axis YAML controller documentation
- PSI tuning guidance
Control-loop ownership
| Function | Location | Feedback or command |
|---|---|---|
| Trajectory generation | ECMC | Position trajectory in mm |
| Outer position loop | ECMC | TR SSI position versus trajectory position |
| Inner position loop | EL7062 | EL7062 internal motor-position counter versus CSP setpoint |
| Velocity loop | EL7062 | Drive internal |
| Current loop | EL7062 | Drive internal |
ECMC adjusts the CSP position command sent to the EL7062 to correct the error measured by the external SSI encoder. This is the dual-position-loop behaviour shown in the supplied CSP-PC diagram.
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 CSP-PC |
| Stepper terminal | EL7062 at EtherCAT slave 10, channel 1, CSP PDO layout |
| 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 |
| Outer-loop feedback | TR-Electronic LT140-S on EL5042 slave 2, channel 1 |
| Limit-switch supply | EL2008 slave 5, channel 4 switched output |
| Position unit | mm |
Encoder and drive scaling
All position signals in the two loops must use the same engineering coordinate system.
Primary SSI encoder: ECMC outer loop
- SSI, 24-bit binary, 1 MHz clock
- EL5042 supply configured to 9.0 V
- Scale:
1 / 10000 mm/count, or0.1 um/count - Absolute offset:
-11.826 mm - Absolute encoder with wraparound disabled
- Ready bit 2, warning bit 0, error bit 1
EL7062 CSP drive encoder: inner loop
- Scale:
1 / 1048576 mm/countfor a 1 mm/revolution stage - Incremental, 32-bit position counter
- Referenced to primary SSI encoder index 0 at startup
- Selected with
useAsCSPDrvEnc: 1
CSP position command
- Scale:
1 / 1048576 mm/count - Setpoint PDO:
positionSetpoint01 - Control/status PDOs:
driveControl01anddriveStatus01 - DS402/advanced drive type:
1
Outer ECMC controller
The current outer-loop controller values are:
| Parameter | Value |
|---|---|
Kp |
0.02 |
Ki |
0.01 |
Kd |
0.01 |
Kff |
1 |
PSI guidance states that CSP-PC normally needs both proportional and integral action because ECMC and the drive each run a position loop. These copied values are not proof of stable tuning. Tune the EL7062 inner loops first, then tune the ECMC outer loop at reduced speed and current while observing both encoder errors.
Motion and monitoring
| 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 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 with a 500 ms PLC sample period. The active
sequence is unchanged from the CSP source configuration:
- Velocity: 2 mm/s
- Acceleration/deceleration: 3 mm/s^2
- Ten measurement positions from 1.0000 mm to 90.0000 mm
- A preliminary point 0.2 mm below each measurement position
- Intermediate dwell: 2 scans, nominally 1 s
- Measurement dwell: 12 scans, nominally 6 s
- Five forward/backward cycles
# 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 drive-controller component declaresR_COIL_MOHM=2471. Resolve this mismatch and use EL7062 autotune results for the installed motor before enabling motion. - Confirm the EL5042 output is 9.0 V and compatible with the exact encoder order code before connecting the encoder.
- Confirm both position signals use the same direction, datum, and scale before closing the outer loop. A sign error in a closed position loop can cause immediate uncontrolled motion.
- The PLC accepts busy-low plus
attargetas move completion without first latching that busy became high. Validate or correct this handshake before unattended operation. - This is a static source configuration. PDO compatibility, loop stability, limit polarity, and safe operation require validation on the target IOC and hardware.
Relevant files
startup.cmd- EL5042 SDOs, EL7062 CSP hardware description, motor and drive parameters, axis loading, and PLC loadingcfg/axis.yaml- primary SSI encoder, CSP position mapping, outer controller, trajectory, limits, and monitoringcfg/enc_open_loop.yaml- EL7062 drive encoder and CSP-PC selectioncfg/code_2.plc- active FAT motion sequencecfg/code.plc- alternate older sequence, not loaded bystartup.cmd
Commissioning sequence
- Confirm that the IOC is loading
ECMC/EL7062_CSP_PC/startup.cmd. - Verify motor phase wiring, configured current, resistance, and inductance.
- Run EL7062 autotune and validate the drive's inner position loop first.
- Confirm 9.0 V at the EL5042 connector before attaching the encoder.
- With the outer loop disabled, compare SSI and EL7062 position direction and scale through a small manually controlled displacement.
- Align/reference the EL7062 counter to the SSI coordinate and verify that no position step occurs during enable.
- Enable the ECMC outer loop with conservative gains, reduced current, and a low following-error threshold appropriate for the test.
- Tune
KpandKi, adding derivative action only if measurements show it is needed. Verify stability at standstill, during motion, and after reversal. - Exercise both hardware limits and software limits at low velocity.
- Validate the PLC execute/busy handshake before running the complete FAT sequence.