I typically separate my logic:
LAD 2: MAIN. file number two always runs. All other LAD files must be called in order to run. This allows you to pick and chose which ones you want to call. I almost never have conditional subroutines, So in LAD 2 there will be unconditional JSR (call subroutine) instructions for all the other ladder files.
LAD 3: INMAP. This is where I take the real world inputs and copy them into internal bit addresses. This file is often written last. I might want to get all the actual controlling logic. For a small system, I may also put any HMI mapping here too. For a larger system, I may have a whole separate routine for mapping the HMI or SCADA addresses and handling any necessary logic that needs to be there to manipulate values, etc.
LAD 4: Logic: This is where the meat and potatoes of the control logic goes. I may have just one main logic file or twenty. It sort of depends on how big is the project. If you have two or three more or less isolated tank/pump systems, put each in its own file.
LAD 9: OUTMAP. This is where I take the results of the other files which end up in internal addresses and copy them to the real world outputs.
There may be other files dedicated to things like RADIO MSGs or what not.
Data Files:
Expand your data files. Make them bigger than you need. Add extra ones. You have to do this offline, and if you get to a running system and need to add stuff without shutting down, it is always nice to have room to do it orderly.
I have some habits here:
Always add a spare of each main type like Floats, Longs, Ints, Bits, Counters, etc. I rarely use string files, but I always have one in there . . . just in case...
N10: This is my favorite file number for Output Mapping bits
N11: This is the file number I seem to always choose for Input Mapping bits.
N20: Output values from the PLC to the HMI/SCADA
N21: Inputs from the HMI
N30: Message Data to another controller
N31: Message Data from another controller
These are just examples, you can do what ever you want, but it is good to have some sort of a system and consistency.
Each time you add a file, be sure to make it plenty big enough for future expansion. If you are worried about memory use, you can Verify the Program (right click on the "Program Files" folder icon) and then double click on the Controller Properties to see how much memory is used and still free.
By using internal addresses for your ladder logic, you can write your code and even test it to a large degree without having to worry about how the real world inputs and outputs are going to end up being wired. You can fill in the input and output map last and make changes to said "maps" without greatly affecting your actual control algorithms.
The only references to the real world inputs and outputs will always be located in my "INMAP" and "OUTMAP" ladder files. Throughout the rest of the program, I work with the mapped addresses. By mapping, I simply mean: