pcdshub / pcdsdevices

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

ENH: Add MSTA Bits #1259

Closed slactjohnson closed 2 months ago

slactjohnson commented 2 months ago

Description

Adds in an EPICS signal to bring the the motor MSTA bits. This signal is used to create a dictionary of interpreted values, as well as a "homed" property.

Motivation and Context

I would like to implement some automated homing on some finicky motor stacks. I need a way to check that the homing routine has completed.

How Has This Been Tested?

Tested live on one of the stages of interest (a SmarAct linear stage).

Where Has This Been Documented?

This PR.

Screenshots:

Live session (standard motor record): image

IMS Motor:

happy_ims sad_ims sad_ims_2

image

Newport Motor:

happy_newport sad_newport

Pre-merge checklist

slactjohnson commented 2 months ago

@silkenelson I've now set up separate enums and decoding for the IMS and Newport motors. It appears to work as expected (see the images in the PR description).

-Unfortunately, I wasn't able to find a Newport or IMS motor that was reporting an actual error code. Is there anything you can think of that would force an error code on one of these stages? EDIT: Scratch that, I found an IMS motor with an error.

Is there anything else you would like to see in terms of verifying functionality?

ZLLentz commented 2 months ago

Is there anything else you would like to see in terms of verifying functionality?

I think the screenshots in your description are sufficient for functionality

I'm somewhat curious about the other various motor types in the tree and if they build off of the standard MSTA or off of one more like IMS/Newport. I'm eternally frustrated by these "special" record types, this seems to bite us surprisingly frequently.

ZLLentz commented 2 months ago

I'm going to click "Update branch" so hopefully it's ready to merge when we look again tomorrow

ZLLentz commented 2 months ago

CI failed on some network issue- ran again before I sign off

slactjohnson commented 2 months ago

Going to wait on merging for a little bit for @silkenelson to comment on the implementation or any other tests that should be done.

slactjohnson commented 2 months ago

I'm going to go ahead and merge this because some of my current work is waiting on this update. We can revise later if needed.