Last active
April 29, 2019 21:04
-
-
Save prjemian/c43bdbec15dd80f715fb2196eef5ea5b to your computer and use it in GitHub Desktop.
shows how to extend EpicsMotor to change soft limits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ophyd import EpicsMotor, EpicsSignal, Component | |
| from bluesky import RunEngine | |
| from bluesky import plans as bp | |
| RE = RunEngine({}) | |
| class MyMotor(EpicsMotor): | |
| high_soft_limit = Component(EpicsSignal, '.HLM', kind='omitted') | |
| low_soft_limit = Component(EpicsSignal, '.LLM', kind='omitted') | |
| m1 = MyMotor("vm7:m1", name="m1") | |
| m1.stage_sigs["high_soft_limit"] = 1000 | |
| m1.stage_sigs["low_soft_limit"] = -1000 | |
| print(m1.low_soft_limit.value, m1.high_soft_limit.value) | |
| m1.stage() | |
| print(m1.low_soft_limit.value, m1.high_soft_limit.value) | |
| m1.unstage() | |
| print(m1.low_soft_limit.value, m1.high_soft_limit.value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment