LoginEx

function LoginEx(ctx: Required<TcHmi.Context>, username: string | null, password: string | null, persistent: boolean = true, reload: boolean = true)

The LoginEx function logs a user into the server. The function LoginEx provides a context parameter of type TcHmi.Context, which allows the framework to wait for the asynchronous signaling of the end of the action when executing within triggers or function expressions.

Refer also to the description page for the corresponding API function.

Parameter

Name

Type

Description

ctx

Required<TcHmi.Context>

Context object

Does not need to be specified by the user when used in a trigger or function expression. In this case the transfer and the evaluation is done by the corresponding parser.

Is used by the caller to indicate success or failure to the framework during execution.

If the function is used directly in JavaScript/TypeScript, the context object must be passed in the call and evaluated if necessary.

username

string

User name

password

string

User password

persistent [ optional ]

boolean

Defines whether the login should be persistent.

The default value is true.

reload [ optional ]

Available from version 1.12

boolean

Defines whether a reload should take place after the logout.

The default value is true.

Return value

Type

Description

void

No return value.

NuGet package: Beckhoff.TwinCAT.HMI.Functions

LoginEx 1:

NuGet packages are available from version 1.12.

LoginEx 2:

Available from version 1.12