1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Python Script call from Button press, module not found |
From: | "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Fri, 16 Apr 2021 17:51:52 +0000 |
Hi:
If the goal is that writing to a PV triggers something in python, wouldn't it be more straight forward to have a python-based CA server?
It serves the "DoIt" PV, and writing to that PV makes the python code do something.
PCASPY, https://pcaspy.readthedocs.io/en/latest/, allows you to implement just that, without need to first create some 'mailbox' IOC for serving the value, then having a script poll/monitor that
PV for changes.
With PCASPY you can also support put-callback, so clients writing to the PV can not only trigger whatever you want to happen, but they can also get notified when the action completes.
-Kay
|