9/19/2014 4:57 PM | |
Posts: 5225 Rating: (1198) |
..okay It would be most helpful if you made a paper drawing of what you want to do. Because I do not understand the WHY, it is difficult for to picture what you need. If I understand you now.. You wish to be able to pass on the "100" of DB100 so that you can do DB(100) later inside your FC. If I understand the indirect addressing that you need, you will have to have non-optimised DB for it to work right. [LINK] I can however not understand why you want to do that.. unless you want to handle not only one type UDT or have several UDT to handle. In my example there is a UDT called in the IN/OUT parameters. You can do the same for an FC. For memory usage the IN/OUT handles the UDT variable as if indirect access. The IN/OUT is not a copy but a pointer. Another alternative you can look at (S7-1500) is the use of VARIANT. This will handle what you want to do.. but yo will have to play around with how it is done. IMHO I would not suggest to take this road of making a cure-all solution. Indirect addressing cause all sorts of issues in the field for in-house technicians. Probably someone else will have other ideas. (HINT: Jens_App, huggy_d1) w |
9/23/2014 9:08 AM | |||||||||||
Joined: 1/5/2011 Last visit: 11/29/2024 Posts: 815 Rating: (123) |
Dear Schrien, please let me quote a part of your first post:
Now let me quote siemens help file:
If you want to use absolute addressing (DB1.DBW0)you should havea data block with standard block access. So what you are trying to do is not possible. Since you are using pointers I guess you gave up the idea of using optimized data blocks. Ithink following thread will be quite useful to you, please take a look at it, I'm sure it will answer some of your questions:
Kind regards, Jens |
||||||||||
Keep it simple and on-topic. |
|||||||||||
This contribution was helpful to1 thankful Users |
Follow us on