guiSysMenuSetPassword (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-400, LX4

Firmware version:

1.00.00


This function configures the password for entering the system menu. If it is disabled, only guiSysMenuEnable and displaySysMenuEnable can be used to enable the system menu.

This function is the same as guiSysMenuSetPassword.

To open the dialog to enter the password on the NX-400, press on the clock in the status bar for about 3 seconds and release.

To open the dialog to enter the password on the LX4, keep the OK key pressed for about 10 seconds.

 

On the NX-400, guiWaitEvent can be used to detect login attempts:

- If an invalid password is entered, the failed login event is sent, otherwise the login succeeded event is sent.

- When logging out, either by clicking "Log out" in the system menu, or when logging out due to the timeout set with displaySysMenuEnable, the logged out event is sent.

 

 

Input:

enable : BOOL

If password based access to the system menu should be allowed.

 

password : STRING

The password that must be entered on the on screen keyboard, to enable the system menu. Minimum length is 3 characters.

For the LX4, the password must only contain the numbers 0-9 and has a maximum length of 16 characters.

On the LX4, the password can also be empty, which disables the password requirement while still allowing access to the system menu by pressing OK for 10 seconds.

 

 

Returns: INT

0

- Success.

-3

- Invalid password

-5

- Internal error

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiSysMenuSetPassword : INT;
VAR_INPUT
  enable    : BOOL;
  password  : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Enable login with password "password"
  rc := guiSysMenuSetPassword(enable := TRUE, password := "password");
  ...
END;
END_PROGRAM;