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.

LUA compilation does not work?
#2
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
Reply


Messages In This Thread
LUA compilation does not work? - by puntukas - 04.10.2017, 20:33
RE: LUA compilation does not work? - by Erwin van der Zwart - 04.10.2017, 23:21
RE: LUA compilation does not work? - by admin - 05.10.2017, 09:27
RE: LUA compilation does not work? - by admin - 05.10.2017, 10:22

Forum Jump: