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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Referencing PV values in commands from Action Buttons in CS-Studio. |
From: | "Li, Ji via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Mon, 17 May 2021 19:25:12 +0000 |
Hi,
I'm wondering if it's possible to execute a command with a PV's value as a parameter. For example, to open the IP address defined by a PV (device:ipaddr, stringin) in a browser.
I tried command:
firefox $(device:ipaddr)
The browser was directed to http://www.$(device:ipaddr).com/
I tried command:
firefox `caget device:ipaddr | awk '{print $2}'`
It works in shell, but in CS-Studio it jumps to http://www.`caget.com/
What works for me now is to run the command in python script, but it's kind of cumbersome. Are there better ways to implement? Thanks.
Best,
-Ji Li
|