12/30/2019 7:08 AM | |
Joined: 10/7/2005 Last visit: 9/6/2024 Posts: 3018 Rating:
|
Hello Mattias so you have indeed created DB3 as "DB of Type" UDT1. Nothing wrong with this in general, although even I am admittedly struggling to find a way to make DB3 now a usable actual parameter for the FB's UDT1 declared IN_OUT. While someone else may be able to find a way to make this work (if this is indeed supported), here's a different approach and fix that you can apply right now.
Attached pic has an example and you can of course have multiple variables all of the same or different UDT types in one DB this way. Before you do so, there's also something else to be aware of: S7 300's and 400's gobble up code/runtime when complex parameters are used as FC or FB parameters and the thread Shall UDT make the difference in CPU scan time has more on this. This may - or may not - matter in your particular application, but it is worth noting nonetheless. Hope this helps and happy New Year back. |
Cheers |
|
This contribution was helpful to
1 thankful Users |
Follow us on