add

[ Function ]

public static add(
    symbolName: string,
    settings: TcHmi.Server.Historize.IEntrySettings,
    callback?: null | ((this: void, data: TcHmi.IResultObject) => void) = null
): TcHmi.IErrorDetails;

Adds a symbol to the server's Historize configuration.

Parameter

Name

Type

Description

SymbolName

string,

The name of the symbol.

settings

TcHmi.Server.Historize.IEntrySettings

The settings of the entry in the Historize- configuration.

callback [ optional ]

null | (data: TcHmi.IResultObject) => void

Asynchronous callback function that is triggered once the action is completed.

Return value

Type

Description

TcHmi.IErrorDetails

Returns confirmation as to whether the operation was successfully sent.

add 1:

Available from version 1.10

Sample - JavaScript

var settings = {
    INTERVAL: 'PT0.1S',
    MAXENTRIES: 10000,
    ROWLIMIT: 10000,
    RECORDINGENABLED: true,
};
TcHmi.Server.Historize.add('PLC1.MAIN.nInt2', settings, function (data) {
    if (data.error === TcHmi.Errors.NONE) {
        // Success
    } else {
        // Error
    }
});