Hi, I want to share an application I've made a lot of time ago in order to debug Fanuc programs, it has been years since I developed it, and since many people have asked me about it on my work I want to share it with all of you as I think it can be pretty usseful.
It uses REGEX in order to catch all relevant data and comments from all .LS files.
All texts are in spanish, currently I have not much time to translate it, but I can provide the source code to anyone interested in improving it or translating it... this was developed on my free time as I was very annoyed when trying to follow the program flow on a program.
The current version allows to cross search used I/O, PR and registers given a decompiled .LS program, attached is a screenshot of all avaiable screens:
robot-forum.com/attachment/39290/
First tab allows to see what modules are being detected by the program, if you click on one of the file, it will show some data like the frames that are being used on that file, if it has jumps, movements, i/o read/writes, etc.
Second tab allows to select the MAIN module, after doing it on the left window it will show the call structure of that program, it follows the call procedures and call order.
On the right window it will show the accesed numerical and PR registers, input/outputs.
On the lower side wil lappear the .tp modules that are not called inside a program (so you can delete almost all of that .TP, but take care as this doesn't check if a module is being called by BG Logic)
Third tab allows to filter .ls files that contain any relevant data from the selected fields, so you can search per example where "TOOL 5" or "PAYLOAD 1" is used and it will show all affected .LS files. You can also do it with PR or R registers and make a combination betwheen them.
Lastly, on the fourth tab, there is a table for every PR, R, DI/DO/RI/RO registers, IO and on what modules they are used, pretty usseful in order to search if a register is being used on the program as sometimes you can find registers that have a name, but are not being used.
There is also a table that shows any register that it's being indirectly accessed, but it is a little buggy at this time as it doesn't detect registers accessed by a loop.
This program is provided as it is, you are free to analyze it, decompile, and the source code is avaiable on the -zip file, I will take no responsability about any damage caused by it or by any vulnerability the used libraries may have. You will need Java in order to run it.
There is nothing weird on the code, but just to be sure, do not try to execute it on any corporative equipment as this was developed for personal use.
The only regret I have about this program is that code is a mess, so do not judge me, as it was developed a lot of time ago, a little time after I got into robotics. Now I would do it in another language and with better practices, but at least it still works and I still find it usseful every time I need to deal with weird fanuc programs.
Hope someone will find it usseful, let me know about any issue and I may check it if I have spare time.