Typhon uses a few custom widgets to create a clean and concise user interface.
While most users should not be interacting with these directly, there may be a
need if a user opts to create their display by hand instead of automatically
generating one. If you would just like a widget for an
is a function available:
signal_widget(signal, read_only=False, tooltip=None)¶
Factory for creating a PyDMWidget from a signal
widget – PyDMLabel, PyDMLineEdit, or PyDMEnumComboBox based on whether we should be able to write back to the widget and if the signal has
- Return type
One of the major design principles of Typhon is that users should be able to see what they need and hide one they don’t. Thefore, many of the widget implementations are placed in “Panels” these consist of QPushButton header that hides and shows the contents. Each variation in Typhon is documented below.
Base panel display for EPICS signals
Widget to interact with an
Standard positioner motion requires a large amount of context for operators. For most motors, it may not be enough to simply have a text field where setpoints can be punched in. Instead, information like soft limits and hardware limit switches are crucial for a full understanding of the position and behavior of a motor. The widget will work with any object that implements
set, however to get other relevant information, we also duck-type to see if we can find other useful signals. Below is a table of attributes that the widget looks for to inform screen design:
The widget first searches for a
user_readback. If this is not found the first hint is used.
high_limit_switchare queried. If these are not found the widgets are hidden.
The widget first looks for
high_limitsignals. If these do not exist, we look for
limitsand sets the text to match the returned tuple from this method.
Set and Tweak
Both of these methods simply use
Device.setwhich is expected to take a
floatand return a
statusobject that indicates the motion completeness. Must be implemented.
Add a device to the widget
Called when a move is complete
The last requested move failed
Called when a move is begun
Current state of widget
This will lag behind the actual state of the positioner in order to prevent unnecessary rapid movements
Tweak negative by the amount listed in
Tweak positive by the amount listed in
Set the device to the value configured by
The last requested move was successful