ecmccfg

A configuration framework for ECMC Motion Control Module for EPICS.

Start here

  1. Follow the Quickstart to bring up one axis using YAML.
  2. Read the Introduction for the IOC startup structure.
  3. Use the motion commissioning path for axis configuration, scaling, direction, homing, motor-record behavior, and autosave.
  4. Check the system through the overview panel and use Troubleshooting when behavior differs from expectations.

For terminology such as axis, axis PLC, component, plugin, and master-less, see Terminology.

Choose the material you need

NeedStart with
A working configuration to adaptExamples 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 commissioningEtherCAT and commissioning
Axis configuration and motion behaviorMotion
PLC logic and EPICS variable exposurePLC configuration and PLC best practice
PluginsPlugins
Buffered data, utilities, or command lookupUtilities and reference
Runtime problems or device-specific notesKnowledge base

For new configurations, the normal path is:

  1. require ecmccfg
  2. add slaves with addSlave.cmd
  3. apply hardware-specific setup with applyComponent.cmd
  4. load axes with loadYamlAxis.cmd
  5. load PLCs with loadYamlPlc.cmd or loadPLCFile.cmd
  6. add optional features such as data storage or plugins
  7. initialize the IOC; the registered finalize.cmd hook applies configuration and starts runtime in the configured order

Illustrative 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.

Preferred entry points

  • loadYamlAxis.cmd: preferred axis configuration path
  • loadYamlPlc.cmd: preferred structured PLC path
  • loadPLCFile.cmd: classic PLC-file path
  • applyComponent.cmd: preferred drive and encoder component setup
  • configureAxis.cmd, configureVirtualAxis.cmd, and applyAxisSynchronization.cmd: still supported, but mainly legacy compared to the YAML-first flow

Maintenance

Use Upgrades for migration checklists and breaking changes.