EPICS Home

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  <20172018  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  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: stream enum
From: l123173 <[email protected]>
To: tech-talk <[email protected]>
Date: Mon, 5 Jun 2017 21:28:12 +0800 (CST)
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";
}


 


Replies:
RE: stream enum Mark Rivers
Re: stream enum Dirk Zimoch

Navigate by Date:
Prev: Re: Use default value if CA link error Luca Cavalli
Next: RE: stream enum 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  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Use default value if CA link error Luca Cavalli
Next: RE: stream enum 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  <20172018  2019  2020  2021  2022  2023  2024