Momentary Pushbutton latching ON

We've had some issues with Ignition tags latching ON, while the PLC set the bit to OFF.

In our case, a bit would be set with a one-shot button (the button would show "writing..." as text).
The PLC would then reset the bit after 100ms, but occasionally, the button would hang on "writing...". I was never able to do 10 writes in a row, without hanging.

Starting the Designer, and looking at the tag browser, we could see the tag was still ON. But when using the OPC client, the tag was OFF. Clicking the bit in the tag browser did reset it in the GUI.

We've found the problem was with the "Read After Write" setting. Disabling that setting makes the button work correctly, albeit somewhat slower.

This is the setting with which we can reproduce the problem reliably.

My theory is that the forced read was fast enough to see the bit in an ON state. But was followed immediately by a regular polling read reading an OFF state. Both reads were send more or less in parallel to the server, where the OFF message seems to have overtaken the ON message.

As the last message was showing an ON, and no new changes happened in the PLC so no subscription updates occured, the tag remained in an ON state.

Notice that the scan rate is larger, but in the same order of magnitude as the reset time by the PLC. AFAICS, this helped in creating almost simultaneous messages overtaking each other.

Given how the "read after write" setting is only useful when Ignition and the PLC write to the same bit (in different states), but it can cause Ignition to hang on the wrong bit, I don't really understand why that setting is useful, or when it should be used.

This does show some extra dangers with "one shot" button, and that not only the "momentary" button has a possibility to hang.