Schneider Electric Exchange Community

Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.

Register Now

By Clicking on "Register Now", you acknowledge that you have read the Privacy Notice for Schneider Electric Exchange.

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

Sharing global variables between Building Expert Lua programs

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?

Product Line

EcoStruxure Building Expert

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 EcoStruxure Building Expert 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

For more information, please reference the EcoStruxure Building Expert Software - User Interface Guide document on the Exchange.

Tags (1)
Labels (1)
No ratings
Contributors