Red Lion G306A and SDM120CT Meter Modbus

AdrianEL

Member
Join Date
Nov 2013
Location
Edinburgh
Posts
33
Trying to get a G306A panel to talk to an SDM120CTM meter but i can't make the Red Lion make sense of the response from the meter.

Using PC Modbus software I can communicate with the meter. For instance if I ask for register 30001 (using an 04 request) which is the meter voltage I get the response in Hex 43 73 4C CD

Now 43 73 4C CD is a Big Endian coding for Float 243.3 Which is the correct voltage. But the numbers I get from the Red Lion are not being interpretted as a Big Endian Float in this way.

Any idea what to set in Crimson 3 so that I can have a Float Tag that contains this number?

Thanks in advance.
 
Modbus can be a pain, though just to upset you :) I find that Redlion Crimson is one of the easier things to work with. The picture shows a connection to a Teltonika Router, the Register Address is 143, but the Register Number is 144, like I said, a pain. Then you can see the settings I put in for Crimson to read the latitude. If things get really bad there is the Manipulation drop down to play with.
If that doesn't help, then go binary, convert your 43 73 4C CD to binary, set the HMI to read an integer, convert it to binary, and look for matching patterns, it can help you see what manipulation is needed.
With an EXOR HMI I had to read 143, but then use two different swap manipulations, ABCDEFGH > GHEFCDAB then ABCD>CDAB to do the same job. That is why I say that the Redlion is generally easier to use.

Modbus with Crimson.jpg
 
Thanks BryanG

I am aware of the odd thing with Register Address and Register Number (Address 0 is Number 1 etc) on the Red Lion. Trouble is I am not getting any sensible data on the Red Lion Modbus. But if I connect the meter to a PC with a Modbus Master then I do get sensible data out of it. That is where the 43 73 4C CD value can be read. I don't get this or anythign similar in the Red Lion tag however I try to format it.

Beginning to think I will scrap the Eastron meters. I have Chint Meter which The Red Lion seems to read perfectly.
 
Are you using Data Type Word as Real?
attachment.php


What about changing the Manipulation to Reverse Words, Or Reverse Bytes.
and Treat as Floating point.
attachment.php


Patrick

2024-02-01_12-29-41.png 2024-02-01_12-29-27.png
 
If you have the Red Lion device read the same two registers as 16-bit words, is the 0x4373 (18547 decimal)the first "word," and the 0x4CCD (19661 decimal) the second "word?"
 
Thanks for the answers chaps. Not had any success yet but tried every combination of manipulation that the Red Lion offers. Weird thing is I can make the meter work perfectly with a PC as modbus master but on the RL I seem to get nonsense. I have made the RL talk to lots of other meters in the past (Chint, Carlos Gavazzi etc) just not this one.

So next step is to start again and set up the RL and meter without anything else and then a PC to monitor the modbus comms. Will report back.
 
OK - so is it possible there is something wring with the Red Lion Modbus driver????

RL connected to PC with monitoring software, Meter is address 4

Meter manual says that (for instance to read volts) I need to send;

04 04 00 00 00 02 (71 CB) Last brackets are the checksum

The Red Lion ALWAYS sends

04 03 00 00 00 01 (xx xx)

This WHATEVER the Tag is set to - I can pick;

0 - Digital Coil
1 - Digitial Inputs
3- Analogue Inputs
4 - Holding Registers
6 - File Registers
L4 - 32 Bit Holding Registers

WHATEVER I set the tag to try and read I get the same sentance from teh RL starting 04 (address correct) 03 (function incorrect) 00 00 01 Checksum

Arrrgg....
 
If you have the two registers, you can calculate the correct value pretty simply, at least as a proof of concept:

Code:
>>> high = 0x4373
 >>> low = 0x4ccd
 >>>
>>> mantissa = ((((high & 0x007f)*65536.0) + low) / 8388608.0) + 1.0
>>>
>>> exponent = (((high & 0x7f80)/128.0) - 127.0)
>>>
>>> value = mantissa * (2.0**exponent)
>>>
>>> print(value)
243.3000030517578
"&" is the integer bit-wise AND operator.

"**" is the exponentiation operator; some languages use "^: instead. Or you could have a loop either double the mantissa and decrement exponent by 1, or have the mantissa and increment exponent by 1, until exponent is 0.

[Update: this assumes high and low are 16-bit UNsigned integers, or 32-bit integers]

If you don't get a good value, swap the high and low assignments at the start.
 
Thanks Again all -

Been working on this all day - some progress!

Seeing 04 03 00 00 01 xx xx on the serial line when there is no meter connected was a RED HERRING - it was the Red Lion pinging the Holding Register to see if the device was on line. If I change the ping holding register address that correctly changes in the line. So monitoirng with the meter disconnected led me up the wrong path.

drbitboy - thanks for the code - will be useful if I can just get any sort of sensible repsonse from the meter.
 
Chaps - I have just cracked it! Not really sure what I did but I now have the correct numbers displayed. It might have been to do with the ping register which I changed from 1 to 0 in desperation. There is nothing in the Eastron SDM120 manual about which register to ping to confirm connection. Maybe it was that.

Thanks all very much for your help.
 

Similar Topics

Looking for some help on the red lion side I was able to diver out all the port settings to get the hmi to talk to elc having the are-485 light to...
Replies
1
Views
1,105
Just getting into learning the Crimson 3.0 database software and I need some help. I am trying to figure out the reason why the G306A will not...
Replies
1
Views
4,302
Good Day Everyone! We have a project the requires an encoder connected to a Paxi Meter and then into the HMI in order to display/record depth and...
Replies
1
Views
3,157
I've got an encoder hooked up to a CUB5 and want to communicate with it from a G306A via RS232. I made two cables with pinouts per the G306A and...
Replies
3
Views
1,926
Iam removing a Panelview600 as it is no longer supported and replacing it with a Red Lion G306A panel the PLC is a SLC500, after much research I...
Replies
4
Views
2,461
Back
Top Bottom