Experimental Physics and Industrial Control System
|
I think it might be possible to do this with a format converter, but, in a cursory look at the docs, the answer didn't jump out at me. You could do it with an scalcout record.
If you can get the string " 000024015" into the scalcout record's AA field, the calc _expression_ "aa[0,2]+":"+aa[3,4]+":"+aa[5,6]+":"+aa[7,8]" will put "000:02:40:15" in the SVAL field.
Tim Mooney
I have a timer device that provides data over a RS232 serial interface. I’m using StreamDevice to grab the data and publish as PVs. The data contains several times. All the times come in as an ASCII string containing days, hours, minutes
and seconds and I'm writing them to stringin PVs. However, the data does not contain any separators, so the data coming in looks something like 000024015 (i.e. 000 days, 02 hours, 40 minutes, 15 seconds). I know the ‘in’ command needs to match the incoming
data exactly or else it is discarded, but is there a way to add formatting to the PV that is NOT in the data? All I want to do is add a ‘:’ separator between each part, so the PV value will be like 000:02:40:15. Any suggestions?
Thanks!
|
- References:
- Formatting StreamDevice input Elmer Pensack
- Navigate by Date:
- Prev:
Formatting StreamDevice input Elmer Pensack
- Next:
Re: EPICS alarming on VAL != X Maren Purves
- 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
- Navigate by Thread:
- Prev:
Formatting StreamDevice input Elmer Pensack
- Next:
RE: Formatting StreamDevice input Mazanec Tomáš
- 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
|
ANJ, 17 Dec 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|