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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Converting DEC to HEX |
From: | Tim Mooney <[email protected]> |
To: | Prachi Chitnis <[email protected]> |
Cc: | [email protected], [email protected], [email protected], [email protected] |
Date: | Thu, 04 Jun 2009 11:05:11 -0500 |
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.