RS485

Forum is open to all questions, answers, and discussions related to electric meters, ours or others.
Post Reply
Wouter
Posts: 11
Joined: Sun May 20, 2012 11:37 am

RS485

Post by Wouter » Sun May 20, 2012 11:51 am

I have recently been introduced to RS 485 networks using Modbus RTU. I am using them to communicate with 4 Input/Output devices I am using to automate my solar system and heating system of my home.

I am currently using your water meters to do volume measurements to determine btu's into my home from the solar thermal system.

I've purchase three electric meters. The Omni 1 v.3 and two other basic meters.

I would like my controller to read data from the meters. The two basic meters are easy... I just count pulses.

The omni meter is harder. It will be capturing electrical flow in to two directions and I would like my controller to read that flow. In order to do that I need the following:

Default slave address of the meter.
Baud rate, parity etc.
What the registers capture.

Perhaps I am way off base. I am a hobbiest, not a professional in these matters.

Any help you can give me is greatly appreciated.

Thanks,


Wouter

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: RS485

Post by Jameson » Mon May 21, 2012 12:38 pm

Wouter,

Sounds like a cool system. We will help you out in any way that we can.

Here is the string parsing document for the EKM-Omnimeter: http://documents.ekmmetering.com/Meter_ ... ter_v3.pdf

The last 2 bytes are a CRC-16 checksum.

The Omnimeter communicates at 9600 baud, 7 data bits, even Parity, 1 stop bit and no flow control

The serial number that is laser etched into the face of your meter is the meter number. 999999999999 (12 9s) is the default address, this can only be used if 1 meter is attached to the RS-485 bus.

Here is an example of a request string for meter number 16543: 2f 3f 30 30 30 30 30 30 30 31 36 35 34 33 21 0d 0a

The digits in RED will be the only ones you will need to change for your particular meter. Send us your meter number if you would like help generating the request string.

Over RS-485 you will get Total kWh (forward + reverse) in 4 time periods, Reverse kWh in 4 time periods (for renewable generation), volts on each line, amps on each line, watts on each line, power factor on each line, max demand, internal meter clock time stamp, meter ID, CT Ratios, as well as some other data.

Good luck with your system, we will be very interested in hearing about your progress.

Regards,
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

Buxexas
Posts: 2
Joined: Mon Jun 16, 2014 3:49 am

Re: RS485

Post by Buxexas » Mon Jun 16, 2014 3:58 am

Hi,

Can you generate the request string for my ekm metering ?

Address: 1720

Best regards,
Buxexas
Portugal

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: RS485

Post by Jameson » Mon Jun 16, 2014 9:16 am

Hello Buexexas,

Welcome to the forum!!

From the meter number it sounds like this is a v.2 meter, is that correct?

I would try:

Send
2F 3F 30 30 30 30 30 30 30 30 31 37 32 30 21 0D 0A

You can see your meter number in the string by ignoring the leading 3s: 31 37 32 30

You can also essentially get the same answer if you were to read your meter with the EKM Dash and then go to Help>Hex Inspector. You can see the requests and responses in Hex.

Let me know if this helps.

Thanks,
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

Buxexas
Posts: 2
Joined: Mon Jun 16, 2014 3:49 am

Re: RS485

Post by Buxexas » Mon Jun 16, 2014 1:15 pm

Thanks Jameson for your reply!

Problem solved!

I make like that before posting, but the problem it was the baud rate.
I followed your first post and always tried with 9600 baud rate, then I researched better and I learned that the version 2 only allows 1200 baud rate.
Thanks anyway. ;)

I'm making a program in Visual Basic 2010 to connect with the automation of my house, do you have any example in VB?
I already send and receiving data, now i'm learning how to split the data...

Regards,

oxymai
Posts: 6
Joined: Sat Dec 30, 2017 3:07 pm

Re: RS485

Post by oxymai » Sat Dec 30, 2017 3:24 pm

Hi, I bought a brand new v3 meter (sn:000000023138) and did exactly the reading as advised in ekm website.
request: 2F 3F 30 30 30 30 30 30 30 32 33 31 33 38 21 0D 0A

