From d754b18cc7da5870fda965fcc97e05bd247a3a81 Mon Sep 17 00:00:00 2001 From: menzel Date: Mon, 6 Jul 2026 11:24:27 +0200 Subject: [PATCH] feat(smargon): ground SCS limits + host guidance from MX-lab reference client resources_2/Smargon.py (the MX-lab SmarGonController) gives real per-axis SCS limits and the server hostname convention. Update smargon.yaml: - SHX/SHY [-2,2], SHZ [10,22] (home ~18, not centred on 0), CHI [0,65], PHI [-180,180] (was placeholder [-2.5,2.5] for the SH axes; SHZ was wrong). - host: note it must be the actual reachable server (ref used mxlab1-smargopolo). - Note PHI is continuous and the reference client wraps to [-180,180) before sending -- flagged as an open design question, not yet handled here. Still DRAFT / untested against hardware. Co-Authored-By: Claude Opus 4.8 (1M context) --- csaxs_bec/device_configs/smargon.yaml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/csaxs_bec/device_configs/smargon.yaml b/csaxs_bec/device_configs/smargon.yaml index b0d2342..b1382e8 100644 --- a/csaxs_bec/device_configs/smargon.yaml +++ b/csaxs_bec/device_configs/smargon.yaml @@ -9,7 +9,9 @@ smargon: description: SmarGon goniometer (SCS axes via smargopolo REST API) deviceClass: csaxs_bec.devices.smargon.smargon.SmarGon deviceConfig: - host: smargopolo # smargopolo server hostname + host: smargopolo # smargopolo server hostname -- SET TO THE ACTUAL SERVER + # (the MX-lab reference client used "mxlab1-smargopolo"; + # use the hostname reachable from the beamline network) port: 3000 # REST API port timeout: 5.0 # per-request transport timeout [s] has_omega: false # set true on builds with the OMEGA rotation drive @@ -27,10 +29,17 @@ smargon: # PUT is rejected, or -- if the fault only shows after partial motion -- the # device aborts the move on the controller's ERROR mode). Omit an axis here to # leave it unbounded in BEC and rely on the controller. + # + # Values below are taken from the MX-lab reference client (resources_2/Smargon.py) + # -- a good grounded starting point, but VERIFY against this build. Note SHZ is + # NOT centred on 0 (home is SHZ~18), and PHI is a continuous axis the reference + # client wraps to [-180, 180) before sending (see the phi-wrap note in the docs). limits: - SHX: [-2.5, 2.5] - SHY: [-2.5, 2.5] - SHZ: [-2.5, 2.5] + SHX: [-2, 2] + SHY: [-2, 2] + SHZ: [10, 22] + CHI: [0, 65] + PHI: [-180, 180] poll_interval: 0.1 # readback polling cadence while moving [s] move_timeout: 60.0 # per-move timeout [s] deviceTags: