Inst ToolsInst ToolsInst Tools
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: PLC Program for Password Management using Structured Text
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > PLC Program for Password Management using Structured Text

PLC Program for Password Management using Structured Text

In this post, we will see how to write a PLC program for password management using structured text language (STL).

Last updated: October 21, 2024 12:02 pm
Viral Nagda
PLC Tutorials
No Comments
Share
4 Min Read
SHARE

Password management is increasingly gaining foot in many automation programs in PLC. It works by default in HMI or SCADA, but you know that even PLC can be used to write the logic for managing password activities. This feature is also useful if you use an in-built HMI of the PLC, and the HMI variables can be directly linked with the PLC. In this post, we will see how to write a PLC program for password management using structured text language (STL).

Let us understand the case scenario first. There is a provision to enter username and password in the HMI. The user needs to enter the correct credentials. We will match the password with 1234 and the username with 1111. If the user presses the enter button and it matches, then the user will be logged in. If the user presses the enter button and it does not match, then the user will not be logged in.

There is a feature for locking the user after failed retry counts. If the user has consistently entered wrong credentials for 3 times, then the user will get locked for 10 seconds. In that time, no login activity will happen. After 10 seconds, the user can login again. After successful login, if the user presses the logout button or auto-logout bit (after no activity happens in HMI for 5 minutes) is sensed from the HMI, then the user will be logged out.

We will write the PLC logic now. For this, we have used Studio 5000 software of Rockwell automation and structured text language. Following are the soft inputs in PLC – password entry, user entry, enter button, auto logout and log out button; and the soft outputs in PLC – user locked and user logged. Let us see the logic below.

PLC Program for Password Management using Structured Text

In the first part, we will check for successful login. If the password is equal to 1234 and the user is equal to 1111 and the user presses enter button and the user is neither locked nor logged in, then the user will be logged in.

Next, we will check for unsuccessful login. If the password is not equal to 1234 or the user is equal to 1111 and the user presses enter button and the user is neither locked nor logged in, then the user will not be logged in.

Next, we will use a counter for counting failed login attempts. We use an instruction called OSRI or one shot rising, which gives an output on input rising edge. If the password is not equal to 1234 or the user is equal to 1111 and the user presses enter button, then a pulse generated will count the counter. The set value for the counter will be 3. When the counter is done, a bit named user locked will be set. The counter will reset if the user is locked or logged in.

When the user is locked, we will use a timer of 10 seconds for unlocking it again. Once the timer is done, the bit will be reset.

If the user presses the logout button or auto logout bit is received from HMI, then the user will be logged out.  

In this way, we saw how to write a PLC logic for password management using structured text.

Read Next:

  • Conveyor Sorting with Color Detection
  • Difference Between PLC and CNC Machine
  • PLC Crane Movement Control Program
  • PLC Programming Clothes Washing System
  • PLC Example for Traffic Light FBD Program
Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !
Function Blocks in PLC (FBs) – What You Need To Know?
Troubleshoot the Status of a PLC Via CPU Indicators
How Engineers Effectively do Problem-solve and Troubleshoot?
PLC Programming Example using Limit Switch
#17 PLC Best Practices – Log PLC Uptime and Trend it on HMI
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
208kSubscribersSubscribe
38kFollowersFollow

Categories

Recent Comments

  • Kamli on Top Free PLC Software
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals

Related Articles

Loop Diagram

Documentation and Change Control of PLC or DCS Systems

Glass Cutting and Polishing Machine PLC Automation Solution

Glass Cutting and Polishing Machine: PLC Automation Solution

Alarm and Trip Documentation

PLC Alarm and Trip Documentation

Control Methods in Servo Motor Drives

Various Control Methods in Servo Motor Drives

PLC program Permissive Circuit

PLC Electric Motor Interlocks

On Delay Timer using PLC

ON Delay Timer using PLC

PLC Timer Programming Examples on Coffee Machine

PLC Timer Practice Exercise: Coffee Machine Programming

4 TO 20 MA ANALOG CURRENT SIGNALS

Basics of 4 to 20 mA analog Signals

More Articles

Diaphragm Seal Material Selection

Diaphragm Seal Material Selection

Trolley and hoist PLC control

PLC Crane Movement Control with Limit Switches

Comparison between Transit time and Doppler Flow Meter

Difference between Transit time and Doppler Ultrasonic Flow Meter

Control Speed of an Induction Motor using Analog Output of PLC

Control Speed of Induction Motor using Analog Output of PLC

Vendor Selection in Procurement Service Cycle (For Industrial Projects)

Compliance Table Application (for Procurement Service Cycle)

Allen Bradley PLC communication is established

Procedure for Connecting Allen Bradley PLC and PC – RS Logix 500

Effluent Treatment Plant

Basic Components of Effluent Treatment Plant (ETP)

hall-effect-sensor

Hall Effect Sensor Working Principle Animation

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?