ISISComputingGroup / IBEX

Top level repository for IBEX stories
5 stars 2 forks source link

LET: more accurate 'moving' indicator for oscillating collimator #7625

Closed Tom-Willemsen closed 1 year ago

Tom-Willemsen commented 1 year ago

Currently on LET, the collimator moving pv just uses whether the collimator is trying to move as it's "moving" status. Having had some recent mechanical issues on LET, it would be useful to be able to directly read whether the collimator is actually moving physically.

This would reduce troubleshooting time on the instrument in cases of future collimator issues, and mean that the scientists have a more reliable block to put run-control on, reducing lost time.

Acceptance criteria

Implementation notes

The LET collimator is fitted with a laser which is plugged into the galil's digital input (and so already being read by IBEX - as IN:LET:MOT:DMC01:Galil0Bi5_STATUS.

This ticket is to provide a new PV for "collimator moving" on LET, where the logic is that if the laser PV has changed recently then it is moving, else it is stopped (it may stop with the laser pv either ON or OFF - the important thing is whether or not it has changed recently).

An epics compress record containing a circular buffer of recent values can be used for this, monitor last n seconds of values from the laser PV, take a min/max of circular buffer (also easy to do in EPICS), if min==max then collimator is stopped, else collimator is moving.

Alternatively we may be able to use the existing stability check DB and map unstable -> moving and stable -> stopped.

rerpha commented 1 year ago

WISH does not have a laser, though does have a home signal instead, though not sure if it passes it every full swept angle. MERLIN is suppoesd to be mechanically identical so probably does, but im not sure if its the same digital input num as LET - can check the galil code

rerpha commented 1 year ago

annoyingly, its a different digital in number..... https://github.com/ISISComputingGroup/EPICS-galil/blob/master/GalilSup/Db/galil_Oscillating_Collimator_Merlin.dmc#L35

vs LETs https://github.com/ISISComputingGroup/EPICS-galil/blob/master/GalilSup/Db/galil_Oscillating_Collimator.dmc#L35

rerpha commented 1 year ago

once you're happy pls could you make a task to test on MERLIN/LET/both - difficult to test on our testbed galil as we haven't got anything fed into the digital i/os

boeuf-codes commented 1 year ago

PRs:

Release notes:

boeuf-codes commented 1 year ago

To set up to (sort of) test:

  1. Checkout various branches etc.
  2. Copy the three files (not the readme) from support\motorExtensions\master\settings\oscillatingCollimator to your configurations\galil
  3. Make support\galil and then ioc\master\galil (e.g. run cd C:\Instrument\Apps\EPICS\support\galil\master && make clean uninstall && make && cd C:\Instrument\Apps\EPICS\ioc\master\GALIL && make in an EPICS terminal)
  4. Make support\motorExtensions (e.g. run cd C:\Instrument\Apps\EPICS\support\motorExtensions\master\oscillatingCollimatorApp\Db && make clean uninstall && make)
  5. Set up & start a Galil IOC in recsim

To test PV logic: You should be set up to write/read to $(P)MOT:DMC01:Galil0Bi5_STATUS:SIM which is the laser PV the moving indicator is looking at - you can use this to check the logic of $(P):MOT:OSCCOL:COLLIM_MOVING:

To test the visibility of the new group box:

Tom-Willemsen commented 1 year ago

Please could you add some docs to https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/MERLIN,-LET-and-WISH-Oscillating-radial-collimators about this. For example:

boeuf-codes commented 1 year ago

@Tom-Willemsen Added documentation: https://github.com/ISISComputingGroup/ibex_developers_manual/wiki/MERLIN,-LET-and-WISH-Oscillating-radial-collimators#moving-indicators