KB-44059: Creating a 1-second pulse button.

Question:

How can I create a button whose pulse lasts 1 second?

Solution:

To do so, you must use a Counter Tag, and set it up as described:

CounterType: 0 – Preset
Enable: False
Increment: 1
Preset: 1
ResetCounterWhenEnabled: True

On the button generating the pulse, use a script that activates the desired output, and then enable the counter.

Sample script:

Application.GetObject(“Data.InternalTag1”).Value = 1
Application.GetObject(“Data.CounterTag1”).Enabled = True

On the Counter Tag’s OnPreset event, use a script to both turn off the output previously activated and disable the counter:

Parent.Item(“InternalTag1”).Value = 0
Enabled = False
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 1 / 5. Count: 1

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *