24.11.2020, 07:46
Restarting the script during execution can break the semaphore status. My suggestion is to use only one resident script that combines RS485 and localbus for monitoring certain objects and writing to the port when values change.
You can also use string.char instead of string.format so you don't have to worry about the format string having correct number of elements.
You can also use string.char instead of string.format so you don't have to worry about the format string having correct number of elements.