Modbus Register handling

AdrianEL

Member
Join Date
Nov 2013
Location
Edinburgh
Posts
33
Hi All,

I have a RedLion G310 panel which is talking to a flow meter through Modbus RTU. I need to read just one number (the flow rate) from the meter. The flow meter manual is not very helpful but describes the register as 'Register 0001-0002' Format as 'Real4' and the 'Number' as 2. I assume that this means two registers holding a 64 Bit Real.

In the RedLion I get values when polling registers in the flow meter so the comms is working. However I can't make sense of the numbers.

I am polling address 400001.LONG or 400001.REAL and get a response from both. I presume I also have to poll 400002.LONG or 400002.REAL and then combine these into a 64 Bit double precision real number.

Anyone got any ideas how to do this?

Ta.
 
1) Lots of flow computers use 64 bit floating point (FP)/real. I'd hadn't seen a flow meter that uses 64 bit FP/real, but there's lots of flow meters out there. The ones I've seen use 32 bit FP/real.

'Real4' could also mean four, 8 bit bytes, and 'Number' 2 means two, 16 bit Modbus registers, depending on who wrote the manual.

2) "two registers holding a 64 Bit Real."
In standard Modbus terminology, two 16 bit Modbus registers is a 32 bit floating point/real.

3) When you read 400001 as a float (two Modbus registers), do you get a valid reading? I would think you would.

4) If, in fact, the data you need is a 64 bit floating point/real, then to convert to a 64 bit floating point value, you'll need the raw binary bit stream, so you'd need the binary bits in two (32 bit) long integers, without any interpretation.
 
long and real also read 400002. It appears the flow meter has 32 real to me - 0001-0002 is only 32 bit. It may be a case of the big endian or little endian problem. Not sure if the Red Lion can be changed for the endian dilemma. Otherwise you will have to swap words and swap bytes.
 
I agree with BobB.

Real4 probably means interpreted as a real number using 4 bytes. Crimson does offer Word Ordering selections at the driver level (per device) as well as manipulation options at the tag level. The last one I had weird issues with (P2000 PLC using Modbus) for 32 bit reals, I had to choose Holding Registers "Word as Real" with no manipulation and had the driver set up "High Then Low" for word ordering for both Long and Real numbers.
 

Similar Topics

Hi everyone, I am working on a project that needs to expose the SV (Set Value) of a temperature controller to a SCADA system. SCADA <-...
Replies
4
Views
159
Hi all, I'm really new to this. I need to export the Modbus register mapping from a Modicon M580 through Control Expert for the registers that...
Replies
4
Views
949
I have a Red Lion G09 scanning 8 Invertek P2 VFDs via modbus RTU - I've setup necessary comms and tags and all works well. I have a 'Settings'...
Replies
3
Views
1,871
I have Micro850 with module 2080-Serialisol. It is needed to read 5 registers from a device via Modbus RTU. The device is Ok, I can read the data...
Replies
0
Views
1,139
Hi, I started my journey with Micro820 and I have to read input status address 10001-10010 from one device via Modbus TCP, everything works fine...
Replies
0
Views
1,184
Back
Top Bottom