Presentation is loading. Please wait.

Presentation is loading. Please wait.

Updates to CaPython/CaChannel John Hammonds Beamline Controls and Data Acquisition Group APS Engineering Support Division EPICS Collaboration Meeting INFN.

Similar presentations


Presentation on theme: "Updates to CaPython/CaChannel John Hammonds Beamline Controls and Data Acquisition Group APS Engineering Support Division EPICS Collaboration Meeting INFN."— Presentation transcript:

1 Updates to CaPython/CaChannel John Hammonds Beamline Controls and Data Acquisition Group APS Engineering Support Division EPICS Collaboration Meeting INFN Legnaro, Italy Oct 15-17, 2008

2 2 Introduction Looking for a scripting language for use on the beamlines at APS. Many of the beamline scientists are not comfortable with Java due to the jump to object-oriented programming. CaChannel/CaPython written by Geoff Savage at Fermilab. –CaPython is a Python wrapper around channel access C libraries. –Some use at APS already. Latest version was written using SWIG 1.1, Python 2.2 and channel access 3.12. Could not get this to compile on standard APS machines with SWIG 1.3, Python 2.4 and channel access 3.14.

3 3 SWIG Simplified Wrapper and Interface Generator (SWIG) – Presents the allure of providing your header files and automatically wrapping your code. Unfortunately, Channel Access is more than just simple C code (pointers, callbacks, multi-platform support). Since Geoff did the initial version, SWIG has moved from version 1.1 to 1.3, which changed many of the things used in the interface file. Compile problems were mostly due to changes in this library. After installing SWIG 1.1, I was able to compile Geoff’s ca_wrap.c but was not able to use SWIG to regenerate it. This meant updates would not be possible. Have now modified the SWIG interface files so that compiling with SWIG 1.3 is possible. This now opens up future developments like adding 3.14 functions.

4 4 Current Status Have been able to compile and do basic testing on Solaris-sparc, Linux and Solaris-x86 using Python 2.4. I was able to write a script for testing that monitored a channel and changed the contents of a 20,000 element array based on that value. We are trying to work towards a standard set of Python tools (wxPython, numpy, matplotlib, …) for use on the beamlines. Moving to Python 2.5.

5 5 Performance CaPython Performance2.0 GHz Pentium 4 Processor From catimeMbpscatime jph:userCalc1 10000 CMy CaPythonGeoff's CaPython Connect test19.43.92.5 Float Test put4.12.63.2 get29.55.85.5 wait0.70.6 Double put16.48.8 get325.75.6 wait0.60.7 String put16.410.2 get29.66.4 wait0.7 Int put15.198.4 get30.85.35.6 wait0.70.50.7

6 6 Extensions/Uses ca_util – Tim Mooney – thin layer above CaChannel to provide one line caget, caput, camonitor, … epicsPV – Mark Rivers - Interface to EPICS channel access, enhancements to CaChannel. Used to build MCA display. Not used much now. Sector 11 – Brian Toby – Various programs for alignment of beamline components, automation of scans. Sector 33 & 34 – Pete Jemian – Populate round-robin database (see RRDTools) to produce web plots of EPICS data.

7 7 RRDTools (Round-Robin Database)

8 8 More Round-Robin Database

9 9 Goals Fold this work back in as a real update to CaChannel/CaPython. Coordinate with Geoff. Add in 3.14 support including multithreading. Create a standard way of doing things at APS. Create a standard set of widgets to simplify connection to channels. Applications – Our group will be comparing possibilities in Python and Java.

10 10 Demo

11 11 Acknowledgments Geoff Savage (FNAL) - for producing the original version of CaPython/CaChannel. U.S. Department of Energy – work is supported by the Office of Science, Office of Basic Energy Sciences, under Contract No. DE-AC02- 06CH11357.


Download ppt "Updates to CaPython/CaChannel John Hammonds Beamline Controls and Data Acquisition Group APS Engineering Support Division EPICS Collaboration Meeting INFN."

Similar presentations


Ads by Google