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  2015  2016  <2017 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
<== Date ==> <== Thread ==>

Subject: RE: stream enum
From: Mark Rivers <rivers@cars.uchicago.edu>
To: l123173 <l123173@163.com>, tech-talk <tech-talk@aps.anl.gov>
Date: Mon, 5 Jun 2017 13:44:35 +0000
You should be able to change the record to ai or longin.

What is an example string from the device that you are trying to parse?

Mark

________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of l123173 [l123173@163.com]
Sent: Monday, June 05, 2017 8:28 AM
To: tech-talk
Subject: stream enum

Hi all,
   I met some little question about stream.
   After I sent command, I received a sequence of character through stream.
   The pv type was stringin and the value of the pv was 1(string) or 0(string).
   My question was that, I need the pv value was natural number( 0 or 1 ), not string type.
   I have tried to change the stringin to ai, some error came out. Then I think I could use the enum, but I could not know the usage though I tried.
   Could someone give some help.

Thanks,
Li xing

My db and proto file.
---------------------------------------------------------------
record(stringin, "$(P)$(R)STAT")
{
    field(DESC, "test")
    field(DTYP, "stream")
    field(INP,  "@devplc2.proto STAT $(PORT) $(A)")
}

STAT{
    out "\x0500FFBR2Y0000402F";
     in "\x02%*4s%c%*c%*c%*c%*c%*c%*c%*c%*c%*c%*s";
}





References:
stream enum l123173

Navigate by Date:
Prev: stream enum l123173
Next: Re: EPICS Base-3.16.1 Released J. Lewis Muir
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
Navigate by Thread:
Prev: stream enum l123173
Next: Re: stream enum Dirk Zimoch
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
ANJ, 08 Jun 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·