HOWTO: detect value change (single block solution)

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • J V
    LoxBus Spammer
    • 28.08.2015
    • 384

    #1

    HOWTO: detect value change (single block solution)

    Hello,

    There is a single block that allows you to detect a value change: it is the "Pulse by" block in "Comparisons": https://www.loxone.com/enen/kb/pulse-by/ (Loxone Config 15.05.29)

    It takes a single text input and allows you to define 4 search patterns. However, if you set the search pattern to the wildcard *, it will trigger whenever the input changes (setting one search pattern is enough).
    The input is a text input, so you can run your input via "status" block which outputs the value as a text field, but even that is not necessary: you can directly link an analog or digital output to the "Pulse by" block.

    (I had the question a long time ago, and then the advice was to use an analog memory and set a time delay on it. I don't know if the Pulse By block is new, but I just came across it and wanted to share it. )

    Just for completeness: if you want to detect a change of a digital output, the "edge detection" block in "Logic" allows you to gain triggers on switching on, off, or any toggle.

    Jörg
  • Labmaster
    Lox Guru
    • 20.01.2017
    • 2744

    #2
    The "Pulse by" Block is relatively new and was not available on older configuration versions.
    It's nice to know, that it will even work on analog inputs but i would not trust this behavior for future Config version until this is explicitly stated in the official Loxone documentation.

    The most reliable (official) way for analog values (until now) is still, to compare a actual analog value with the same but delayed value. (at least one SPS machine cycle delayed)

    Hopefully Loxone will extend their official use of the "Pulse by" Block to analog values.

    Kommentar

    • J V
      LoxBus Spammer
      • 28.08.2015
      • 384

      #3
      The problem is that the most reliable way requires everything to be put in analog memories, which - if you have a number of them - really starts to add up and looks messy with the comparison... :-)
      In my case, the input for the pulse-by came from a status block text output, but I tested it also with an analog value out of curiosity.

      So far I believe that all blocks that take a text input also allow an analog value and treat it as expected, but you are right that it may not stay like that (esp. as the input is labelled T, not I)... Passing the analog value via a status block that outputs the value as text should be enough to perform the conversion and stay within specifications.

      Kommentar

      Lädt...