Experimental Physics and Industrial Control System
Dear all, dear Dirk
now i also got the solution based on StreamDevice somehow running, and
this looks pretty good.
However, i am now fighting some other stupid problem related to record
linking:
In my .db -file, i have the following two records:
--------------------------------------------------------
record(stringout, "$(P):$(R):filename")
{
field(DESC, "data file name")
}
record(stringout, "$(P):$(R):startdaqfile")
{
field(DESC, "start DAQ into FILE")
field(OMSL, "CLOSED_LOOP")
field(DOL, "filename.VAL")
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...
- Replies:
- Re: how to issue a shell command from EPICS record ? Pearson, Matthew R.
- Re: how to issue a shell command from EPICS record ? Dirk Zimoch
- 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
- Navigate by Date:
- Prev:
How to Read Multiple Values using StreamDevice with array_in Yasemin Barutçu
- Next:
EPICS Training Dalesio, Leo
- 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: how to issue a shell command from EPICS record ? Eric Norum
- Next:
Re: how to issue a shell command from EPICS record ? Pearson, Matthew R.
- 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