Hi.
I have a problem with calling the setting of a tag from a button in perspective to true for 5 seconds. I would like to set the tag to true for 5 seconds and then have it return to false after 5 seconds. I manage to set tag to true, but it does not return to false after 5 seconds.
My code under the mouse event button
system.perspective.print("Start script:")
tagPath = "[Ignition_IO_01_NE_KRASNOPOL]NE_KRASNOPOL/LV_On"
system.perspective.print("Set path")
system.tag.writeBlocking([tagPath], [True])
system.perspective.print("Set tag")
system.util.invokeLater(
lambda: system.tag.writeBlocking([tagPath], [False]),
5000 # opóźnienie w milisekundach
)
system.perspective.print("Reset tag")
Unfortunately the variable does not return to false after 5 seconds