Detect changes in analog value

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • madito
    Extension Master
    • 03.07.2017
    • 131

    #1

    Detect changes in analog value

    Good Morning,

    I am trying to make a delay when I detect a change in an analog input value.

    Would you know how to do it easily?

    Thanks!
  • Labmaster
    Lox Guru
    • 20.01.2017
    • 2574

    #2
    Easiest way to detect changes of a analog value, is to feed the analog value to one input of an "Unequal" comparison block, on the other input you feed in the same signal but a little bit delayed (at least two processing cycle delayed). As delay you could use "memory flags" set to analog with a delay of '2'.

    BTW:
    theoretically 1 processing delay cycle should be enough but it seems there is a bug in the loxone system when processing analog signals, so i found out that 2 cycles are needed for a constant result.

    Klicke auf die Grafik für eine vergrößerte Ansicht  Name: Unbenannt_1.JPG Ansichten: 0 Größe: 14,8 KB ID: 237225


    Klicke auf die Grafik für eine vergrößerte Ansicht  Name: Unbenannt_2.JPG Ansichten: 0 Größe: 42,0 KB ID: 237219

    How to delay something then, depends on what exactly you have to delay.
    Zuletzt geändert von Labmaster; 23.02.2020, 12:52.

    Kommentar

    • duncan
      LoxBus Spammer
      • 28.08.2015
      • 313

      #3
      something like this
      Angehängte Dateien

      Kommentar

      • Labmaster
        Lox Guru
        • 20.01.2017
        • 2574

        #4
        duncan
        be carefull, your shown solution is not save against short analog changes, means changes that are shorter than the configures pulse time of the impulse generator, where shorter pulse times may generate higher load on the system.
        Zuletzt geändert von Labmaster; 23.02.2020, 12:47.

        Kommentar

        • madito
          Extension Master
          • 03.07.2017
          • 131

          #5
          Zitat von Labmaster
          Easiest way to detect changes of a analog value, is to feed the analog value to one input of an "Unequal" comparison block, on the other input you feed in the same signal but a little bit delayed (at least two processing cycle delayed). As delay you could use "memory flags" set to analog with a delay of '2'.

          BTW:
          theoretically 1 processing delay cycle should be enough but it seems there is a bug in the loxone system when processing analog signals, so i found out that 2 cycles are needed for a constant result.

          Klicke auf die Grafik für eine vergrößerte Ansicht Name: Unbenannt_1.JPG Ansichten: 0 Größe: 14,8 KB ID: 237225


          Klicke auf die Grafik für eine vergrößerte Ansicht Name: Unbenannt_2.JPG Ansichten: 0 Größe: 42,0 KB ID: 237219

          How to delay something then, depends on what exactly you have to delay.
          Perfect!!!! Thanks

          Kommentar

          Lädt...