|
|
Experimental Physics and
| ||||||||||||||||
|
|
Hi Michael, For completeness, something like this would be a "more minimal" example: import time import numpy import epics needs_calc = False def onButtonPush(pvname, value, **kws): needs_calc = (value = 1) button_pv = epics.PV('Button:bo', callback=onButtonPush) image_pv = epics.PV('AreaDetector:image1:ArrayData') while True: time.sleep(0.025) if needs_calc: needs_calc = False button_pv.put(0) print("Do real calculation here ", numpy.sum(image_pv.get()) --Matt
| ||||||||||||||||
| ANJ, 19 Mar 2026 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
· Distributions · Download · Documents · Links · Licensing · |