User manual
Scripting
9
The script is now executed promptly and after each start of the system. Should it crash
for any reason, it will be restarted. Here, there is a pause of one second to prevent a
system from being blocked due to an erroneous script. The script can be stopped via
“svc –d / service/myscript” and be restarted via “svc –u /service/myscript”. If it is meant
to be removed permanently, the above directory can simply be deleted (“rm –rf /service/
myscript”) without touching on the original (“/var/ipcore/myscript/myscript.py”).
Lua scripts are executed by interpreter lem. This is a Lua interpreter already offering
Modbus support and some auxiliary functions. The configuration file of the Modbus server
is transmitted to lem as a parameter, simplifying to select the appropriate port and IP
address of an individual bus in your script.