04.10.2017, 23:21
(This post was last modified: 04.10.2017, 23:23 by Erwin van der Zwart.)
Hi,
When you use automatic load on the lib container, all the functions are loaded and running into the background and only a reboot can refresh this loaded PID.
When you disable automatic load and call the functions into a event based script (with require('user.yourlib'), the functions are valid during that event execution,when you update the lib and run the event again, the require will reload the renewed user library. (just like your variables , they are also dropped after the event)
When you require the user lib inside a resident script and start the resident loop and when you change the user lib functions during run, the changes are not loaded until you restart the resident script. (just like your variables , they are kept during running resident event)
So in short, your user lib is only reloaded when a new script (program id) is started and that will trigger a new 'require' of the user lib, automatic load is loading only once the lib.
This is how the controller always have handled the user lib's and variables ..
BR,
Erwin
When you use automatic load on the lib container, all the functions are loaded and running into the background and only a reboot can refresh this loaded PID.
When you disable automatic load and call the functions into a event based script (with require('user.yourlib'), the functions are valid during that event execution,when you update the lib and run the event again, the require will reload the renewed user library. (just like your variables , they are also dropped after the event)
When you require the user lib inside a resident script and start the resident loop and when you change the user lib functions during run, the changes are not loaded until you restart the resident script. (just like your variables , they are kept during running resident event)
So in short, your user lib is only reloaded when a new script (program id) is started and that will trigger a new 'require' of the user lib, automatic load is loading only once the lib.
This is how the controller always have handled the user lib's and variables ..
BR,
Erwin