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  <20142015  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: MEDM: Passing PV Values to Shell Commands
From: Andrew Johnson <[email protected]>
To: "Poff, Mark A" <[email protected]>, "[email protected]" <[email protected]>
Date: Fri, 18 Apr 2014 14:45:21 -0500
Hi Mark,

On 04/18/2014 01:44 PM, Poff, Mark A wrote:
> For what it’s worth, I’m on a Linux system.  In the MEDM display’s Shell
> Command ‘Command’ field I put the executable name - foo.exe - and in the
> ‘Arguments’ field I put the line you recommend, echo ‘caget -t myPV’,
> where myPV is the target PV name.

Ok, maybe you didn't fully understand my example — sorry, I was using
'echo' as my example of the command (your foo.exe).

You do need to know the difference between a regular single quote
character ' and the back-tick character ` which is the quote to the left
of the 1 digit on most US PC keyboards. The back-tick quote tells the
shell that is executing your command-line "run the contents of this
string as a command and substitute its output for this string in the
actual command when you run that."

So for your case, you would need to put the following string into the
'Arguments' field:
    `caget -t myPV`
Where the first and last characters of that are a back-tick quote, and
myPV is whatever PV name you want the value of. When you click the
button and MEDM runs the command, the shell will first execute the
caget, then append the output from that command onto the foo.exe
command-line.

If you have a local Unix/Linux expert they may be able to help you with
this, which is really just a one-line shell command.

HTH,

- Andrew
-- 
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

Replies:
RE: MEDM: Passing PV Values to Shell Commands Poff, Mark A
References:
MEDM: Passing PV Values to Shell Commands Poff, Mark A
Re: MEDM: Passing PV Values to Shell Commands Andrew Johnson
RE: MEDM: Passing PV Values to Shell Commands Poff, Mark A

Navigate by Date:
Prev: RE: MEDM: Passing PV Values to Shell Commands Poff, Mark A
Next: RE: MEDM: Passing PV Values to Shell Commands Poff, Mark A
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: MEDM: Passing PV Values to Shell Commands Poff, Mark A
Next: RE: MEDM: Passing PV Values to Shell Commands Poff, Mark A
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·