EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Streams questions
From: Dirk Zimoch <[email protected]>
To: Eric Berryman <[email protected]>
Cc: TechTalk EPICS <[email protected]>
Date: Wed, 21 Nov 2007 10:13:04 +0100
Hi Eric,

at the moment, I don't have a direct support for this. But I tried the following construct:

record (ai, "$(P):read")
{
    field(DTYP, "stream")
    field(INP,  "@proto read($(P):calc) terminal")
    field(FLNK, "$(P):calc")
}

record (calcout, "$(P):calc")
{
    field(CALC, "A*10^B")
    field(OUT, "$(P):read")
}

with the protocol

Terminator="\r\n";

read {
    in "U1";
    in "%(\$1.A)d%(\$1.B)d";
}


The protocol reads mantissa and exponent as decimal integer and put them into fields A and B of a calc record. This record calculates the value and writes it back to the input record.


I already got a request for the same format earlier but have not yet found the time to implement it.

Dirk


Eric Berryman wrote:
Hello!

I've run into a problem I'm guessing others have solved using the
Streams module.  I have a device that outputs reads in the format:

U1\r\n+00011-01\r\n

meaning 11e-01 , which would be the preferred format for using a
general format specifier in the protocol file.

What would be the format to successfully read in this number from the
Streams protocol file?
(Or, will I have to run as a string read through a c filter program,
sub record)

Thank you!
Eric


-- Dr. Dirk Zimoch Paul Scherrer Institut, WBGB/006 5232 Villigen PSI, Switzerland Phone +41 56 310 5182

Replies:
Re: Streams questions (how to read +00011-01 as 11e-01=1.1) Dirk Zimoch
References:
Streams questions Eric Berryman

Navigate by Date:
Prev: RE: EPICS????????????? Dalesio, Leo `Bob`
Next: VDCT Hierarchies Gerke, Christian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Streams questions Eric Berryman
Next: Re: Streams questions (how to read +00011-01 as 11e-01=1.1) Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·