From e938fa7a111433d125b3dd58692a66f73a96c890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstr=C3=B6m?= Date: Mon, 26 Oct 2026 16:59:40 +0100 Subject: [PATCH] Minor fixes --- MTEST04-MTN-HEXAPOD_startup.script | 2 +- README.md | 29 ++++++++++++++++++++++------- cfg/axis_coordinate.yaml | 3 ++- cfg/axis_leg.yaml | 2 +- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/MTEST04-MTN-HEXAPOD_startup.script b/MTEST04-MTN-HEXAPOD_startup.script index 4c2edac..02834c3 100644 --- a/MTEST04-MTN-HEXAPOD_startup.script +++ b/MTEST04-MTN-HEXAPOD_startup.script @@ -14,7 +14,7 @@ # caqtdm -macro "IOC=HEXAPOD,CPP_ID=0" ecmcCppLogic.ui epicsEnvSet("IOC", "${IOC=HEXAPD}") -require ecmccfg v11.2.0_RC1 "ECMC_VER=v11.2.0_RC1,MASTER_ID=-1,EC_RATE=1000" +require ecmccfg sandst_a "ECMC_VER=sandst_a,MASTER_ID=-1,EC_RATE=1000" # Load all twelve virtual axes, then the C++ transform and its status PVs. ${SCRIPTEXEC} ./cfg/load.cmd diff --git a/README.md b/README.md index 3ef8b6f..ada1a51 100644 --- a/README.md +++ b/README.md @@ -370,27 +370,42 @@ The quintic profile in the offline viewer is not an IOC trajectory generator. ## EPICS viewer -Build the viewer's local C API library separately from the IOC's `libmain.so`: +Start the IOC first, then run the viewer on a machine with a graphical display +and network access to the IOC. From the project root, build the viewer's local +C API library separately from the IOC's `libmain.so` and install the dependencies: ```sh make viewer-lib +python3 -m venv .venv # First-time setup; reuse an existing .venv if present. +.venv/bin/pip install -r python/requirements-ioc.txt ``` This creates `build/libhexapod.so` (`.dylib` on macOS) from `src/c_api.cpp` without EPICS dependencies. Rebuild it after changing the kinematics code. -For a running IOC, install the IOC viewer requirements and use the IOC record -prefix, including the trailing colon: +For the IOC configured in `MTEST04-MTN-HEXAPOD_parameters.yaml`, start the live +viewer with the IOC record prefix, including the trailing colon: ```sh -.venv/bin/pip install -r python/requirements-ioc.txt -.venv/bin/python python/viewer.py --prefix HEXAPD: +.venv/bin/python python/viewer.py --prefix MTEST04-MTN-HEXAPOD: ``` Use the prefix configured by `loadCppLogic.cmd` (`DB_PREFIX`, default `${IOC}:`). +If the IOC was started with the startup script's fallback name `HEXAPD`, use +`--prefix HEXAPD:` instead. The prefix is the PV name prefix, not the IOC hostname. Pyepics needs an EPICS Channel Access library (`libca`) and network access to the -IOC. If CA discovery does not reach the IOC subnet, configure -`EPICS_CA_ADDR_LIST` / `EPICS_CA_AUTO_ADDR_LIST` for your network before starting. +IOC. If broadcast discovery does not reach the IOC, explicitly address the host +configured in the parameters file (replace it for a different IOC): + +```sh +EPICS_CA_AUTO_ADDR_LIST=NO EPICS_CA_ADDR_LIST=c6025a-08 \ + .venv/bin/python python/viewer.py --prefix MTEST04-MTN-HEXAPOD: +``` + +To check connectivity independently, run +`caget MTEST04-MTN-HEXAPOD:hex-pose-actual` if EPICS command-line tools are +available. It should return six coordinate values. If the viewer reports missing +connections, check the prefix, IOC status and Channel Access network access. IOC mode is read-only, with the offline motion controls disabled. It subscribes to these six PVs through pyepics monitors: diff --git a/cfg/axis_coordinate.yaml b/cfg/axis_coordinate.yaml index 1ee24f6..3b507d2 100644 --- a/cfg/axis_coordinate.yaml +++ b/cfg/axis_coordinate.yaml @@ -4,6 +4,7 @@ axis: id: ${AX_ID} group: virt type: virtual + tweakDist: 5 features: allowSrcChangeWhenEnabled: true autoEnable: @@ -30,7 +31,7 @@ encoder: trajectory: source: 0 axis: - velocity: 1 + velocity: 10 acceleration: 10 deceleration: 10 diff --git a/cfg/axis_leg.yaml b/cfg/axis_leg.yaml index 353dffa..94e1628 100644 --- a/cfg/axis_leg.yaml +++ b/cfg/axis_leg.yaml @@ -9,6 +9,7 @@ axis: id: ${AX_ID} group: phys type: virtual + parameters: "restoreMotorSoftLims=1;" features: allowSrcChangeWhenEnabled: true autoEnable: @@ -33,7 +34,6 @@ encoder: # External feedback is supplied by the C++ ideal plant; no EtherCAT position link. trajectory: - source: 1 axis: velocity: 1 acceleration: 10