pcdshub / pcdsdevices

Collection of Ophyd device subclasses for IOCs unique to LCLS PCDS.
https://pcdshub.github.io/pcdsdevices/
Other
5 stars 59 forks source link

Add Vitara device / lxt motor #516

Closed klauer closed 4 years ago

klauer commented 4 years ago

Expected Behavior

Current Behavior

Does not appear to exist, unless under a different name

silkenelson commented 4 years ago

The Vitara is lxt in old beamline python (lxt is the virtual motor based on the Vitara). I'm not sure we really used anything else of that device: it's an IMS controller that sets pulses to a non-motor device.

klauer commented 4 years ago

Thinking aloud:

To get the full picture, it looks like we need:

Desirable user-facing units appear to be in nanoseconds.

Based on that PV suffix, found this: https://confluence.slac.stanford.edu/display/PCDS/Laser+Locking+System+Controls+and+Operation 🎆

ZLLentz commented 4 years ago

https://github.com/pcdshub/pcdsdevices/blob/578321ede498bb28b9f30587f74637fdc6f2c9aa/pcdsdevices/pseudopos.py#L103 is a base class I made for time axis motors, if you find it helpful

klauer commented 4 years ago

Thanks, @ZLLentz - it looks like the calculations are mostly done by the IOC, so it's a simple multiplication/division by 1e9. I'll probably copy that class for the first pass.

Continuing my live issue blogging - apologies if this is distracting.

A bit more digging reveals this may be easier than anticipated.

There's an EPICS motor record sitting behind the MMS, as we would have hoped.

LAS:FS6:MMS:PH.RTYP            motor

That obtuse STATUS PV is actually just aggregating information from the motor record:

LAS:FS6:MMS:PH:_CALC_STATUS.INPA
LAS:FS6:MMS:PH:_CALC_STATUS.INPB
LAS:FS6:MMS:PH:_CALC_STATUS.INPC
LAS:FS6:MMS:PH:_CALC_STATUS.INPD LAS:FS6:MMS:PH.DMOV CPP NMS
LAS:FS6:MMS:PH:_CALC_STATUS.INPE
LAS:FS6:MMS:PH:_CALC_STATUS.INPF
LAS:FS6:MMS:PH:_CALC_STATUS.INPG LAS:FS6:MMS:PH.MOVN CPP NMS
LAS:FS6:MMS:PH:_CALC_STATUS.INPH LAS:FS6:MMS:PH.HLS CPP NMS
LAS:FS6:MMS:PH:_CALC_STATUS.INPI
LAS:FS6:MMS:PH:_CALC_STATUS.INPJ
LAS:FS6:MMS:PH:_CALC_STATUS.INPK
LAS:FS6:MMS:PH:_CALC_STATUS.INPL LAS:FS6:MMS:PH.LLS CPP NMS
LAS:FS6:MMS:PH:_CALC_STATUS.CALC D<<3|G<<2|L<<1|H

It effectively then checks a single motor's motion status and whether or not it's hit a limit, which we already do in ophyd. It does not appear we will need any custom positioner tooling, with the small exception of value scaling.