The solution I posted should work on ANY plc, as it does not use any manufacturer-specific instructions.
But I've spotted a problem with the logic. It will rely on Sw_ON coming on a finite time after Sw_OFF goes off, something that is not always true or consistent.
To that end, I would replace the -|/|- Sw_OFF on the second rung with -| |- Sw_ON, and not bother with the Sw_OFF input at all.
As Gil47 states, A and B are simply internal bits.
The action of the first rung is to produce a one-shot on A from Sw_ON going on. B uis used to deliver the one-shot on A.
This one-shot then acts as a start command for the standard seal-in circuit on rung 2.
Turning the switch OFF (i.e. Not ON), or pressing the reset pushbutton, de-latches the seal-in circuit.