EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: RE: using macros in Action, Execute Command
From: "Zhang, Tong via Tech-talk" <tech-talk at aps.anl.gov>
To: Paul Sichta <psichta at pppl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 20 Mar 2023 13:57:27 +0000

I also came across the similar issue but I was trying to access the widget property, e.g. $(name) through an argument of a command. And I believe this PR resolved it https://github.com/ControlSystemStudio/phoebus/pull/2532

 

If it does not support env, either report a new issue, or try to use a dummy property of a widget to host the env, and use it in a command, for multiple envs, you can also parse the string in your command into multiple variables.

 

Thanks,

Tong

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Paul Sichta via Tech-talk
Sent: Friday, March 17, 2023 17:19
To: tech-talk at aps.anl.gov
Subject: using macros in Action, Execute Command

 

[EXTERNAL] This email originated from outside of FRIB

Using phoebus, I used an action button and added an Execute Command.  My macro will not work when used in the Command line.  The macro will work in action type WritePV,  or as a PVname for an object on the display.

 

Example: I add to my environment before starting phoebus,  export myLS=ls

In the action command line I use       $(myLS)  

 

When I run the action I get an error

Cannot run program "$myLS" (in directory  blah...); error=2, No such file or directory

 

If I simply use    ls    in the command it works fine.

The help, about,  inspect environmental variables it shows:  myLS = ls

 

Is there a way to use macros from the user's environment on these Execute Commands?

In particular, I want to use a macro to be a directory path on my system

 

Regards,

-ps


Replies:
Re: [External] RE: using macros in Action, Execute Command Paul Sichta via Tech-talk
References:
using macros in Action, Execute Command Paul Sichta via Tech-talk

Navigate by Date:
Prev: Phoebus: using macros in Action, Execute Command Paul Sichta via Tech-talk
Next: Output records in StreamDevice Leblanc, Gregory 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  <20232024 
Navigate by Thread:
Prev: using macros in Action, Execute Command Paul Sichta via Tech-talk
Next: Re: [External] RE: using macros in Action, Execute Command Paul Sichta 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  <20232024 
ANJ, 20 Mar 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·