Gateway events - how to disable in code

hi all
I have ignition gateway reading tags from kepware with over 20 plcs and a lot of gateway events triggered on tags. I wonder what is the most robust way of checking if the tag is available to read in case some plcs are off? Kepware system tag indicating connection takes a few seconds to time out so its very slow. Also there seem to be no way to disable gateway event in case plc is off so some code inside gateway event has to execute - is it right?

Yes, you cannot disable a tag's events unless you disable the tag itself. But any such event can read a boolean memory tag and only run the rest of the event code based on its value. Or some such setup.

1 Like

Hi Phil did you mean tag or gateway event?

Some things that come to mind:

  • Use a heartbeat, check how long sincle last change.
  • Check the quality of the tag you're triggering from.
  • Shorten the timeout on the Kepware system.
1 Like

just reminded myself that gateway trigger can use quality change as a trigger so if tag quality is different than 192 the data is not reliable. in the gateway tag change script i could check the code before doing anything. The problem is if there are 20 plcs and some of them stop talking it might choke the driver which will stop processing altogether - i saw it happening.
Just wondering how to deal with this scenario? Maybe if connection fails then the script should disable whole kepware device to prevent driver from choking but then how to i enable it again? maybe i should keep checking just 1 tag from each plc when there was communication fault...

Use auto-demotion on the devices in Kepware. Page 8.

1 Like

fantastic idea about demotion - just reading more about it.

Also probably using 20 channels with 1 PLC device inside will be better than 1 channel with 20 devices because in my understanding these channels are separate and 1 cannot block the other which faulty device can derail the whole channel.