Author Topic: can we read data from eletricity meter protocol with IEC 62056-21 ?  (Read 3817 times)

muratguenduez

  • Newbie
  • *
  • Posts: 22
    • View Profile
i need to read some datas from these meters. it says it has a port rs-485 but im not sure it is. initial baudrates must be 300 b/s and after first communication, baudrate can be selectible. i dont understand. here is the information to use this communication http://vrtp.ru/index.php?act=Attach&type=post&id=479714

i hope you find a solution for this issue.

best regards
thanks

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: can we read data from eletricity meter protocol with IEC 62056-21 ?
« Reply #1 on: November 28, 2017, 09:48:01 AM »
You should definitely check Wikipedia page for the IEC 62056-21 standard (especially possible password requirements):

https://en.wikipedia.org/wiki/IEC_62056

There is also some discussion on Arduino forum about reading electricity meter:

https://forum.arduino.cc/index.php?topic=147239.0

All together, to me it looks like a serial port driver would have to be created to read these meters or one could just attempt to use serial commands programmatically.

muratguenduez

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: can we read data from eletricity meter protocol with IEC 62056-21 ?
« Reply #2 on: November 29, 2017, 07:59:32 AM »
i have researched for 3 days .

it says first time baud is 300 then if you want choose another speed anyway

Code: [Select]
private void button2_Click(object sender, EventArgs e)
        {
            serialPort1.Close();
            serialPort1.BaudRate = 300;
            serialPort1.PortName = "COM2";
            serialPort1.Parity = Parity.Even;
            serialPort1.StopBits = StopBits.One;
            serialPort1.DataBits = 7;
            serialPort1.Open();

            serialPort1.Write("/?!" + (char)13 + (char)10);
            Thread.Sleep(200);
            serialPort1.Write((char)6 + "050" + (char)13 + (char)10);
            Thread.Sleep(200);
            serialPort1.Close();
            serialPort1.BaudRate = 9600;
            serialPort1.Open();
            serialPort1.DtrEnable = true;
            serialPort1.Write((char)1 + "R2" + (char)2 + "0.0.0"+"()" + (char)3 + "P");
            string a = serialPort1.ReadLine();
            listBox1.Items.Add(a);

        }
i did this but i didnt try because of i havent device yet. maybe i need to convert to ascii or sometinng like utf-16 32 im not sure.  i will report here when i try =)
« Last Edit: November 29, 2017, 08:01:46 AM by muratguenduez »