Jump to content

Unitronics' Blog: PLCs, HMIs and more

  • entries
    83
  • comments
    45
  • views
    114,604

Contributors to this blog

From: Multiple Passwords by Bruce L


Jas

2,048 views

When multiple password levels are needed, there are only two choices. You can create a Password Entry Button for each password level or use a Numeric Entry and compare the entered password against the password levels in the logic to set the desired levels. However, the negative to using the Numeric Entry for passwords is that the digits that are entered on the screen while the users touches the screen. This can be a BAD problem.

Here is a sample program that will draw a black line on the screen that will hide the digit as they are entered. This program is setup for a 4 digit password and uses the Simple (Back) Keyboard Screen. The sample program has a normal Numeric Entry Button to show that it will not blank out the digits unless it is programmed to do so.

When the Simple Keyboard Screen is open, the logic looks at the pixels on the screen to detect when a digit is being entered. Each time a digit is entered, the logic will draw the blank line over the display. Each of the four digits will be covered as they are typed. The logic also monitors the area over the "Back" button and will remove the black line covering the digit if the user presses the "Back" button.

Since the Numeric Entry Button will display the number that was just entered from the Entry Screen, this logic will hide the button if it equals one of the passwords. There is a "Clear Password" button that will reset the password integer and un-hide the Password button again.

The sample shows some buttons that will only show when the desired password level is entered. There are two passwords in this sample (1111 and 2222).

Note: The logic detects the screen that is being displayed and the area where the Password Entry button is located. These variables will have to be changed to reflect where the Password button is located on your program. This was logic will not work on the Complex keyboard without modifying the pixel area that it monitors for the digits and Back keys.

This is a starting point to customize to meet your needs. Hope you find it helpful.

Original Posting Source: Multiple Passwords

1 Comment


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...