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

Subject: Re: how to issue a shell command from EPICS record ?
From: "Pearson, Matthew R." <[email protected]>
To: Christian Pauly <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Tue, 8 Oct 2013 17:34:21 -0400
Hi,
> ecord(stringout, "$(P):$(R):startdaqfile")
> {
>     field(DESC, "start DAQ into FILE")
>     field(OMSL, "CLOSED_LOOP")
>     field(DOL,  "filename.VAL")

Should it be:
field(DOL, "$(P):$(R):filename.VAL")  ?

Cheers,
Matt

>     field(DTYP, "stream")
>     field(OUT,  "@callbash.proto callbash(STARTDAQFILE) dummy $(A)")
> }
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> My .prot protocolfile looks like this:
> ----------------------------------------------------------
> callbash {
>     exec 'system "./daqcontrol.sh \$1 %s"';
> }
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> And the shellscript daqcontorl.sh like this:
> ----------------------------------------------------------
> #!/bin/bash
> echo DAQ control
> echo called with command: $1
> echo filename:            $2
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> 
> The first record should hold a filename of the datafile to be written, 
> the second record launches the shell script which starts the DAQ with 
> certain command and filename.
> command "STARTDAQFILE" specifies the DAQ mode.
> the second parameter is the filename to be used when starting the DAQ.
> My idea was, that this filename is taken from the first db-record.
> My understanding from the manual is, that if i specify "OMSL 
> CLOSED_LOOP", then the output value is read from the given link, and not 
> from the actual value written to the record.
> 
> But if i now do a "caput XYTABLE:startdaqfile 1" (or alternatively 
> "caput XYTABLE:startdaqfile.PROC 1") then my shell script is called with 
> two parameters:
> "STARTDAQFILE" and the number i use in the caput command.
> The filename from the first record is ignored.
> 
> Any idea what i am doing wrong ?
> This is the last piece i am missing to get it running...
> 
> 
> 



References:
Re: how to issue a shell command from EPICS record ? Konrad, Martin
Re: how to issue a shell command from EPICS record ? Pavel Maslov
Re: how to issue a shell command from EPICS record ? Christian Pauly
Re: how to issue a shell command from EPICS record ? Christian Pauly

Navigate by Date:
Prev: PTP/MTP/libgphoto2 camera triggering + EPICS? Gomella, Andrew (NIH/NHLBI) [F]
Next: Re: EPICS Training Vikas Kumthekar
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: how to issue a shell command from EPICS record ? Christian Pauly
Next: Re: how to issue a shell command from EPICS record ? Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·