Task definitions

Task definitions can be used to react on value changes of server items by initiating actions that may change the value of other item(s) or execute other tasks. Using this mechanism it is possible to relate two server items to each other – even when they are located at networks that use different communication protocols. For example, it is possible to link a KNX datapoint to a BACnet datapoint. In addition to a simple mapping of datapoints, it is also possible to process and modify datapoints. By defining LUA script functions that are executed when a task is triggered, any control functionality can be implemented that is performed whenever the specified task condition is triggered.

File location of configuration:

<WorkspaceDirectory>\EventFiles\nxaTaskDefinitions.35.dat

Changes within this definition file are immediately effective after saving. Server restart is not required.

 Name

Mandatory/Optional 

 Description

 Name

Mandatory/Optional 

 Description

Source Item

M

Specifies the Item ID of the source Server Item that triggers the task.

Destination Item

O

Specifies the Item ID of the destination Server Item that may be changed by the task.

On receive

O

If set to T, the task is triggered when the NETx BMS Core Server has received the value of the specified source item from the fieldbus.

On sent

O

If set to T, the task is triggered when the NETx BMS Core Server has sent the value of the specified source item to the fieldbus (WRITE operation).

On set

O

If set to T, the task is triggered when the value of the specified source Server Item is internally set (SET operation, e.g. by a BMS Client).

Delay in ms

O

Here, a delay (in milliseconds) for executing the task can be specified.

Command

O

This parameter is used to specify the action that is performed when the task is triggered. Currently, the following actions are supported:

  • WRITE: the server will generate also a write telegram for specified destination server item with the source value.

  • WRITE_VALUE: the server will generate a write telegram for specified destination server item with the value provided in parameters.

  • READ: the server will generate also a read telegram for specified destination Server Item.

  • SET: the server will set the value of the specified destination server item with the source value.

  • SET_VALUE: the server will set the value of the specified destination server item with the value provided in parameters.

  • SCRIPT: the server will execute a LUA script function. The name of the function is specified within the column parameters.

Parameters

O

Is used to define the LUA script, which gets executed. Use nxa.InputValue, nxa.SourceValue and nxa.WriteDestinationValue for general access of source and destination value in the script.

Comment

O

Optional comment of the task definition. The value is only used for documentation purposes.

On reset

O

If set to T, the task will also be triggered when the source item gets reset, i.e. the quality is set to not GOOD (UNCERTAIN or BAD).

Processing workflow

  • Incoming data: data is received – OnReceive trigger – value is set in item tree – OnSet trigger

  • Write data: value is set in item tree – OnSet trigger – value is sent to driver, sending confirmed – OnSent trigger

  • Set data: value is set in item tree – OnSet trigger

 If multiple triggers are set for a task the server will only trigger on the first occasion.

Related pages