tchmi_base64encode

[ Function ]

function tchmi_base64encode(input: string): string | null;

Generates a base64 string.

Please note that strings are encoded in JavaScript UTF16.

Parameter

Name

Type

Description

input

string

String to convert

Return value

Type

Description

string, null

String converted to Base64 format. See note below.

tchmi_base64encode 1:

Available from version 1.8
In version 1.8, null is returned if an error occurred during conversion.
From version 1.10, an exception is thrown.

Sample - JavaScript

TcHmi.Log.debug(tchmi_base64encode('TwinCAT HMI')); // 'VHdpbkNBVCBITUk='