MVP 2022 Flex727 Posted December 3, 2012 MVP 2022 Report Share Posted December 3, 2012 I can't seem to find this information anywhere in the Help file. What is the maximum number of ladder rungs (nets) allowed in a subroutine? I am using Visilogic 9.4.0 and V570. Quote Link to comment Share on other sites More sharing options...
Emil Posted December 3, 2012 Report Share Posted December 3, 2012 It's 256. And we highly recommend not to come even to the middle of this quantity. It's much better for you to divide your project to clear, relativelly short subroutines. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 3, 2012 Author MVP 2022 Report Share Posted December 3, 2012 Is there some other limit beyond just number of nets? Visilogic is giving me a compile error on one subroutine with 118 nets (including the RET). The error message says "Subroutine ladder data size exceeds limit. Split subroutine to solve problem". It says it is "Type/Num" 55. It's no problem to split the subroutine, just want to know what I'm dealing with here. Quote Link to comment Share on other sites More sharing options...
Walkerok Posted December 4, 2012 Report Share Posted December 4, 2012 I have gotten this same message on programs that are well under the known ladder size limit. I believe the reason is that in the programs this has happened to me in have a large number of nets that have multiple rows of actions within that single net. I have never taken to adding it all up but I believe that if I were to add all of the program rows (not the number of nets) it may exceed the 256 limit. Just a guess, but empirical evidence says that there is definately another limit other than just the quantity of nets. Keith Quote Link to comment Share on other sites More sharing options...
Emil Posted December 4, 2012 Report Share Posted December 4, 2012 In fact YES - there is another limit - the volume of the compiled code per subroutine. I don't remember what is the value, but it doesn't matter in fact, as it's very difficult (practically impossible) to measure this value. Again my advices - write simple rungs; - put one rung per net; - split the code to short, logical, easy to edit and debug subroutines. In my opinion, it's not difficult to follow these advices and the programmer can only win. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 5, 2012 Author MVP 2022 Report Share Posted December 5, 2012 This makes sense. In my case, almost none of the nets have more than one row, but most of them have 3 Data Table function blocks each. This subroutine creates a viewable log file using data tables. Because of the complexity of the equipment this program is controlling, this subroutine was larger than I normally need. There may be a more efficient way of doing what I'm trying to do using available Vision functionality, but I haven't figured it out yet. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.