Mcgs Hmi Password Work «VERIFIED ✪»

Pressing a "Logout" button (calling !LogOff( )) immediately reverts the HMI to Level 0. This is critical for safety when an operator walks away from a running machine.

Add a Label (text: "Enter Password"). Add a Numeric Input object linked to Entered_PW. Under its properties, set "Input Format" to decimal, "Max Length" = 4.

If your project uses a USB or SD card for data logging, store passwords in RW area (RW 0 to RW 9999). These are non-volatile. mcgs hmi password work

Example: Master_PW = RW0
Pros: You can backup/restore passwords. Cons: Slightly slower read/write.

This is the most important step. You must restrict individual HMI components: Pressing a "Logout" button (calling

MCGS usually pre-defines groups to categorize users:


IF Entered_PW = Operator_PW THEN
    Access_Level = 1
ELSE IF Entered_PW = Tech_PW THEN
    Access_Level = 2
ELSE IF Entered_PW = Admin_PW THEN
    Access_Level = 3
ELSE
    Access_Level = 0
    MsgBox "Access Denied", 0
ENDIF
Entered_PW = 0

Now, on each button or data entry object, use the "Visible" property with expressions like: IF Entered_PW = Operator_PW THEN Access_Level = 1

Real industrial HMIs need different access levels. Here is how MCGS HMI password work for multi-user scenarios using a numeric level system.

For safety, it is best practice to log the user out automatically after a period of inactivity.