To replace a block in your circuit program with another function block, follow these steps:
Insert the new block above or below the block you want to replace.
Rewire the connecting lines of the old block to the new one as described under "Editing selected connecting lines" in Editing selected objects.
After having rewired all the connecting lines, you can delete the old block and move the new block into this position.
Example for the FBD Editor:
By keeping this block replacement order, you can maintain your connecting lines. If you first delete the old block, you also delete its connections, which means you have to recreate all connections.
In a LOGO! 0BA7 and LOGO! 0BA8 Base Module, you can directly replace an old block by dragging the new block from the block tree to the old block figure with the left mouse key pressed.