Scripting a button press to turn on a PLC tag

This forum post gives a good solution;

It's best to have a button set the value to 1 using a script. (Right click the button -> Configure Events, then use the system.tag.writeBlocking() function to write to the tag). Then program the PLC to reset the value back to 0 after a given time.

If you want to do this only from ignition, refer to the forum post and use some form of sleep() or threading.Timer to write a 0 back to the tag after a specified time.