<<

Qt development in EPICS

Andrew Rhyder Senior Controls Engineer Australian Synchrotron EPICS GUIs in use at AS

• EDM • MEDM • Python • (AS) • Tcl/tk • KEK • Matlab • Labview QCa Framework • QCa. A cross-platform application and GUI framework based on for accessing EPICS data using Channel Access.

• The QCa framework provides a Qt based ++ framework for easy CA access to EPICS data. It provides access to EPICS data at several levels from programmatic reading and writing of data using Qt’s through to EPICS aware Qt user interface plugins such as push buttons, sliders, and text widgets. GUI development models

• Document model A single static application can open display files. Displays are added by designing new display files. • MEDM – opens .adl files • EDM – opens .edl files • CSS – opens .opi files • ASgui – opens .ui files  Part of QCa framework

• Application model An application with displays and functionality coded within the application. Displays are added by extending the application. • CSS • Australian Synchrotron control room GUI • QCa framework Code Free GUI development

• Rich, robust, intuitive, form editor • Allows interaction with MEDM / EDM and other applications • Integration with other Qt plugins • Any application that can load Qt UI files can display EPICS GUIs Code Rich GUI development

• Use existing EPICS display and control widgets for rapid and consistent development • Develop speciality EPICS widgets using Qt friendly EPICS data classes • Include as much or as little application specific code as required Console app development

• Full access to EPICS data • Hides most CA specific functionality unless required • Qt signals and slots used for data reading and writing QCa framework development components

• Form editor Qt’s Designer • IDE Qt’s Creator • Display application ASgui (QCa framework) • EPICS aware graphical widgets QCa framework • EPICS aware data classes QCa framework

Form editor – Qt’s ‘Designer’ IDE – Qt’s Creator Display Application - ASgui Class usage

EPICS Aware Qt Plugins: Qt Designer All EPICS aware widgets are wrapped as plugins User Interface Files QCaLabelPlugin QCaLineEditPlugin etc ASGui

EPICS Aware Qt Widgets: QCaLabel QCaImage Other plugin based QCaLineEdit QCaBitStatus QCaPushButton QCaProgressBar GUI Applications QCaRadioButton QCaPlot QCaComboBox QCaShape QCaSpinBox QCaPeriodic QCaSlider QCaPvProperties Widget based GUI Applications Data Independant EPICS Access: QCaString QCaInteger QCaFloating QCaByteArray Console Applications C++ CA Library Access: CaObject CA Library

Qt Framework QCa Framework class hierarchy Type of access Functionality Main classes to CA data C++ access to the CA library. Provides convenient C++ access to the CA CaObject library. Qt based Hides CA specific QCaObject access to CA. functionality. Adds Qt functionality such as signals and slots. Data type independent Hides EPICS data types, providing read QCaInteger QCaFloating access. and write conversions where required. QCaString

EPICS aware graphical Implements graphical Qt based widgets QCaLabel QCaImage widgets. that provide access to EPICS data. QCaLineEdit QCaBitStatus QCaPushButton QCaProgressBar QCaRadioButton QCaPlot ...... EPICS aware graphical Qt Adds Qt plugin interfaces to EPICS aware QCaLabelPlugin QCaImagePlugin plugins. widgets. QCaLineEditPlugin QCaBitStatusPlugin QCaPushButtonPlugin QCaProgressBarPlugin QCaRadioButtonPlugin QCaPlotPlugin ......

GUI support widgets Implements Qt based widgets that AsGuiForm Link support control system GUIs. These QCaPushButton QCaSubstitutedLabel widgets to not access the CA library. QCa Framework class hierarchy Type of access Functionality Main classes to CA data C++ access to the CA library. Provides convenient C++ access to the CA CaObject library. Qt based access to CA. Hides CA specific functionality. Adds Qt QCaObject functionality such as signals and slots. Data type Hides EPICS data QCaInteger QCaFloating independent types, providing read QCaString access. and write conversions where required. EPICS aware graphical Implements graphical Qt based widgets QCaLabel QCaImage widgets. that provide access to EPICS data. QCaLineEdit QCaBitStatus QCaPushButton QCaProgressBar QCaRadioButton QCaPlot ......

EPICS aware graphical Qt Adds Qt plugin interfaces to EPICS aware QCaLabelPlugin QCaImagePlugin plugins. widgets. QCaLineEditPlugin QCaBitStatusPlugin QCaPushButtonPlugin QCaProgressBarPlugin QCaRadioButtonPlugin QCaPlotPlugin ......

GUI support widgets Implements Qt based widgets that AsGuiForm Link support control system GUIs. These QCaPushButton QCaSubstitutedLabel widgets to not access the CA library. QCa Framework class hierarchy

Type of access Functionality Main classes to CA data C++ access to the CA library. Provides convenient C++ access to the CA CaObject library. Qt based access to CA. Hides CA specific functionality. Adds Qt QCaObject functionality such as signals and slots.

Data type independent Hides EPICS data types, providing read QCaInteger QCaFloating access. and write conversions where required. QCaString EPICS aware Implements graphical QCaLabel QCaImage graphical Qt based widgets that QCaLineEdit QCaBitStatus widgets. provide access to QCaPushButton QCaProgressBar EPICS data. QCaRadioButton QCaPlot QCaComboBox QCaShape QCaSpinBox QCaPeriodic QCaSlider QCaPvProperties EPICS aware graphical Qt Adds Qt plugin interfaces to EPICS aware QCaLabelPlugin QCaImagePlugin plugins. widgets. QCaLineEditPlugin QCaBitStatusPlugin ......

GUI support widgets Implements Qt based widgets that AsGuiForm Link support control system GUIs. These QCaPushButton QCaSubstitutedLabel widgets to not access the CA library. CA enabled conventional Qt widgets CA enabled specialist widgets Embedding GUI functionality within the UI Qt’s standard signals and slots, with the QCaLink widget allows rich interaction between display widgets without the need for calculations and logic in the EPICS DB, or for code in the GUI application.

Other examples: • A mode switch enabling text entry fields or push buttons • A combo box selecting a tab on a sub form

ASgui – available plugins

• QCa widgets • Standard Qt widgets • Any other widgets • EPICS aware widgets that are not part of the QCa framework Metrics Environment: • 3Ghz • Single core (VM) • 2 Gbyte

Results: • edm: 15000 updates per second • ASgui 7000 updates per second http://sourceforge.net/projects/epicsqt/ EPICS Qt http://sourceforge.net/projects/epicsqt/ Australian Synchrotron www.synchrotron.org.au