8/28/2009 8:53 PM | |
Joined: 10/7/2005 Last visit: 6/6/2023 Posts: 2966 Rating:
|
Dear all I am admittedly a tad bit bored right now (nightshift commissioning coverage and not much is happening), so I thought “why not try to find a useful purpose for the “Block_SDB” parameter type”. As it turns out, I can’t find any use for it, but perhaps someone out there may be able to. My “problem” is really quite simple: I can declare an IN parameter of a FC or FB as type “Block_SDB” and use this to pass on an SDB number into the FC/FB. The thing though is: How could this be useful, or what exactly could I use this for (I guess my question really is “Why does this “Block_SDB” Parameter type exist at all)? While SDB numbers and their meaning are outlined in general by Siemens in the Step7 help, their individual contents/data structure is a well kept secret as far as I know (and let’s face it, we don’t really need to know the SDB contents). My supplementary question is this: Let’s say I would declare a “Block_SDB” parameter as an IN for an FC and pass on for example SDB200 (which contains Netpro configured connection information in an S7-300). Since I cannot “open” the SDB via any direct STL command (i.e. “OPN SDBxyz” is illegal syntax), the only way I know of to get to the data inside of the SDB is via ANY pointer construction and BLKMOV use. In order to do so, one must not only overcome the above mentioned hurdle of knowing the contents/data structure of the SDB, but also the SDB memory area that needs to be declared in the ANY pointer. While Siemens describes the SDB “data type” value for Parameter type formatted ANY pointers (i.e. 1A hex, see ANY pointer help in Step7), they do NOT “reveal” SDB “memory area” value for elementary/complex data type formatted ANY pointers (it is 89hex by the way).
|
Last edited by: fritz at: 8/28/2009 9:02 PMLast edited by: fritz at: 8/28/2009 8:57 PMCheers |
|
This contribution was helpful to
3 thankful Users |
Follow us on