A quick note...
The OUT instruction works like this:
- If rung in condition is TRUE, set the attached address (in your case, Y212) to 1
- If rung in condition is FALSE, set the attached address (in your case, Y212) to 0
The RST instruction works like this:
- If rung in condition is TRUE, set the attached address (in your case, Y212) to 0
- If rung in condition is FALSE, do nothing
You typically don't use OUT and RST instructions together (there are exceptions, but this is not one of them). You use SET and RST together. SET works like RST:
- If rung in condition is TRUE, set the attached address (in your case, Y212) to 1
- If rung in condition is FALSE, do nothing
In your example above, assuming T1 is true, Y212 will be set to 1 at the end of rung 3. Then, for as long as you hold the button down, Y212 will be set back to 0 at the end of rung 5. So when you get to the end of your program scan, and the PLC writes the output states to it's hardware outputs, the output will be OFF.
But as soon as you release the button, rung 3 will still quite happily set Y212 back to 1 for as long as the T1 contact is true.
From your posts, I'm assuming that you only want the light to come on ONCE when T1 is triggered - and then, having pressed the button and turned it off, you don't want the light to come on again until T1 is reset, and then times out again. Am I right?
If so, change the OUT to a SET and use a rising edge trigger for the T1 contact. When the T1 contact goes from false to true, it will once and only once set Y212 to 1. When you press the button, it will set Y212 to 0. For Y212 to be set to 1 again, T1 will have to go from true to false and back to true again.