Page 4 of 5

Re: EKM-Omnimeter RS-485 Data

Posted: Tue Dec 02, 2014 3:53 pm
by ckhome
I would be interested in seeing a Tridium driver for the EKM meters! Here is a web link to the Niagara community where one can find resources and attend classes. Hope it helps.

https://community.niagara-central.com/o ... vices_Home
Niagara Central
Niagara Central
Niagara Central.PNG (165.64 KiB) Viewed 91789 times

Re: EKM-Omnimeter RS-485 Data

Posted: Thu Jan 22, 2015 1:29 pm
by Jameson
I wanted to follow up and let everyone know where this stands. We have had some conversations with Tridium and based on the time and the price they quoted us, we will have to hold off on paying them to integrate for now. We would have to see a lot more demand for this before we will be able to justify (mostly the expense) of getting our meters to work with Tridium Jace.

So please let us know if this is a need that you have, if we get enough of a response we will bump it up the list of priorities.

Thanks,

Re: EKM-Omnimeter RS-485 Data

Posted: Fri Apr 17, 2015 8:52 am
by Jameson
LabVIEW was mentioned earlier in this thread, so I thought someone here might be interested in this link to a LabVIEW driver for the v.3 Omnimeters: http://forum.ekmmetering.com/viewtopic.php?f=1&t=3429

Re: EKM-Omnimeter RS-485 Data

Posted: Mon Sep 07, 2015 9:52 am
by MohaveTom
I think this is the proper place for this comment.

I have written C++ code to read my v.4 Omnimeter and store the responses in a database.
This is a Qt project, so it is full of Qt specific stuff.

These links will take you to the sources.
https://github.com/MojaveTom/QtReadEkm
https://github.com/MojaveTom/QtSupportRoutines

Since I have only a v.4 meter, there are stubs for some of the v.3 specific functions.

Smiles,
Tom

Re: EKM-Omnimeter RS-485 Data

Posted: Tue Oct 20, 2015 11:09 pm
by sensij
Jameson wrote: Here is our CRC code... This is a standard lookup table implementation with the standard CRC16 polynomial, the differences in computation are in the code, dealing with the initial value, endianness, and 7-bit encoding.

static const uint16_t const ekmCrcLut[256] = {
<snip>
};

uint16_t ekmCheckCrc(
const uint8_t const*dat,
uint16_t len
) {
uint16_t crc = 0xffff;

while (len--) {
crc = (crc >> 8) ^ ekmCrcLut[(crc ^ *dat++) & 0xff];
}

crc = (crc << 8) | (crc >> 8);
crc &= 0x7f7f;

return crc;
}

Thank you for sharing this! Saved me a bunch of time....

Re: EKM-Omnimeter RS-485 Data

Posted: Mon Jan 25, 2016 10:37 am
by Daniel_Ch
Hi Jameson,

I'm trying to get data from the sensor v.3, I'm using arduino microcontroller and I would like to know if there is a ('\n') at the end of each line.

this file makes me guess
this file makes me guess
ekmu.png (18.91 KiB) Viewed 91269 times

Re: EKM-Omnimeter RS-485 Data

Posted: Mon Jan 25, 2016 12:15 pm
by Jameson
Hello Daniel,

There is not an ASCII "\n" at the end of each line, the HEX Meter Request and HEX Meter Return are just as you have posted them. The nice part about HEX is there are no hidden ASCII characters. If you convert ASCII "\n" to HEX you would get 5c 6e.

I can see that this meter request is for Omnimeter II v.3 UL #10001320, and I can see your full meter response with checksum 1A 44. Let me know if you are having trouble parsing the data.

Hope this helps.

Re: EKM-Omnimeter RS-485 Data

Posted: Mon Jan 25, 2016 3:44 pm
by Daniel_Ch
I want to make an alert when there is overload detected and make a signal to turn off some machines, so I bought a max485 to convert rs485 data from meter, it is connected in serial with the push system, I pretend to read the request and response.

I'm using SerialEvent code to read the Rx port in arduino, I think I've solved 7E1 serial configuration, but I need to make sure if I will get data as the strings I uploaded in post above, my purpose is to read the electric power, I need to keep data in a register and get access to an specific line.
After that, I compare it with a constant value to activate the signal I am looking for, so I need to make sure that data will look like those strings.

One more thing, the ekm meter is reading every minute, the boud rate is 9600 independently ?

I wasn't aware about 7E1 configuration, this was the result in serial monitor.
I expect better results next time.

Re: EKM-Omnimeter RS-485 Data

Posted: Mon Jan 25, 2016 4:26 pm
by Jameson
It looks like you are interpreting data in ASCII, we tend to recommend you keep in in HEX. Otherwise you will get the symbols and unprintable characters that are impossible to interpret.

Can I ask: Seeing as you already have an EKM Push reading your meter, why trigger based on the RS485 data and not use the EKM Push data API directly? Does your Arduino have an ethernet port or only a serial port?

http://www.ekmmetering.com/developer-portal/

Yes, the meter always communicates at 9600 baud, 7 data bits, Even Parity, 1 Stop Bit, and No Flow Control.

Good luck, sounds like a fun project! Let us know how it turns out :)

Re: EKM-Omnimeter RS-485 Data

Posted: Mon Jan 25, 2016 7:13 pm
by Daniel_Ch
Yes, only serial port.

I just modify my code to print in HEX, and 7E1 configuration not 8E1, do you think that I can read data properly using the max485 which converts from rs485 to ttl ?

Thank you so much,

Daniel