Experimental Physics and Industrial Control System
|
Hi Donny,
I receive a string from a device containing the current draw as a 6
character number. ie. for 2.45 A, the string would be 000245. Using the
format converter %6f in the proto file, I am able to read the value into
a ai record as 245. However when I try to convert the input string using
%=6.2f, I always read in 0 as the current.
Am I understanding the = operator properly? How can I convert the string
000245 input into 2.45 in the ai record?
I would convert the string to an integer (which it basically is) to have it written to the RVAL (raw value) field of the ai record and use the standard linear conversion function of the ai (setting LINR to SLOPE and ESLO to the desired factor) to convert it to the value in engineering units.
StreamDevice's = operator is used to *compare* an input string with a value. (E.g., for an output record, if your device's return string contains the value that you just set, you can make sure that it matches.)
Cheers, ~Ralph
- References:
- StreamDevice Format Converters Donny Domagoj Cosic via Tech-talk
- Navigate by Date:
- Prev:
RE: Access motor controller target positions of other axes in asynMotorAxis::move Mark L Rivers via Tech-talk
- Next:
Fwd: StreamDevice Format Converters Zimoch Dirk (PSI) via Tech-talk
- 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:
StreamDevice Format Converters Donny Domagoj Cosic via Tech-talk
- Next:
Fwd: StreamDevice Format Converters Zimoch Dirk (PSI) via Tech-talk
- 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, 14 Nov 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|