Tag Change Monitoring Script

Hello World :laughing:

I have Boolean Tag from a PLC which is set to True and our SCADA / Ignition needs to set it back to False. I am not very familiar with python scripting yet, may some of you can help.
It is like a handshake between the PLC and the Gateway.

I created this gateway event script ( tag change) and it is triggered when the value has changed

[quote]value = system.tag.read(“SPS08/VISU/08_Lebensbit_SRV1”).value

if value == True :
system.tag.writetotag (value, False)
[/quote]

This would be the way to do it

if not initialChange: tagPath = "[default]SPS08/VISU/08_Lebensbit_SRV1" value = system.tag.read(tagPath).value if value == 1: system.tag.write(tagPath, 0)

You need to include the provider name in the tagpath since this is a gateway script. Also, in your script you created a variable of “value”. You cant pass “value” into your tag.write because that variable returns the value of the tag in your tag read.