1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 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 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Formatting StreamDevice input |
From: | "Pal Trivan" <[email protected]> |
To: | <[email protected]>, <[email protected]>, <[email protected]> |
Date: | Thu, 31 Jul 2014 11:02:39 +0200 |
Hello, In an analogous conversion, I have used a similar construct, it appears to be ‘ok’. i.e. getStatusWords shoud work. Regards, Trivan -- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] I’m pretty sure %2x is the format converter you need. If those are bit fields rather than numbers you might find mbbiDirect records more useful than longin. From: Elmer Pensack [mailto:[email protected]] 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? 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: Same for STATUS3 - STATUS7. Thanks in advance! Elmer Pensack |