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: | Numbers as Hex encoded strings in StreamDevice |
From: | Bo Jakobsen via Tech-talk <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Fri, 4 Sep 2020 15:00:20 +0200 |
Dear all
Sorry if this has been covered before, I could not find an
exact example matching my need, and format converts are still a
bit hard for me.
I am trying to write a StreamDevice IOC for a display.
The format needed by the display is
cmd(MSB) cmd(LSB) charater(MSB) charater(LSB)
Where values are in hex representation
exampel for a simpel write command (cmd(MSB)
cmd(LSB) = FF FE)
FF FE 00 39
which will send the charater "9" ascii 0x39 to the display
Is there a simple way to generate such string representations
of numbers from a PV (potentially including scientific
representation).
Best
Bo Jakobsen
-- Bo Jakobsen (Physicist, PhD) Scientific Engineer / Team leader Department of Science and Environment Roskilde University (RUC)