• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Modbus4J Modbus RTU master

    Modbus4J general discussion
    3
    24
    20.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • amer jamilA
      amer jamil @jeremyh
      last edited by

      @jeremyh so what should I do next is, minus 1 from all the register that I want since it start count from 0 right ? Thank you so much again. Thank you for helping me around since the beginning.

      jeremyhJ 1 Reply Last reply Reply Quote 0
      • jeremyhJ
        jeremyh @amer jamil
        last edited by

        Yes subtract 1 from all the registers in the documentation.

        1 Reply Last reply Reply Quote 0
        • jeremyhJ
          jeremyh
          last edited by

          Out of curiosity are you logging all the data in a database on disk? Or just in memory to draw the graphs?

          amer jamilA 2 Replies Last reply Reply Quote 0
          • amer jamilA
            amer jamil @jeremyh
            last edited by

            @jeremyh yaa, the data will be insert into the database every minute.

            1 Reply Last reply Reply Quote 0
            • amer jamilA
              amer jamil @jeremyh
              last edited by

              @jeremyh Hello Jeremy. Want to ask you one more question. I am not from the Electric background. So, I find a difficulty in calculating the power consumption of the meter. For you information, my system going to add the data in the database for every one minute. How am i going to calculate the power consumption for the device for a day (24 hours). I have Kw value for every minute.

              Do I have to add the Kw value for every minute up to the whole day ?

              Thank you.

              1 Reply Last reply Reply Quote 0
              • jeremyhJ
                jeremyh
                last edited by jeremyh

                Power (kw) is an instantaneous measurement. Energy (kWh), which is sounds like you want, is Power over Time. One kW of power being drawn for one hour is 1 kWh of energy. Half a kW for two hours is still 1 kWh.

                To convert kW to kWh you would have to integrate the kW measurement i.e calculate the area under a plot of power over time. This is only as accurate as your measurement/sampling interval which is only 1 minute.

                The real answer is to find the registers for cumulative energy (kWh and kVAh generally) in your meters and use that measurement to compute hourly/daily/annual kWh and kVAh energies. It will be a lot easier and a lot more accurate than trying to work it out yourself.

                amer jamilA 1 Reply Last reply Reply Quote 0
                • amer jamilA
                  amer jamil @jeremyh
                  last edited by

                  @jeremyh below is the sample of my database.

                  data.png

                  could you teach me how to calculate.

                  1 Reply Last reply Reply Quote 0
                  • jeremyhJ
                    jeremyh
                    last edited by

                    Just use the deltas. In energy/utility metering a 15 minute interval is generally used.

                    at 10:00am the MWh used was 122.858
                    at 10:15am the MWh used was 122.859

                    122.859 - 122.858 = 0.001 MWh or 1kWh used in the 15 minute period.

                    Because you are measuring in MWh you lack the resolution to get tenths of kWh, so you should consider storing more decimals if you can, or reading from a kWh register if you can.

                    If that's not an option then you could integrate using the method/s discussed here: http://physics.stackexchange.com/questions/109295/calculating-kwh-from-time-series-of-kw

                    You could very crudely say that if the average demand over the 15 minute period is 4.75kW then the energy consumed in that 15 minute period (which is 1/4th of an hour) is (1/4 hours)*4.75 kWh = 1.1kWh.

                    amer jamilA 1 Reply Last reply Reply Quote 0
                    • amer jamilA
                      amer jamil @jeremyh
                      last edited by

                      @jeremyh

                      data15minute.png

                      Is it correct ? Do i need to sum all the KW and I will get the total consumption for an hour ?

                      (1/4 * 4.8) + (1/4 * 4.9) + (1/4 * 4.8) + (1/4 * 4.8) = 4.825 KWH

                      1 Reply Last reply Reply Quote 0
                      • jeremyhJ
                        jeremyh
                        last edited by

                        No. You would need to do:

                        (1/samples per hour) * (sum of kilowatts over period) = kilowatt-hours

                        i.e. (can't believe you made me type this):

                        (1/60) * (4.872+4.873+4.808+4.896+4.744+4.768+4.896+4.832+4.816+4.776+4.888+4.872+4.760+4.840+4.792) = 1.2kWh

                        This is honestly a really bad and dumb way to do this though. It is very inaccurate and if you miss any measurements your energy will be even further off. Just add the kWh register (rather than MWh) from your panel meter and calculate the difference every period - that is what it's there for!

                        If you ended up with 15-minute energy kWh then to get hourly energy you would just sum the kWh. Energy can be added to energy.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post