Code generation (Advanced)
Often, there is a need to duplicate the same logic many times, but with different variable tags. This can be easily accomplished in Logix5000 using Notepad and a simple code generation trick (of the true Logix5000 masters).
In order to complete this recipe, you will need to have completed the previous recipe on Functional Block Diagrams.
- First, we will open our existing Ladder Logic Routine using Controller Organizer and double-clicking on the VALVES routine.
- Select both the valve rungs and copy them to the clipboard by clicking on the numbers 0 and 1 while holding Ctrl and then right-clicking on the rung and selecting Copy Rung (or pressing Ctrl + C).
- Next, open Notepad and paste the following ...