EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <2026 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  <2026
<== Date ==> <== Thread ==>

Subject: The problem of converting floating-point numbers to 4-byte format (in CDAB order) under StreamDevice
From: 高振华 via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Wed, 7 Jan 2026 17:53:07 +0800 (GMT+08:00)


Hi all,




I am conducting Modbus RTU communication with a device and need to convert a 32-bit floating-point number into 4 bytes of hexadecimal data and then send it to the device.


For example: 3.15 converted to 4 bytes is 40 49 99 9A (in hexadecimal, big-endian order, ABCD order).


Using StreamDevice, how should I convert to the CDAB order? (For example, the CDAB order corresponding to 3.15 is 99 9A 40 49).


Does StreamDevice have a corresponding conversion symbol?





Best regards,



Gao Zhenhua




BSRF


Email:gaozh at ihep.ac.cn




Replies:
Re: The problem of converting floating-point numbers to 4-byte format (in CDAB order) under StreamDevice Mark Rivers via Tech-talk
Re: The problem of converting floating-point numbers to 4-byte format (in CDAB order) under StreamDevice Zimoch, Dirk via Tech-talk

Navigate by Date:
Prev: Re: NDPluginFile question Mark Rivers via Tech-talk
Next: Re: The problem of converting floating-point numbers to 4-byte format (in CDAB order) under StreamDevice Mark Rivers 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  2025  <2026
Navigate by Thread:
Prev: Re: NDPluginFile question Jörn Dreyer via Tech-talk
Next: Re: The problem of converting floating-point numbers to 4-byte format (in CDAB order) under StreamDevice Mark Rivers 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  2025  <2026
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·