Presentation is loading. Please wait.

Presentation is loading. Please wait.

EDM Screen Display Using PYTHON Python and the CLS and me.

Similar presentations


Presentation on theme: "EDM Screen Display Using PYTHON Python and the CLS and me."— Presentation transcript:

1 EDM Screen Display Using PYTHON Python and the CLS and me

2 and me Python and And Now for Something Completely Different Python and the CLS and me

3 WHY? I was looking for an interpreted language that would work with the GUI currently used at the HXMA beamline (a C++/Qt 3.3 application) I didn’t want to invent my own language

4 So, What Happened? I tried learning Python (July, 2010) But, I needed a project as a learning tool I wanted to be able to do a few specific things:

5 So, What Happened? #2 1.Be able to program Python 2.Be able to embed Python in an existing application 3.Interface Python to EPICS 4.Interface Python to some existing CLS libraries (epicsConnect, epicsQt, acquisition)

6 My Python Project - pyEdm EDM is based on “Motif”, and (to my eye) doesn’t make the best use of object-oriented programming [open to debate] The.edl files are highly structured EDM widgets share a lot of methods and data fields

7 pyEdm #2 Success for this project was learning Python programming, NOT replacing EDM – and pyEdm does not replace EDM But, I learned how to use Python with EPICS (pyCa) AND I can display EDM files under MS- Windows

8 pyEdm #3 EDM 1-10f has ~44,000 lines of code pyEdm has ~5,000 lines of code – more common code, big gains from using Qt I’d be surprised if adding the missing functionality (editing screens, saving screens, missing unusual features) would add another 5000 lines.

9 What Did I Get? EDMPython – EDM as of June 2011Extra Box Around “Invisible” ButtonsMissing Words when Widget Not Long EnoughMissing GraphicsMissing Engineering UnitsIncorrect Display Precision

10 What’s There? EPICS\, LOC\, and CALC\ PV’s EDM Colors: –Color Rules –Alarm Sensitive –Invisible Widget Visibility Rules

11 What’s There? #2 Widgets: shapes, lines, text, images, sliders, groups, PIP, related displays, shell buttons, message buttons, symbols, XY graph. Path searching for.edl files.

12 What’s Missing? WYSIWYG editing Blinking Colors EDM Server Mode EDM Screen Display from String PV Complete set of operating and display modes for many widgets (e.g. all combinations of text display, all XY graph modes)

13 What’s Ugly? “Invisible” buttons. I use them lots, and the uninvisible box around them looks bad. Matching the Fonts. Word placement and alignment are noticeably different on many screens. Suspected race condition causes occasional missing widgets on display

14 What’s Ugly? #2 Python and QT “Ownership” rules aren’t matched up. Code to support dynamic loading of PV and object modules screams out “REWRITE ME!” Code to support CALC\ looks a lot like “C”

15 Python, Epics, EDM: Observations 33 edm object types Largest object implementation: 180 lines Performance OK, but hasn’t been stress tested

16 What’s Being Done Now? Updates to pyEdm only as required for specific EDM screens embedded in a Python/Qt4/EPICS application Near term: – Make available for “on-call” staff –Make available for tech staff with MS- Windows

17 Related Python “Stuff” Python access to CLS shared libraries done pyEdm can coexist with those libraries

18 pyEdm embedded Main Window: Qt UI file displayed using PyQt4 Embedded pyEdm display

19 My hovercraft is full of eels There are stumbling blocks. Some python support isn’t straightforward (CERN ROOT, Root QT, QT, and Python are causing me grief) A clean python re-implementation of a class is more work than a quick interface and extra python code to deal with the C-style approach to the class

20 How Not To Hide Edm 1-10f Python 2.5.1 pyEpics 3 (cars.uchicago.edu) QT 4.5 Epics 3.14.6 and 3.14.9


Download ppt "EDM Screen Display Using PYTHON Python and the CLS and me."

Similar presentations


Ads by Google