Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Description

This example shows how to convert values of Datapoints between different units e.g.(from Watt to KW). The conversion can be handled with LUA function. The output value can be written to any selected item(Virtual items or VAR\Real items). The function reads the incoming values and converts them into any related measurement

Creating a new LUA function

First, we will create a new LUA function which verify the item value and sends an e mail if it is out of limit. Within the toolbar of the NETx BMS Core Studio, click on the "Edit Script" button.

image2019-7-17_10-58-2.png

Afterwards, you can select the "nxaDefinitions.lua" to open the main LUA file. Paste in the following code at the end of the file: 

LUA
function converter()
local var=nxa.GetValue(nxa.SourceItemID())
local cal= var/1000 
nxa.SetDestinationValue(cal)
end



  • No labels