Display used POUs / libraries

maauto
2009-09-01
2009-09-22
  • maauto - 2009-09-01

    Hello,

    I have a project that needs a lot of cleaning up (was started as an experimantal application). The "problem" I have is that there are a lot of libraries included in the project that are not actually used and need to be removed from the library manager. Finding out which ones need to remain and which ones need to go is a bit difficult and time consuming though....probably just because I don't know how to do this better.

    Is there any way of finding out if there are any resources used from a certain library or not ? For example now I delete a library I think is not being used and recompile everything to see if it's still ok. Sometimes I find out that there's a data type or a POU being used and I have to go a step back.

    Thanks in advance for your help.

     
  • t.lundahl - 2009-09-15

    Hello maauto,

    I don't think my answer will help you but, if you had been useing functionblock's and the code is not used in the POU, it will be little gray.

    You can also use "Exclude from build" but this of course is only when you want to exclude a program or functionblock.

    Also check "Show call stack" on the Online menu, don't know what it does.

    /TorbjΓΆrn

     
  • maauto - 2009-09-22

    Actually you pointed me in the right direction...

    If you check the "Exclude from build" list, there are libraries listed too (including the POUs, datatypes, variables etc. contained in them). Those items too are gray if they are not used and black if they are used. So in other words, it is possible to expand and drill down every Library and manually check if any of its items are being used or not. If none are used I presume it is safe to remove the library from the project, not just exclude them from the build.

    This solution is not a perfect one, however it's much better than going back and forth trying and testing if a certain library is used or not. Would it be so difficult to at least color the library names gray or black the same way POUs are...and the very same way the contents of the libraries are marked in the "Exclude objects" dialog are ? I mean the data is already there, it's just not being displayed.

    (Using Codesys 2.3.9.5...maybe this is already solved in a later version ?)

    ---Added later---

    Oh, and the "Show call stack" option is for debugging purposes when working with breakpoints. It shows the call stacks of the POUs that are currently active...for example if you insert a breakpoint in a FB that is called 4 times during a PLC cycle, you are going to get 4 break-points, but each time with a different call stack (it's the same as thinking about which instance of the FB the breakpoint has been currently activated for)

     

Log in to post a comment.