Knowledge Base
Showing results for 
Search instead for 
Did you mean: 

Sharing global variables between SmartStruxure Lite Lua programs


Is there any way I can transfer a value between 2 LUA programs without using a BV or AV?


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?


SmartStruxure Lite

Lua programming


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.)


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

Tags (1)
Labels (1)
No ratings
Version history
Revision #:
1 of 1
Last update:
‎2018-09-11 08:04 AM
Updated by: