Writing the DIPOL GUI

Let us write a GUI for monitoring one of our detector subsystems, for example the Dipole Magnet, based on the information stored in the DCS_REQ Database.

Creating the DIPOL EPICS database

The relevant process variables (PVs, or EPICS channels) can be listed by selecting the DIPOL only from DCS_REQ database. With the information stored therein, one can create EPICS records like

DCS_REQ Database info can be translated into such EPICS record EPICS record for one of the Coil Temperature channels based on the information from the DCS_REQ Database
record(ai, "Variable name"){
   field(DESC, "Description of the variable")
   field(PREC, "Measurement precision")
   field(EGU, "Measurement units")
   field(VAL, "Value of variable")
   field(SCAN, "Update rate")
   field(HIHI, "Alarm maximum")
   field(LOLO, "Alarm minimum")
   field(HIGH, "Warn Maximum")
   field(LOW, "Warn minimum")
   field(HOPR, "Maximum range")
   field(LOPR, "Minimum range")
}
record(ai, "PANDA:DIPOL:COIL:C1:T_R"){
   field(DESC, "Dipole coil temperature")
   field(PREC, "3")
   field(EGU, "Degrees Celsius")
   field(VAL, "35")
   field(SCAN, "1 second")
   field(HIHI, "50")
   field(LOLO, "10")
   field(HIGH, "40")
   field(LOW, "15")
   field(HOPR, "60")
   field(LOPR, "0")
}
where C1 denotes that this is the first channel, replaced with C2, C3, and C4 for the others, respectively.

The PV names are set based on the PANDA CS naming convention. ALERT!

Thus, the PVs in the DIPOL subsystem are converted into this EPICS database. This file is automatically produced by the DCS_REQ interface (DIPOL.db), which also provides a simple script (DIPOL-IOCtest.sh) for testing your soft IOC or GUI.

Sketch of the Dipole

We start with a sketch of the dipole, provided by GuangliangYang:

Dipole-sketch.png

This is the template for the Dipole Magnet's representation in the GUI. However, it is preferable that the drawing is redone with independent elements equipped with dynamic properties (change of colour for alarms etc.).

Alarms and warnings colour scheme

In a control room equipped with multiple screens, cluttered with GUIs and strip charts, is is useful to make warnings and alarms stand out. One way to improve the visibility of alarms on the GUIs is to make certain elements change colour depending on the severity of the alarm (this is already implemented in some of the CSS widgets). We use here a custom function to implement a temperature-related color scheme, documented in a separate wiki - ColourScriptGUI.

The DIPOL GUI

Below is a screenshot of the GUI created to monitor the dipole. The color scheme function mentioned above is used to change foreground colours of the cooling water pipes and the coils in case of warnings or alarms.

DIPOL-GUI.png

Guidelines and tips

  • The border around GUI elements (text boxes, inputs, buttons, widgets) should be no more that 3-5 px (pixels)
  • The border around text in text boxes, inputs, buttons should be 2-3 px, not more
  • When aligning elements on a GUI use the actual position and size dialogs to make sure the alignment will be preserved when zooming in ALERT!
  • Try a balanced distributions of information on the GUI canvas, avoid crowded areas, avoid useless blank areas
  • Use white for canvas background; use black for text; input fields should be sunken (2 px), buttons raised (2px)
  • Make it look nice, it will be looked at every hour, for many years

Download and try

A tarball containing the files to set up this GUI is attached - DIPOL-GUI.tgz. A tarball including in addition the EPICS .db and the test script is also attached - GUI-with-db.tgz

-- PaulMullen and DanProtopopescu - 22 Jul 2010

imported from nuclear.gla.ac.uk/twiki/bin/view.pl/Main/DipolGUI -- PeterZumbruch - 23 Aug 2012
I Attachment Action Size Date Who Comment
DIPOL-GUI.css-sdscss-sds DIPOL-GUI.css-sds manage 268 K 2012-08-23 - 13:14 PeterZumbruch DIPOL GUI source code
DIPOL-GUI.pngpng DIPOL-GUI.png manage 55 K 2012-08-23 - 13:15 PeterZumbruch DIPOL GUI Screenshot
DIPOL.dbdb DIPOL.db manage 3 K 2012-08-23 - 13:15 PeterZumbruch DIPOL subsytem EPICS records
Dipole-sketch.bmpbmp Dipole-sketch.bmp manage 4 MB 2012-08-23 - 13:16 PeterZumbruch Sketch of the Dipole sensors locations
Dipole-sketch.pngpng Dipole-sketch.png manage 23 K 2012-08-23 - 13:16 PeterZumbruch Sketch of the Dipole sensors locations (PNG)
GUI-with-db.tgztgz GUI-with-db.tgz manage 10 K 2012-08-23 - 13:16 PeterZumbruch Tarball for installing DIPOL GUI, EPICS db and test script
GUI.tgztgz GUI.tgz manage 9 K 2012-08-23 - 13:17 PeterZumbruch Tarball for installing the DIPOL GUI
Recordref.pdfpdf Recordref.pdf manage 2 MB 2012-08-23 - 13:18 PeterZumbruch EPICS Record Reference Manual - EPICS Release 3.13
Topic revision: r1 - 2012-08-23, PeterZumbruch
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Panda Wiki Send feedback | Imprint | Privacy Policy (in German)