> On Apr 15, 2021, at 11:50 AM, Manoussakis, Adamandios via Tech-talk <tech-talk at aps.anl.gov> wrote:
>
> I did have one more question with regards to the execute command in the action button. That technically is just calling a cmd line argument that I place there correct ( python example.py )? Is there any way to trigger this based off a rule or is it only running the execute command when the button is clicked ?
Do you really need the script to run when someone clicks on a particular button on a particular screen, or do you need the script to run when a control system process variable changes value?
If you tie this function to a GUI action button, what happens if there are multiple instances of the GUI open (or zero instances)? What if someone wants to write a shell script or a python script to change the PV value without using your GUI? What happens when some new technology comes out and you want to replace your GUI with something else?
It is generally advisable to restrict the GUI to just providing user interface functionality. Control system logic should be implemented in an IOC (or IOC equivalent like a CA or PVAccess server written in python, java or other language). Functionality like data archiving should be implemented in a dedicated data archiving service.
If you try to build all of this functionality into the GUI, you will find it to be much more difficult to scale up from a demonstration to a stable production system, and generally difficult to maintain.
EPICS is intended to be a highly distributed system, with many clients interacting with many servers. EPICS provides many tools (IOCs, GUI clients, scripting language clients, archivers, alarm servers, trend tools, etc.). Use the best available tool in the EPICS toolkit to implement the functionality, rather than forcing it into the GUI.
--
Steven Hartman
hartmansm at ornl.gov
- References:
- Python Script call from Button press, module not found Manoussakis, Adamandios via Tech-talk
- Re: Python Script call from Button press, module not found Kasemir, Kay via Tech-talk
- RE: Python Script call from Button press, module not found Manoussakis, Adamandios via Tech-talk
- Re: Python Script call from Button press, module not found Kasemir, Kay via Tech-talk
- Re: Python Script call from Button press, module not found Manoussakis, Adamandios via Tech-talk
- Navigate by Date:
- Prev:
Re: Python Script call from Button press, module not found Michael Davidsaver via Tech-talk
- Next:
Re: Python Script call from Button press, module not found Johnson, Andrew N. via Tech-talk
- 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
- Navigate by Thread:
- Prev:
Re: Python Script call from Button press, module not found Manoussakis, Adamandios via Tech-talk
- Next:
Re: Python Script call from Button press, module not found Matt Newville via Tech-talk
- 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
|