Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

LogOn

  • Last UpdatedOct 29, 2026
  • 1 minute read

LogOn is a built-in function that either logs on a specified user or displays a Log On dialog box.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

LogOn

Module Activity

Asynchronous

No

Supported

Supported

Supported

Supported

Supported

Syntax

LogOn(optStrUsername, optStrPassword)

LogOn ( { | optStrUsername,optStrPassword } )

optStrUsername

The name of the user to log on.

optStrPassword

The specified user's password.

optStrUsername and optStrPassword are optional parameters. If they are not specified, a Log On dialog box will be displayed in order to prompt the station's current operator โ€” whoever it is โ€” to log on.

Return value

This function returns one of the following possible values:

Value

Description

0

Error (for example, username or password is invalid) or cancellation.

1

Success.

Notes

If Mobile Access is being used to view the project and the page is refreshed or reloaded while the LogOn dialog box is displayed, then the execution is canceled and the function returns 0.

Examples

Display a Log On dialog box:

LogOn()

Log on username Albert with password EMC2:

LogOn("Albert", "EMC2")

In This Topic