However, the response out of the meter seems to be messed up. There is not enough 255 bytes and the number of bytes is random.
From the a few responses below, I can tell the data got all wrong as the Meter Address info (same as sn) was wrong.

The baudrate for this v3 is 9600 if I am not wrong. Please advise if anyone has the same problem and solution.

Thanks,


(211 bytes)
02 62 36 26 4C 4C 18 10 33 77 41 02 02 02 02 02 02 62 13 26 26
4C 4C 18 18 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 31 32 34 33
31 32 34 38 30 30 30 30 30 30 30 35 34 30 30 30 33 30 30 30 30
30 30 30 30 30 30 36 34 38 30 30 30 30 32 35 36 30 30 30 30 30
30 30 30 30 30 30 39 30 34 4C 30 39 36 43 30 37 38 43 30 30 30
30 30 30 33 39 30 30 30 31 31 37 31 32 33 31 30 31 30 35 34 30
30 38 30 32 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30
(238 bytes)
02 53 12 26 6E 4C 18 18 30 30 75 7E 18 30 78 53 1B 26 26 4C 4C
18 18 32 72 41 02 7A 4C 18 18 30 78 11 13 26 26 4C 4C 18 18 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 31 32 34 33 31 32 34 36
30 30 30 30 30 30 30 34 38 30 30 30 32 36 30 30 30 30 30 30 30
30 30 35 37 34 30 30 30 30 31 38 36 30 30 30 30 30 30 30 30 30
30 30 37 36 30 4C 30 39 36 43 30 36 37 43 30 30 30 30 30 30 33
39 30 30 30 31 31 37 31 32 33 31 30 31 30 35 34 32 35 35 30 32
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: RS485

Post by Jameson » Tue Jan 02, 2018 12:39 pm

Hello Oxymai,

Are you reading this meter with your own software or device?

Yes, there is certainly something wrong with how your computer or device is interpreting the meter serial return. First I would read this meter with your EKM Dash software to make sure it is not an issue with the meter.

Then if this is OK, I would "sniff" the serial return with a separate port, to independently verify the serial traffic.

Then I would "sniff" the traffic to your app or device, to verify.

We use CoolTerm to sniff on a Mac, or RealTerm to sniff on a PC.

I would suspect you have some serial setting wrong. Make sure you are using these serial settings: 9600 baud, 7 data bits, Even Parity, 1 stop bit, no flow control.
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

ekawahyu
Posts: 1
Joined: Wed Aug 15, 2018 1:47 pm

Re: RS485

Post by ekawahyu » Wed Aug 15, 2018 1:54 pm

@Jameson

I have been banging my head to the wall trying to read/write to EKM meter over RS485 from our own controller. It turned out that this documentation here, says that the RS485 serial setting is 7 data bits, EVEN PARITY, 1 Stop, No Flow Control:

http://documents.ekmmetering.com/api-do ... l-settings

It would never work because, by default, EKM meter comes with parity none. I hope someone can fix this in the documentation so that no one will never fall into the same mistake I did. Thank you.

Jameson
Posts: 749
Joined: Fri Nov 04, 2011 7:42 pm
Location: Santa Cruz, CA
Contact:

Re: RS485

Post by Jameson » Fri Aug 17, 2018 2:07 pm

Hello! Welcome to the forum. Thank you for letting us know about the issue you are seeing. Our Omnimeters are set to 7 data bits, EVEN Parity, 1 Stop Bit, and No Flow Control.

We just tried changing the setting to NO Parity and did not get a response from the Omnimeter. When we set it back to EVEN Parity we did get a meter response.

Would you mind sending us screenshots of the settings you are using? Are you able to verify that you are really not in EVEN Parity when you think you are in NO Parity? Do you have a way to independently verify with a 3rd party app what serial settings your port has? We will be interested to see what you find out.

Thanks,
Jameson
EKM METERING
http://www.ekmmetering.com
831.425.7371

Post Reply