Experimental Physics and
| |||||||||||||||
|
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
| ||||||||||||||
ANJ, 17 Dec 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |