exists

[ Function ]

public exists(
    callback?: (data: Symbol.IExistsResultObject) => void
): any;

Checks if the symbol exists.

Parameter

Name

Type

Description

callback [ optional ]

(data: Symbol.IExistsResultObject) => void

This is triggered when the action has been successfully completed or an error has occurred. For details, please refer to the parameter data.

Return value

Type

Description

void

No return value

exists 1:

Available from version 1.10.1336.10

Sample - JavaScript

var symbol = new TcHmi.Symbol('%s%PLC1.MAIN.sTest%/s%');
symbol.exists(function (data) {
    if (data.error === TcHmi.Errors.NONE) {
        // Handle result value...
        var symExists = data.result;
        console.log('Symbol exists: '+ symExists);
    } else {
        // Handle error...
    }
});