A configuration framework for ECMC Motion Control Module for EPICS.
For terminology such as axis, axis PLC, component, plugin, and
master-less, see Terminology.
| Need | Start with |
|---|---|
| A working configuration to adapt | Examples and Best practice |
IOC startup or masterless logic (MASTER_ID=-1) | Startup and IOC configuration |
Simulated I/O and external device models (SIM=1) | Simulation backend |
| EtherCAT setup and commissioning | EtherCAT and commissioning |
| Axis configuration and motion behavior | Motion |
| PLC logic and EPICS variable exposure | PLC configuration and PLC best practice |
| Plugins | Plugins |
| Buffered data, utilities, or command lookup | Utilities and reference |
| Runtime problems or device-specific notes | Knowledge base |
For new configurations, the normal path is:
require ecmccfgaddSlave.cmdapplyComponent.cmdloadYamlAxis.cmdloadYamlPlc.cmd or loadPLCFile.cmdfinalize.cmd hook applies configuration and starts runtime in the configured orderIllustrative startup structure (adapt the hardware and supply the YAML/PLC files):
require ecmccfg <VERSION>
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "SLAVE_ID=0,HW_DESC=EK1100"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd "SLAVE_ID=1,HW_DESC=EL7031"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper,MACROS='I_MAX_MA=1000,I_STDBY_MA=100,U_NOM_MV=24000,R_COIL_MOHM=1230'"
${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd "FILE=./cfg/ax1.yaml"
${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd "FILE=./cfg/main.plc,SAMPLE_RATE_MS=100"
The axis YAML must link to the entries of the configured terminal and use the
actual motor/encoder scaling. Component values above are examples. IOC
initialization may be performed by your launcher or explicitly by your startup
script. The atInit hook runs when iocInit is invoked; registering it alone
does not initialize EPICS. See startup ordering.
For the detailed step-by-step breakdown of the startup structure, see introduction.
loadYamlAxis.cmd: preferred axis configuration pathloadYamlPlc.cmd: preferred structured PLC pathloadPLCFile.cmd: classic PLC-file pathapplyComponent.cmd: preferred drive and encoder component setupconfigureAxis.cmd, configureVirtualAxis.cmd, and applyAxisSynchronization.cmd:
still supported, but mainly legacy compared to the YAML-first flowUse Upgrades for migration checklists and breaking changes.