Ankündigung

Einklappen
Keine Ankündigung bisher.

Stromverbrauch Logik

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    HS/FS Stromverbrauch Logik

    Hallo ich habe mir eine kleine logik gebaut wo ich am Eingang den Status (ein/aus) eines Verbrauchers habe am andern den Strompreis in Euro den ich per Eingabe im QC verändern kann. Am Ausgang habe ich dann (nach Betriebsstundenzähler und Multiplikation) den gesamten Stromverbrauch in KW und Euro.
    Wenn ich aber jetzt den Strompreis am Eingang verändere rechnet er mir rückwirkend alles um. Ich möchte aber das er erst ab dem Tag der Umstellung mit dem neuen Preis rechnet.
    Wie kann ich das lösen?


    Unbenannt.JPG

    #2
    Du musst einfach die mit Multiplikation mit 0.012 vor dem Zähler machen. Dann zählst Du den Verbrauch, nicht die Betriebsstunden.

    Kommentar


      #3
      Na ich zähle erst die Betriebsstunden dann multipliziere ich sie mit 0,012 kw und dann mit dem Preis. Wenn ich erst den Status von 0/1 mit 0,012 kw multipliziere kommt doch nur Müll raus oder habe ich da einen Denkfehler.?

      Kommentar


        #4
        You will need an intermediate register.
        Right now you multiply total hours times rate. When the rate changes, your total cost will change along.
        You have to separate the cost calculation from the logic you showed (remove that piece from the logic you show). Set up another line of logic:
        1. 0/1/0 as input to the counter of operating hours (first module), as you have now, and the .012 multiplier (second module).
          This gives you the total kWh for the current rate, for further processing.
          Add an internal KO to reset the operating hours counter.
        2. Add the "Multiplier" module as you have now for the rate (so: the third module in this line of logic). The output goes to one input of an 'Add' module (fourth module).
        3. The other input of the 'Add' module is the value of register "Previous Total".
        4. Follow that 'Add' module with a lock-out (Sperre, fifth module in line), the lock-out is set to be open by default. Add an internal KO to control the lock-out.
        5. The output of that 'Lock-out' module is your "Verbrauch in Euro" KO. The output of this line of logic is now exactly the same as you have today, assuming your kWh and rate were in permanent memory. The new register "Previous Total" has the value zero until you update it.
        6. When you change the rate, then things get a bit complicated:
          1. Use a different KO to set the rate, i.e. "Rate input".
          2. When you update the rate, trigger a sequencer. Steps it takes:
            1. Block the lock-out, so there is no update of the kWh * rate calculation.
            2. Write the current value of the register "Verbrauch in Euro" to the register "Previous Total"
            3. Write the value of "Rate input" to your "Strompreis" KO.
            4. Reset the operating hours counter to zero.
            5. (These steps 3 and 4 recalculate the output of the multiplier, but the lock-out blocks the update of the "Verbrauch in Euro" KO.)
            6. Release the lock-out.
        7. The historical total will be the sum of the "Previous Total" plus whatever the new line of logic calculates.
        Hope it makes sense.

        Kommentar


          #5
          Eigentlich brauchst du für jede Strompreisänderung einen eigenen Betriebsstundenzähler.

          Alternativ musst du eine Logik aufsetzen, bei der zu jedem „Takt“ ein Summenteil zur Gesamtsumme aufaddiert wird. Ändert sich der Preis bleiben die Alten Summenteile unverändert. Die sind dann ja bereits in der Gesamtsumme aufgegangen.

          Dafür gibt‘s dich sicher nen Logikbaustein im DL-Bereich...

          Kommentar


            #6
            En3rGy welchen Logigbaustein kann ich da aus dem DL-Bereich nehmen?

            Kommentar


              #7
              Zitat von Timowald Beitrag anzeigen
              En3rGy welchen Logigbaustein kann ich da aus dem DL-Bereich nehmen?
              Hast du denn schon mal gesucht? Gibt man Bspw. „Energie“ ein kommt dieser Baustein:
              https://service.knx-user-forum.de/?c...nload&id=19956

              Bei „Strom“ kommen auch ein paar Zähler. Z.B. der
              https://service.knx-user-forum.de/?c...nload&id=11083

              Kommentar


                #8
                Timowald, hast du eine Lösung gefunden? Wenn ja, poste die doch kurz noch, damit andere ggf. auch davon profitieren können.

                Kommentar


                  #9
                  Sorry nein habe noch keine richtige Lösung gefunden. Bin noch am tüfteln. Weis noch nicht genau wie ich die Aus/Eingänge belegen soll von dem Baustein aus dem Post #8.

                  Kommentar


                    #10
                    Hallo zusammen,

                    habt ihr mittlerweile eine zufriedenstellende Lösung gefunden?

                    Kommentar

                    Lädt...
                    X