This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Checking the script variable state
#1
This is a little question for admin:

is there a possibility to check the state of specific global variable from specific script?

In the past I've hasn't know that in Resident and Scheduled scripts variables can be saved to next computation so this is the next question. Because e.g. I have script with pid controllers and it would be great especially for debugging or realtime checking where there would be such possibility e.g. script.getvalue('PID computation',  'pids').

Yes I know that I can add some log() in code but then I must restart script and all current pids would have default values.
Done is better than perfect
Reply
#2
Each script runs in a separate OS process. This means that you cannot access variables of any script from the outside. Logging will work without restart if you add log calls to the main part of your script. Logging in libraries or in script parts that are initialized once will not work unless script is fully restarted.
Reply
#3
Yes, I understand, and maybe more case was how log current global variable state which has current calculated after a lot of script execution value without adding log() because then I must restart script and this varable will have default valueWink

Thanks for answerSmile
Done is better than perfect
Reply


Forum Jump: