I am hugely annoyed by the information window which pops up every time a method takes more than 10 seconds to compute.
In particular and most of all, that window steals the focus from any other application currently used on the computer (including writing this post) and blocks a continuous workflow.
Either Siemens succeeds in inproving the performance of its script language or it must be possible to turn that **bleep** window off or at least to alter the time until it pops up.
setInfiniteLoopDetectionTimeout(0) will disable the window.
@ mak, Either Siemens succeeds in inproving the performance of its script language or it must be possible to turn that **bleep** window off or at least to alter the time until it pops up.
as the name "setInfiniteLoopDetectionTimeout(0)" already indicates -it is also intended to detect endless loops in methods
I guess for that "Ctrl left + Alt + Shift" or "Ctrl right + Alt + Shift" respectively exist and allow the user to stop infinite loops when really necessary.
PlantSimulation is not detecting if an endles loop hangs at all. In that case it would recognize if the codelines are remaining the same the whole time long. Even if there is just a print or "UpdateGUI" statement within the loop, the detection resets and starts over without preventing the user from being stuck in an infinite loop.
It is just and only to prevent simulationists from developing those strategies really needed mimicking those algebraic operations not available in PlantSimulation at all.
1. to recognize if the codelines remain the same, the whole time long, doesn't your "detector" have to loop as well ?
2. What about a loop with changing variables in the loop but the end loop condition remains false ?
I assume not necessarily. PlantSimulation is capable of putting class and instance based breakpoints. So there is a mechanism to identify and mark a particular loop (while ... end; / repeat ... unitil ... with start and endpoint.
If the internal architecture still owns a certian flexibility, the begin and the end of the loop can be properly identified and the amount of times tourching the while or until codeline is just supposed to be counted. Tf taht value exceeds a certain limit, a warning can be set instead of just counting the time until a mehod is finished.
By the way, it helps the customer to identify more properly the loop causing an assumed infinite state.
You are right that the window does not only detect endless loops but all Methods that run a very long time. I think this makes sense, because sometimes a single instruction can take a very long time. So you might want to interrupt a sequence of such instructions even if each of them is only executed once. Assume that you call the SimTalk function 'copyFile' several times to copy a bunch of files from a server to your computer, and for some reason the network connection is currectly very slow and this would take minutes. So you might want to interrupt your Method.
Of course you can use Shift+Ctrl+Alt do interrupt your Method, but this is something that a new user might not know, and might therefore kill the process and loose work.
By the way, I am surprised that on your computer the window pops up in front of other applications. This does not happen on my computer. And it should not happen. I am using Windows 7. What OS do you use?