Checking the script variable state - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Checking the script variable state (/showthread.php?tid=1743) |
Checking the script variable state - buuuudzik - 22.11.2018 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. RE: Checking the script variable state - admin - 22.11.2018 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. RE: Checking the script variable state - buuuudzik - 22.11.2018 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 value Thanks for answer |