mxcubecore.HardwareObjects.LNLS.EPICS.EPICSNState#
Classes
|
This class manages devices that exist in a discrete number of states and provides an interface between those states (configured in the yaml files) and the EPICS PVs. |
|
This class is a workaround for devices that exist in a discrete number of states and do NOT have an on/off switch, but NEED to have a virtual on/off state in the GUI. |
- class mxcubecore.HardwareObjects.LNLS.EPICS.EPICSNState.EPICSNState(name)[source]#
Bases:
EPICSActuator,AbstractNStateThis class manages devices that exist in a discrete number of states and provides an interface between those states (configured in the yaml files) and the EPICS PVs. It ensures that hardware states are treated as Enums.
YAML Example#
%YAML 1.2 — class: LNLS.EPICS.EPICSNState.EPICSNState epics:
- “MNC:B:PB03:PV_ACTIVATE_BACKLIGHT”:
- channels:
- rbv:
suffix: ‘:RBV’ polling_period: 200
- val:
suffix: ‘:SET’
- configuration:
default_limits: (0, 1) values: {‘LEVEL0’: 1, ‘LEVEL1’: 0}
- class mxcubecore.HardwareObjects.LNLS.EPICS.EPICSNState.EPICSNStateInterval(name)[source]#
Bases:
EPICSNStateThis class is a workaround for devices that exist in a discrete number of states and do NOT have an on/off switch, but NEED to have a virtual on/off state in the GUI. Example: our frontlight device only allows for intensity setting (between 0 and 20000), but does not have an on/off switch.
This class implements the following logic: if the state of the device is higher than LEVEL1, it will be shown as on in the GUI. Otherwise, it will be shown as off in the GUI.
Clicking on the icon when it is off will bring it to the LEVEL0 intensity value. Clicking on the icon when it is on will bring it to the LEVEL1 intensity value.
YAML Example#
%YAML 1.2 — class: LNLS.EPICS.EPICSNState.EPICSNStateInterval epics: “MNC:B:LUCIOLE01:LIGHT_CH2”:
- channels:
- rbv:
suffix: ‘’ polling_period: 200
- val:
suffix: ‘’
- configuration:
default_limits: (0, 1) values: {‘LEVEL0’: 15000, ‘LEVEL1’: 0}