How to make different machines the same.
Zombo:
If the only thing you boss messes with are the drawings, make your life easy -- don't use real I/O addresses in your program.
Designate some files/register spaces as DEDICATED to I/O mapping. (I'm partial to B10 for Outputs and B11 for Inputs when working on AB PLCs).
Use those mapped files EXCLUSIVELY throughout your program. NEVER reference the real-world data table
Except in two subroutine. In the first routine, you'll map the real Inputs to your "image table". In the second routine, you'll do the same to your outputs. The first routine will be the first one used in the program, the second one will be called last.
Now when your Boss hands you a "new" I/O drawing for an "old" machine, the only thing you need to change those two programs files, and you're golden.
Lots of advantages to this way of working:
- If things get changed at the last minute ("We need to move THIS subsystem to THAT side of the plant, and wired into THAT subpanel."), it doesn't cause major reprogramming (or fear that you forgot something in a search/replace)
- You can start programming, and HMI-ing, while the boss takes his time making drawings. You only need the LIST of I/O, not their location.
- If you've got a spare PLC lying around, and time to play, you can use it to do message reads of your B10's, simulate the plant, and message write to the B11's. You just disable those two subroutine calls, and watch the process at work. Simulation is an excellent way to find bugs in your code and/or HMI. And you don't have to worry about removing any simulation logic, or having having a big enough PLC to handle the extra logic - it resides in another PLC. (And, since your simulator is using those internal addresses, HIGH LEVEL will be the same for ALL you systems - no need to rewrite the simulator between jobs.
Anyway, good luck with your boss.