Issue
Is there any way I can transfer a value between 2 LUA programs without using a BV or AV?
Example:
A Lua program (PG1) is created to turn on lighting, a variable called LightOn is created but other Lua programs PG2, PG3, PG4 cannot reference the "LightOn" variable.
Is there any way a variable from one Lua program can be accessed from another Lua program?
Environment
SmartStruxure Lite
Lua programming
Cause
Each PG script has its own dedicated environment, which basically means variable names cannot be shared between scripts. The only things that can be referenced are actual objects (AV, BV, etc.)
Resolution
An AV or BV object will need to be created within the SmartStruxure lite controller to store the value and make it available for other programs to read. For example a BV1 could be created and read from or written to by multiple Lua programs by referencing ME.BV1
If there is a requirement to share data between SmartStruxure Lite Managers then please refer to the section entitled "Accessing Remote Objects" of the Lua4C Extensions document on the SmartStruxure Lite documentation centre