If you already have the scalcout record type, you can use the calc
expression
PRINT("%x", a)
where the .A field holds your decimal number.
Prachi Chitnis wrote:
Hello,
Is there any way to convert the DEC value to HEX value in IOC database? I
am able to convert HEX to DEC by prepending "0x" before the HEX string and
ai record understands it as DEC. But I am unable to convert it back to
HEX. I however found another method for DEC to HEX conversion, converting
DEC to BIN (mbbiDirect), separating them to nibbles and getting DEC value
of the nibble (mbboDirect), then it is converted to HEX char by string
fields of mbbi record, and adding the HEX characters together by scalcout.
But this is increasing the processing time as many fanout records are
involved in between.
Please suggest some method.
Thanks and regards,
--
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab.
- References:
- Converting DEC to HEX Prachi Chitnis
- Navigate by Date:
- Prev:
Re: catools for cross compiled target Janet Anderson
- Next:
Re: subArray processing Carl Lionberger
- 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:
Converting DEC to HEX Prachi Chitnis
- Next:
catools for cross compiled target Hinko Kocevar
- 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
|