Duplicating applications in CCB AC800M
Hello everyone. Can somebody give me an advice how to duplicate an application (together with its controller) within one project (the technology has two almost same units)?. What I have already tried:
- save copy as - applicated on application and controller as well - result: connections (mainly in IO units) between applicationa and controller defined in controller configuration are lost - it must be filled in again
- make spare copy - applicated on original application and controller, then renamed these to new ones, then created new application and controller with original names and applicated reopen from spare copy - result: the new application is still somehow connected to the original one and when i wanted to remove this new one, the original one was removed instead!
Thanks in advance for any help.
> "Can somebody give me an advice how to duplicate an application"
Program the application as a "Library Type". This means you only write the application once, but run two (or more) separate copies of it. This has several advantages ...
If multiple copies of the program run in the same CPU then you save Memory - A LOT of memory. Only one real copy of the program exists in the CPU, the other application uses only the memory required to store the variables used by the program.
If you bug fix one program, you automatically bug fix ALL the copies. Its the same program.
If you have minor differences between the two instances of the program, then write the program to work for BOTH cases. You can enable / disable small pieces of different code with "CASE OF" statements or IF/THEN logic ( CASE typically produces much cleaner and easier to read code)
If you need to use one identical application for two or more controllers in a project, you could use save copy as for Application - save the new renamed application in the same project folder.
Then insert the copied application in the project. You need to connect the application to the new controller, then change the task connection.
Finally you need MANUALLY to enter IO connection of the variables. That is not so difficult - you can use different ways - documentation, then replace the names of variables (only first part - e.g. PLC1. replace with PLC2.), then paste the variable list in new modules.
Or direct copy/paste/replace procedure in CBM for each module - 10 minutes.
That is my experience on the issue.