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

Subject: Re: Formatting StreamDevice input
From: Elmer Pensack <[email protected]>
To: [email protected]
Date: Wed, 30 Jul 2014 13:47:31 -0400
Thanks all for the suggestions. I was able to successfully get the time string formatted using scalcout. I'm sure I'll have more questions when I look into the %T option to convert to seconds, but in the meantime I hit another snag.

Embedded in that same block of data is a smaller block of seven status words. The status words have no separators. They come in like this: 82918020303030. This represents seven hex values: x82, x91, x80, x20, x30, x30, and x30.

If I use the %D option and read them as binary coded decimals it works, as long as the values contain only 0-9. As soon as the x80 changes to an x8a status I get a CALC INVALID error. Reading the documentation, that makes sense for %D. So I tried using a %x, %i, %d, and every optional flag I could think of trying, including widths. But the only result I get is 0. I can't seem to read the values unless I use %D. Any ideas?

Here is my protocol:

getStatusWords
{
   in STX 5 "%D%(STATUS2)D%(STATUS3)D%(STATUS4)D%(STATUSWORD5)D%(STATUS6)D%(STATUS7)D";
}

This populates the seven PVs. The STX is the "next field" indicator and the 5 indicates that the field is for status words.

Here's the PVs I've defined:

record(longin, "STATUS1")
{
   field(VAL, 0)
   field(DTYP, "stream")
   field(INP,  "@cdg4200.proto getStatusWords CDT")
   field(SCAN, "I/O Intr")
}
record(longin, "STATUS2")
{
   field(VAL, 0)
}
Same for STATUS3 - STATUS7.

All input is unsolicited. It comes in continuously every second.

Thanks in advance!

Elmer Pensack

Replies:
RE: Formatting StreamDevice input peter.owens
References:
Formatting StreamDevice input Elmer Pensack
Re: Formatting StreamDevice input Dirk Zimoch

Navigate by Date:
Prev: RE: EPICS on VxWorks6.9 Mark Rivers
Next: RE: Formatting StreamDevice input peter.owens
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Formatting StreamDevice input Dirk Zimoch
Next: RE: Formatting StreamDevice input peter.owens
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·