Can i debounce signals in ignition?

Hi
I have values coming to Ignition from Kepware which is connected to various machines.
Is there a way to debounce some of the signals before they trigger a gateway event script?

I assume the best place to debounce would be in the PLC itself but i don't have any access to it.

Somebody in the forum mentioned using an alarm functionality which can then trigger some functionality but i am not sure if this is good solution for me as i need to trigger transaction to the external database and i am aware that this code should not be placed in the tag event change area/alarm event change.

The correct place should be gateway event script area.

Please comment or correct me on anything.
Best Regards

Set a deadband on the tag in Ignition? Or is that not quite what you had in mind?

1 Like

that would work for analogue signals but is there anything for digital signals as well?

Hmm. Can’t think of anything for real-time values. How would expect it to work? Just needs to be on or off for some amount of time before actually changing?

yes exactly - signal needs to be ON for 1s or 2s before it is valid to trigger gateway event script. That debounce should be done in the PLC normally and there are quite a lot of these signals.

What if you put an alarm on the tag in Igniton with a 1 or 2 second delay and then run a active alarm change tag change script instead of a gateway script?

Hmm. Nothing pre-made for this, and now that I think about it a little deadband even for analogs isn’t the same thing either.

I do wonder if multiple tags for bookkeeping and some tricky scripting, packaged in a UDT, could get something working… but is it worth it?

1 Like

thank you for thinking about it. I believe there is scripting workaround for this like you mentioned. At the moment trying to explore various options as i could not find any debouce parameter in kepserver either

When you are doing things in Ignition that really belong in a PLC, you should structure your algorithm the way the PLC does, though typically at a slower pace. In other words, write a gateway timer event that performs the equivalent of a periodic task in the PLC. Record state (prior values, timestamps, etc) in memory tags. Then implement your debounce "logic" using jython.

Such a state machine can call out to other "event routines" as the output of your debounce logic.

1 Like

If you have the SFC module this would be trivial to implement.

1 Like