Accessing Schneider PM810MG via Modbus RTU Forum Home › Forums › Communicating with Devices › Modbus › Accessing Schneider PM810MG via Modbus RTU Tagged: modbus, PM800, PM810MG This topic has 1 reply, 2 voices, and was last updated 3 years, 2 months ago by Mikhail. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts January 13, 2021 at 4:38 pm #8019 kumajayaParticipant Device template: <?xml version="1.0" encoding="utf-8"?> <DevTemplate> <Settings> <ZeroAddr>true</ZeroAddr> <DecAddr>true</DecAddr> <DefByteOrder2 /> <DefByteOrder4 /> <DefByteOrder8 /> </Settings> <ElemGroups> <ElemGroup active="true" tableType="InputRegisters" address="1104" name="Current"> <Elem name="Average Current" type="ushort" byteOrder="" /> </ElemGroup> <ElemGroup active="true" tableType="InputRegisters" address="1122" name="Voltage LL"> <Elem name="Average Voltage LL" type="ushort" byteOrder="" /> </ElemGroup> <ElemGroup active="true" tableType="InputRegisters" address="1127" name="Voltage LN"> <Elem name="Average Voltage LN" type="ushort" byteOrder="" /> </ElemGroup> <ElemGroup active="true" tableType="InputRegisters" address="1142" name="Power"> <Elem name="Total Power" type="ushort" byteOrder="" /> </ElemGroup> <ElemGroup active="true" tableType="InputRegisters" address="1179" name="Frequency"> <Elem name="Frequency" type="ushort" byteOrder="" /> </ElemGroup> <ElemGroup active="true" tableType="InputRegisters" address="1699" name="Energy"> <Elem name="Energy" type="ulong" byteOrder="67452301" /> </ElemGroup> </ElemGroups> <Cmds /> </DevTemplate> Formula to convert energy register based on https://www.se.com/id/en/faqs/FA212766/ info: double Mod10(double val) { ulong v = Convert.ToUInt64(val); return ((v >> 48) * 1000000000000) + (((v >> 32) & 0xFFFF) * 100000000) + (((v >> 16) & 0xFFFF) * 10000) + (v & 0xFFFF); } @Mikhail Am I doing right? Or is there a better solution? January 14, 2021 at 1:34 pm #8024 MikhailModerator Who are crazy authors of such algorithms… Please scroll down this Russian version the article, there is a formula: double Convert(double x) { return x<32768 ? x*760/32767 : -(double)(ushort)(~(ushort)x|128+1)*210/9182; } May be it can be example. To be honest, I didn’t understand Mod10 calculations. If you change your question to something more specific, what calculation do you need, I’ll try to help. Author Posts Viewing 2 posts - 1 through 2 (of 2 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In