I am laboring slowly through debugging a large program spread over 10 of the 16 blocks. I had hoped to start-up/debug block by block but that is way too ambitious. I am having to test-run small groups of lines (up to 6 lines) independently to verify correct operation.
Some debugging tools might be helpful - can anyone suggest anything?
Is there a way to increase the refresh rate? Even with only 5 lines of code running there is a huge latency when waiting to see changes.
Since a later line may be interfering - it would be good to check all the occurrences of a particular input, output or variable. Maybe I need to combine all the program text files together and search the combined file. Very laborious to keep up to date as the code changes during testing.
Is there any such thing as “live” monitoring of the program code during execution. The ladder-logic equivalent is that contacts and coils show as active.
Single stepping?
I realize that debugging difficulty is related to code quality - so maybe I have made life difficult for myself.
Logic Execution:
Lower lines override upper lines as you mention. If you need to see the state of your logic at intermediate lines you can add a global ‘debug’ variable and move it up & down in the program to see the value part way through the program.
10 VAR1 = SOME LOGIC
20 DEBUG = VAR1
30 VAR1 = OTHER LOGIC
40 VAR1 = MORE LOGIC
Live Monitoring:
I typically build a graphical display of all the items in a program. This lets you see the value of all items in the program in one display. I’ll usually have one very busy display with all the items fo debugging and another graphical display with only the important items.
Single Steping:
Agreed, we should have it. It’s on the todo list.
I am always using the manual refresh button!
It would be a great help if it (or a duplicate button) was positioned towards the left end of the toolbar, so that it is accessible when the program code is open. Currently the program window blocks the refresh button from view.
We’re on it, thanks Brian. How about an auto refresh, give it a second or two after sending a program to let the logic run. Then all open screens will automatically refresh the values.
Folks are earning their living in this editor, I used to be one of them. We will make things better.