RMA
Member
The project I'm working on at the moment is my first large Step7 project (at least where I've been responsible for the organisation of the project structure).
As a result, since I'm now up to over 200 blocks and still adding blocks, although I thought I had spread stuff out fairly well, things are starting to get a bit full. This means that I can't allways put related blocks adjacent to one another. It's a particular problem with the DBs, because I like to give the Instance DBs the same number as the FB, indeed the FM352-5 insists on it - the software will allow you to specify any number you want, but at run time, in "Debug" mode, if it finds a DB with the same number as the FB, it uses it regardless - with obvious consequences! In "Normal" mode, there is no problem, because the program which is downloaded into the FMs FPGA has a completely different structure and don't use DBs as such.
Adding to the problem is the fact that the Siemens library blocks use the same numbers several times over. I don't like changing the numbers, because it's then not necessarily obvious at a glance which are my program blocks and which are Library blocks.
I'm toying with the idea of banging all my blocks up to numbers of 500 or a 1000, leaving the bottom area for Library blocks with the scheme (say) Comms Blocks - 0xx, IEC Function blocks - 1xx, Miscellaneous blocks - 2xx etc. Then start my own FBs at 5xx, FCs at 6xx etc. The other question is whether its better to split FBs and FCs well away from one another, or rather keep functionally related blocks together whether FB or FC (although I think that might lead to problems with the Instance DBs, again)?
If I'm going to change something like this in a radical way, I need to do it in the next few weeks, before the first Module goes out the door. The structure needs to be well thought out and flexible, because so far I've mainly had to concentrate on basic system functionality and HMI. What will come up as I start adding error monitoring, messaging and logging, I hate to think!
Have any of you guys who have done big programs developed some sort of logical structure to solve this problem? Any suggestions and thoughts (especially about any points/consequences I haven't thought about) will be extremely welcome!
As a result, since I'm now up to over 200 blocks and still adding blocks, although I thought I had spread stuff out fairly well, things are starting to get a bit full. This means that I can't allways put related blocks adjacent to one another. It's a particular problem with the DBs, because I like to give the Instance DBs the same number as the FB, indeed the FM352-5 insists on it - the software will allow you to specify any number you want, but at run time, in "Debug" mode, if it finds a DB with the same number as the FB, it uses it regardless - with obvious consequences! In "Normal" mode, there is no problem, because the program which is downloaded into the FMs FPGA has a completely different structure and don't use DBs as such.
Adding to the problem is the fact that the Siemens library blocks use the same numbers several times over. I don't like changing the numbers, because it's then not necessarily obvious at a glance which are my program blocks and which are Library blocks.
I'm toying with the idea of banging all my blocks up to numbers of 500 or a 1000, leaving the bottom area for Library blocks with the scheme (say) Comms Blocks - 0xx, IEC Function blocks - 1xx, Miscellaneous blocks - 2xx etc. Then start my own FBs at 5xx, FCs at 6xx etc. The other question is whether its better to split FBs and FCs well away from one another, or rather keep functionally related blocks together whether FB or FC (although I think that might lead to problems with the Instance DBs, again)?
If I'm going to change something like this in a radical way, I need to do it in the next few weeks, before the first Module goes out the door. The structure needs to be well thought out and flexible, because so far I've mainly had to concentrate on basic system functionality and HMI. What will come up as I start adding error monitoring, messaging and logging, I hate to think!
Have any of you guys who have done big programs developed some sort of logical structure to solve this problem? Any suggestions and thoughts (especially about any points/consequences I haven't thought about) will be extremely welcome!
Last edited: