Virtual item definitions

Virtual item definitions

Virtual items are used like any other server item, except for one detail: they are not connected to any real datapoint on bus level. They can be used to store data. They may be connected to a any other server item.

File location of configuration:

<WorkspaceDirectory>\DataFiles\nxaVirtualItems.40.dat

Since version R2 Build 2071, changes within this definition file are immediately effective after saving. Server restart is not required.

Since version R2 Build 2071, there is second virtual item definition file:

<WorkspaceDirectory>\DataFiles\nxaVirtualItems.VT.40.dat

This file is automatically generated by the template engine of the visualization editor and loaded after the original definition file.

#

Name

Mandatory/Optional

Description

Available since

#

Name

Mandatory/Optional

Description

Available since

1

Name

M

Name of the virtual item. Together with the path it must be unique.

 

2

Path

M/O

Specifies the path of the virtual item and defines where the item occurs in the Item tree. \ can be used to create sub nodes. According to column Absolute Path the item with its path will be placed under node “NETX” or “NETx\Virtual”. If not set, the item will be placed under one of these nodes.

The path is required if Absolute path is set to true!

 

3

Description

O

Description of the virtual item. It will be displayed in the item tree.

 

4

Data type

M

Defines the type of the item. Possible data types are:

  • BOOL

  • STR, BYTE, CHAR,

  • INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64

  • FLOAT, DOUBLE

  • DATE, TIME

 

5

Access rights

O

Allowed operations on the virtual item:

  • RW: read-write (default)

  • R: read-only

  • W: write-only

 

6

Persistent

O

Specifies whether the value of the virtual item is persistent (restored from the database after server start up ) or not. Default is F (non-persistent).

 

7

Synchronize

O

If set to "T", the value is synchronized between the main and backup server (if present). Default is F (no synchronization).

This applies only to main/backup configurations of the NETx Server.

 

8

Link ItemID

O

If a connection to another item is necessary, the item ID of this one has to be placed here (bidirectional link between Virtual item and Linked item).

Note: The type of that item should be the same as defined in parameter Data type.

 

9

On receive LUA function

O

Any LUA script code which gets executed when the OnReceived event occurs.

 

10

On send LUA function

O

Any LUA script code which gets executed when the OnSent event occurs.

 

11

On set LUA function

O

Any LUA script code which gets executed when the OnSet event occurs.

 

12

Comment

O

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

 

13

Absolute path

O

If set to “T”, the Path column will be regarded as an absolute path, putting the item under “NETx”.

If set to “F” (default), the Path will be interpreted as relative path and the virtual item will created in the sub tree “NETx\Virtual”

>= R2 Build 2071

14

Default value

O

Specifies a default value if item is not set on server startup.

>= R2 Build 2071