Bring up an IOC with a single axis using the YAML-based configuration.
This page is intentionally short. For a more detailed walkthrough of the full startup structure, see introduction. For reusable public examples, see examples.
ecmc, ecmccfg and component-library modules; see Build at PSI for the PSI workflow.jinja (default): Python 3 with venv support. The loader creates a venv and installs PyYAML, Jinja2 CLI, yamllint and Cerberus on first use; package access must be available then.ecb: C++ backend (ECMC_CFG_TOOL=ecb, see ecb)epicsEnvSet("IOC", "MYIOC")
require ecmccfg <VERSION>
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EK1100"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL1018"
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "HW_DESC=EL7031"
${SCRIPTEXEC} ${ecmccfg_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepper, CH_ID=1, MACROS='I_MAX_MA=1000, I_STDBY_MA=100, U_NOM_MV=24000, R_COIL_MOHM=1230'"
DRV_SLAVE, ENC_SLAVE and ENC_CHANNEL, pass:${SCRIPTEXEC} ${ecmccfg_DIR}loadYamlAxis.cmd, "FILE=./cfg/ax1.yaml, DEV=${IOC}, DRV_SLAVE=2, ENC_SLAVE=2, ENC_CHANNEL=01"
Match the macro names to the YAML: some examples use DRV_SID/ENC_SID
instead. Using the drive counter as feedback gives open-loop load control;
an external encoder needs its own configured terminal and link. The
complete YAML reference
includes alternatives and is not a minimal file to run unchanged.
iocsh startup.cmd
Check for iocRun: All initialization complete, the master OK PV and
MCU-AppMode=1. If the shell prompt appears without initialization, check
whether the launcher invoked iocInit; finalize.cmd is registered at init.
The dedicated slit fixture keeps the IOC, external plant and integration cases
in tests/integration/slit/. From the repository root, start its IOC in one
terminal:
cd tests/integration/slit/ioc
iocsh startup.cmd
Then run the plant and tests from the repository root in another terminal:
python3 tests/integration/slit/run.py --prefix SIMSLIT: --run
Install the runner’s PyEPICS dependency and use compatible installed modules;
see tests/integration/slit/README.md for its full setup. SIM=1 provides
memory I/O, while the Python plant supplies drive and encoder dynamics.
MASTER_ID=-1 alone does not create that simulated I/O.