Subject: |
stream device - multiple values from a string |
From: |
"S. Banerian" <[email protected]> |
To: |
EPICS Tech Talk <[email protected]> |
Date: |
Thu, 02 Jul 2015 14:44:02 -0700 |
I'm setting up an IOC to read/write to an RF amp that communicates over
the net apropos of stream device.
For single value send/receives, I've not encountered any thing serious.
However, there are a few parameters that we need to read back that come
from a single query.
background:
you sent it a string query, it sends back a reply.
what is sent over telnet:
/DEV659/DEMODS/0/SAMPLE: ?
what is received in reply:
/DEV659/DEMODS/0/SAMPLE: TS=2938752.083168305, X=0.0000022024,
Y=-0.0000035017, F=25900801.32071, Phi=2.45412
(all on one line, no CR/LF)
With reference to
http://epics.web.psi.ch/software/streamdevice/doc/tipsandtricks.html#readmany
(part C):
read_AB {out "GET A,B"; in "A=%f, B=%(\$1)f";}
my protocol file has:
readts{
out "/DEV659/DEMODS/0/SAMPLE: ?";
in "/DEV659/DEMODS/0/SAMPLE: TS=%f, X=%(\$1)f, Y=%(\$2)f,
F=%(\$3)f, Phi=%(\$4)f";
}
and the db file, with substitution in st.cmd DEVICE=DEMOD
record(ai, "$(DEVICE):ts") {
field(SCAN, "1 second")
field(DTYP, "stream")
field(INP, "@zi.proto
readts($(DEVICE):x,$(DEVICE):y,$(DEVICE):f,$(DEVICE):phi) zi")
}
record(ai, "$(DEVICE):x") {
}
record(ai, "$(DEVICE):y") {
}
record(ai, "$(DEVICE):f") {
}
record(ai, "$(DEVICE):phi") {
}
IOC shell startup errors observed:
Field 'DEMOD:x' not found
in format string: "%(DEMOD:x)f, Y=%(DEMOD:y)f,
F=%(DEMOD:f)f, Phi=%(DEMOD:phi)f"
in command 'in'
in protocol 'readts'
while compiling protocol 'readts(DEMOD:x,DEMOD:y,DEMOD:f,DEMOD:phi)' for
'DEMOD:ts'
DEMOD:ts: Protocol parse error
I was considering trying to just read in the TS value and then ignore
the rest of the line, then try to add in each value and ignore the rest,
in sequence, to see if I could find the error.
I have tried changing the protocol file, hard coding in PV names instead
of using macros, with db modification appropriate to that, but the iocsh
errors were observed.
--
S. Banerian
UW Clinical Cyclotron
UW School of Medicine
206-598-0302
gpg key 6642E7EE
fingerprint = BD13 875D 2D03 5E1D 1E3B 8BF7 F4B8 63AD 6642 E7EE
- Replies:
- Re: stream device - multiple values from a string Mark Rivers
- RE: stream device - multiple values from a string peter.owens
- Navigate by Date:
- Prev:
Re: mbbiDirect record bits into ai record Benjamin Franksen
- Next:
Re: stream device - multiple values from a string Mark Rivers
- 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: mbbiDirect record bits into ai record Benjamin Franksen
- Next:
Re: stream device - multiple values from a string Mark Rivers
- 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
|