...
This function adds a new System Custom Item during the initialization phase of the server and returns its ID. Compared to a normal custom item, a system custom item can be placed anywhere in the item tree. In general, this function shall be used within the OnInitEvent OnInitEvent callback only. Compared to the function nxanxa.AddSysCustomItemAddSysCustomItem, the flags for Persistent Persistent, Historical Historical, and Synchronziation Synchronziation can also be set.
Example
The following code creates an item within the branch NETx\XIO\My:
Code Block |
---|
nxa.AddExtSysCustomItem("MyItem1", "Test", nxa.access.All, nxa.type.Integer, false, false, false, "°C", 0, 100, "\\", "XIO", "My") |
...
Signature
string nxa.AddExtSysCustomItem (string, string, nxa.access, nxa.type, bool, bool, bool, string, number, number, string, string, string, ..., string)
Parameters
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
string | M | name of the custom item | |
string | M | description of the custom item | |
nxa.access | M | access rights of the custom item | |
nxa.type | M | the data type of the custom item | |
bool | O | sets the persistent flag (optional) | |
bool | O | sets the historical flag (optional) | |
bool | O | sets the synchronize flag (optional) | |
string | O | engineering units of the custom item (optional) | |
number | O | minimum value that is allowed for the custom item (optional) | |
number | O | maximum value that is allowed for the custom item (optional) | |
string | O | delimiter that is used to build the item ID (optional) | |
string | O | path1 (optional) | |
string | O | path2 (optional) | |
... | |||
string | O | pathN (optional) |
Return
Type | Description |
---|---|
string | itemID of the new Custom Item |