RMA - thanks for the link to S7Guy's description. This is a thought provoking thread and should be required reading for anyone looking to improve their understanding of Step 7.
Your comment confuses me though,
The significant part about it is that he recalculates his offsets etc. in a Block called by OB100,so that he can modify the parameters in his UDTs without having to rebuild any of the other blocks (apart from the program mods, of course).
If you modify the structure of the UDT, a recompile of all blocks is suggested - thus all blocks that reference the
UDT will be rebuilt.
My approach is to use a DB for each 'object'. The DB gets populated with similar configuration and process data, but,
once a variable has been allocated an address in the DB, that address is then "set in stone" and cannot be used for anything else. Extra functionality means the DB grows in size. Pointers (to other DBs if neccessary) are used if large amounts of process data needs to be referenced. Using the same address in each DB means the FC's and FB's that reference the data do not need to be changed if the DB is expanded. Similarly, any GUI devices that reference the data in the DB will not need modifying. When processing my list of objects, the DB number changes instead of pointing AR2 to a different area of a DB. (Code is written to control a range of machines with similar control systems on them, not a new project everytime)