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

Subject: RE: stream device - multiple values from a string
From: <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Fri, 3 Jul 2015 09:34:55 +0000
If you are using an older version of stream device you might have to explicitly specify the .VAL field.


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of S. Banerian
Sent: 02 July 2015 22:44
To: EPICS Tech Talk
Subject: stream device - multiple values from a string


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





References:
stream device - multiple values from a string S. Banerian

Navigate by Date:
Prev: Re: setting NTP time sync interval on vxWorks Ralph Lange
Next: Re: Re: setting NTP time sync interval on vxWorks Zhang Yuliang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: stream device - multiple values from a string Mark Rivers
Next: setting NTP time sync interval on vxWorks Zhang Yuliang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·