REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Solved Energy Meter kwh Reset

    REXYGEN Studio
    3
    7
    606
    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.
    • M
      MikeyH
      last edited by

      Hi All,

      I have an energy meter I am using, connected via Modbus. The issue I have is the kwh figure in the meter can not be reset to zero, currently it is up to 9124.0 kwh. When I start a new test I'd like to reset the logged kwh figure.

      7fbe7db3-9179-45e0-8f23-2afcb22620ff-image.png

      What is the best way of doing this via the REX program? I wondered about saving the last know value from the Modbus register and then subtracting that to give me a virtual reset and start from zero again.

      Thoughts?

      Cheers

      Mike

      R 1 Reply Last reply Reply Quote 0
      • R
        reitinge @MikeyH
        last edited by reitinge

        @mikeyh Hi Mike,
        one possibility is to use a SHLD block with Triggered sampling mode (documentation here). When you send a pulse to the block input SETH, the current value of input u is stored at output y. The overall connection can then look something like this:
        a6aff46e-8b4e-426d-863d-452549f0874b-image.png

        Cheers,
        Jan

        M 1 Reply Last reply Reply Quote 0
        • M
          MikeyH @reitinge
          last edited by

          @reitinge Hi Jan,

          That works extremely well, even better once made into a small subsystem! Thank you for your help as always.

          Cheers

          Mike

          A R 2 Replies Last reply Reply Quote 0
          • A
            Apollo @MikeyH
            last edited by

            @mikeyh

            Maybe you can also make the parameters of function block SHLD non-volatile (Persistent parameters).

            If you restart your computer and/or download new program then it will not lose the previous stored value.

            6a0f7a3c-42b6-4b34-aebe-9fca0327af0a-image.png

            And storing the value every midnight in a database and then trigger the SETH input would give you a nice overview of the daily consumption.

            1 Reply Last reply Reply Quote 1
            • R
              reitinge @MikeyH
              last edited by Jan Reitinger

              Hi guys,
              @mikeyh you're welcome. @apollo is right with persistent parameters. If you don't just do short-term tests, don't forget to turn persistent parameters on.

              M 2 Replies Last reply Reply Quote 0
              • M
                MikeyH @reitinge
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • M
                  MikeyH @reitinge
                  last edited by

                  Hi Both,

                  Thank you. @Apollo, great tip. That will save me loosing data.

                  Cheers

                  Mike

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

                  This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

                  There is also an outdated REXYGEN community forum.

                  Powered by NodeBB.