Stepping through code is like hitting a break point after each instruction. This is dangerous when debugging motion programs because the outputs are still on.
Or you could look in the event log to see what happened.
Again, if you want you can see everything in the event log. I usually don't so if I am only interested in a couple of variables I do use LOG_EVENT to log a few variables. I do this so the event log doesn't get clutter with stuff I don't want to see.
Look at the even log. Right click and you can see all the options.
Single stepping is not allowed for safety reasons.
Superior debugging should be safe first. How can a PLC check for safety conditions if it is stopped at a break point?
You are comparing industrial debugging with debugging using Visual Studio or similar.
Again, look at the event log options. All commands and results of calculations can be seen there in addition to when the programs move from step to step. Also, you can plot data using the plot manager.
That doesn't bother you?
It is easier to keep track of just one output. Hitting a break point freezes everything. The two are not the same.
I wonder how many people use break points while actually running? If you want options then program in C or C++.
"No PLCs have this function".
I'm going to respectfully disagree again because its just not a correct statement. The Beckhoff PLCs
do indeed have this very same functionality. I know because we use it everyday. It's called
TwinCAT Analytics Logger. I can log every single variable and/or piece of data in the PLC, or just what I want, cycle-synchronous, each data point time-stamped down to the single digit nS on some data (over-sampling terminals for example). The logger can be set on a ring buffer set to whatever time I specify. Recorded data can be saved to a local drive or pushed out to the cloud. The only limitation to data capacity and how much it can record is the data storage capacity of the drive/cloud.
Using the
TwinCAT Scope, we too can set conditions so that the logging and graphing will stop when an event/s is triggered.
We use this tool all the time for that very reason, so that we can view events that happened before the triggered event. In our case, a part that failed in a testing machine. When the part under test fails, we can then look at the data and graph to determine why the part failed and look at the data trends over a period of days, and sometimes weeks. We can go as far back in time as we want really, since we record it all to the cloud. I also use the Scope Tool for debugging a PLC program. Again,
another tool to be used for PLC program debugging!!
You can plot I/O and the results of calculations too.
We only seem to be missing the break points but that is on purpose.
You need to look at the event log options.