Hello,
I'm starting with EPICS and trying to have a PV read a SGL/Float32 value exposed by a modbus device (the value is stored on two 16bits-wide holding registers).
To achieve this I'm using "Driver Support for Modbus Protocol under EPICS".
http://cars9.uchicago.edu/software/epics/modbusDoc.html
Modbus data is retrieved as follows (i.e. using modbus function 4 to retrieve two 16bit words at address 9) :
drvAsynIPPortConfigure("INSTR","192.168.##.##:502",0,1,1)
modbusInterposeConfig("INSTR",0,5000)
drvModbusAsynConfigure("INSTR:ReadFloat32","INSTR",1,4,9,2,0,50, "InstrInterface")
What I just can't figure out is :
- How do I typecast this 32bit modbus data into a Float32 ?
- What "EPICS device support" should I use (asynFloat64, asynInt32...) ?
- Should my PV be an "ai" and where can I cast the right data type within ?
Thanks for any help,
oz
- Replies:
- RE: Modbus data to float32 ? Mark Rivers
- Navigate by Date:
- Prev:
Re: BOY Data Browser Issues Kasemir, Kay
- Next:
Epics C# Library problems Perrier Pierre
- 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:
Re: Newport ESP300 Chen Xue
- Next:
RE: Modbus data to float32 ? Mark Rivers
- 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
|