Hello PLC Team, i just found some very interesting or confusing behaviour while using the debug mode.
this is just some skeleton code to show what i mean. my expected behavior would be that in lines 5 and 8 the value of DoCalibrateFlag would be TRUE.
as my TestCount shows, it enters the loop and counts up, meaning that “IF DoCalibrateFlag = TRUE” (line 8) is fullfilled even though it show “FALSE” as actual value.
Is that because the debugger only shows the value after the completion of that program? is there a way to show the acual values? Thank you very much!
Hi Chriss, you’re correct, the debugger only shows the values at the end of the execution cycle. This is the same behaviour from most PLC’s that I’ve used. It is not possible to change this, and is not really practical - variable values would need to be transmitted from the PLC to the IDE after the execution of every line of code, and then those variable values would need to be matched to a particular line of code in a particular program - this would create so much processing and communication overhead to be unworkable for a real-time program. Martin.