Three main motion modes are commonly used with ecmc and supported drives:
CSV: Cyclic Synchronous Velocity, velocity setpoint sent to the driveCSP: Cyclic Synchronous Position, position setpoint sent to the driveCSP-PC: Cyclic Synchronous Position with centralized position controlOther modes also exist, for example cyclic synchronous torque. These can still be used from PLC logic or EPICS logic, but they are not supported by the ecmc axis object.
CSV when ecmc should run the position loop and the feedback does not
need to be directly connected to the drive.CSP when the drive should run the position loop.CSP-PC when the drive runs one position loop and ecmc runs an
additional centralized position loop, typically with a second encoder.The control loops are executed at different locations depending on which mode:
| Current loop | Velocity loop | Position loop | Comment | |
|---|---|---|---|---|
| CSV | drive | drive | ecmc | |
| CSP | drive | drive | drive | ecmc generates trajectory |
| CSP-PC | drive | drive | drive and ecmc | dual position loop |
This is the most common mode for smaller drives such as stepper terminals. In CSV the position loop is centralized in ecmc. That means that any EtherCAT feedback can be used, not only a source connected directly to the drive. This flexibility is the main reason why CSV is so common in smaller motion systems.
Common CSV use case:
ecmccfg configurations normally default to CSV, with one important exception:
In CSV the centralized position controller is normally a simple P controller, so
often only Kp needs tuning. Depending on the hardware, drive tuning may still
also be needed.
In pure CSP, the position loop is executed in the drive. That means that the encoder used by the drive loop must be connected directly to the drive. The trajectory is still generated centrally in ecmc.
CSP is therefore more common for larger servo drives where the motor already has an encoder or where the drive supports multiple encoders. CSP normally performs better than CSV because the position loop is closer to the hardware. The tradeoff is reduced flexibility. EL7041 does not support CSP, while EL7062 does.
To configure a drive in CSP or CSP-PC, the slave is normally selected with the
_CSP suffix:
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=3,HW_DESC=EL7062_CSP"
In CSP, the ecmc position control parameters are not active. Depending on the hardware, drive tuning may still be needed.
CSP-PC is basically CSP with the ecmc position loop also enabled. That gives two position loops, one in the drive and one in ecmc. The normal idea is that the loops work with different encoders. A meaningful CSP-PC configuration therefore normally contains at least two encoders.
See “Hardware support below” to understand which drives support the different modes.
To run in CSP-PC the drive must still be configured in CSP mode:
axis:
id: ${AXIS_ID=1} # Axis id
mode: CSP
Additionally, the system must know which encoder is connected to the drive.
That is configured with useAsCSPDrvEnc. This encoder is used for the
position loop in the drive.
Typical choices:
encoder:
desc: CSP drive encoder
...
useAsCSPDrvEnc: 1 # use this encoder as CSP drive encoder
...
Finally, the encoder for the centralized loop must be defined. This is normally
done by adding another encoder with primary: 1:
encoder:
desc: Linear encoder
type: 1
...
primary: 1
...
In CSP-PC, the ecmc position control loop is active, so the ecmc position
controller parameters need tuning. Since a position setpoint is sent to the
drive, a PI controller is normally needed, so both Kp and Ki often need
tuning.
Current support for some common drives used with ecmc:
| CSV | CSP | CSP-PC | Comment | |
|---|---|---|---|---|
| Ex704x | yes | no | no | |
| Ex703x | yes | no | no | |
| EL7062 | yes | yes | yes | Firmware bug fix needed for CSV |
| Ex72xx | yes | yes | yes | |
| EL7411 | yes | yes | yes | Not used yet |
| MCS2 EC | no | yes | yes | |
| iPOS4808 | yes | no | no |