Stephen...
Regarding how to accomplish on-line programming... this has some holes in it, but...
I think the best way to make it happen is to have two duplicate memory areas. At any given time, one, or the other, is the Active Memory Area.
I would expect a single Processor for running the process, and a single I/O Table. That processor would use the code from the Active Memory Area.
There would have to be a separate processor for managing the content of the inactive memory area. That processor should probably also control which area is active.
You should have the ability to SAVE the content of the inactive area either before or after editing. Maybe there should be an automatic back-up function that occurs whenever, and just before, switching to the inactive memory area. This could be very helpful for undoing (back-tracking through) bad code changes that might have happened overnight.
There should be a version manager/tracker. You should be able to restore any saved copy to the inactive memory area.
Now, while in Edit-Mode, the Active Memory Area should be LOCKED ON as Active. When an edit is made... the edit applies only to the Inactive Memory Area. You can edit or create rungs, search, find-n-replace, cut-n-paste,... anything that you could normally do while editing off-line. All changes are written to the inactive memory area.
When you are ready... you simply activate the appropriate function to tell the PLC to switch to the new version. The first thing that happens is that the new code is SAVED to the PC. Then, at the appropriate time (just before the beginning of a scan), the Memory Area Processor switches the Active Flag to the other memory area.
Now, having switched to the new code, the previous version still resides in the other memory area. If you find that you are not satisfied with the results of the edits... you should be able to simply return to the previous version, still existing in the inactive area. Or... if you know what is wrong, you could restore the copy of the saved new code to the inactive area and make the necessary changes.
All of this activity should occur without affecting the scan-time of the currently running process.
Issues...
There would have to be a way to manage current Timer and Counter values. This is a tough one.
It would be great to be able to have the inactive area react to, at least, inputs and control relays - without affecting real outputs. This could be somewhat of a simulator.
Of course... On-Line programming is NOT for everyone. Just as with any programming, you have to KNOW what you are doing! If you don't know what you are doing, then it doesn't matter if you are On-Line or Off-Line... you're likely to break something, or hurt someone.