Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: PLC Program for Password Management using Structured Text
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
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 !

Continue Reading

Types of Script in Intouch Scada
PLC Program for Stage Control: Curtains and Stage Elevation
Difference between Cold Standby and Hot Standby
Learn PLC in Hindi
How to use Simulator in Siemens PLC?
Control Speed of Induction Motor using Analog Output of PLC
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
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Top 5 Advantages of Human-Machine Interface (HMI)
What is Interface Module in Siemens PLC?
PLC Ladder Logic for Opposite Acting Control Valves Application
Steps to Configure TCP/IP Communication in Siemens S7-1200 PLC
SCADA Interview Questions and Answers
PLC Program for Flow Totalizer
Pulse Generation using Timer in Siemens PLC
What are Functions in PLC Programming? (FCs)

Keep Learning

Motor Feedback Fail Logic in PLC

Motor Feedback Fail Logic in PLC

Basic PLC Exercise on Heater and Cooler for Students

Basic PLC Exercise on Heater and Cooler for Students

LES and GRT Blocks in PLC Programming

Allen Bradley Math Functions

Trolley and hoist PLC control

PLC Crane Movement Control with Limit Switches

Claw Machine PLC Programming

Doll Claw Machine using Omron PLC Programming

Siemens Communication between PLCs using I-Device

Tutorial: Siemens Communication between PLCs using I-Device

Factory Acceptance Test of PLC Panel

Factory Acceptance Test (FAT) of a PLC Panel

Indusoft SCADA Modbus Communication

Establishing a Modbus Driver for SCADA Indusoft Web Studio

Learn More

Control Systems Questions & Answers

Control Systems Objective Questions & Answers – Set 1

BPCS Control System and ESD Safety System of Delta-V DCS

BPCS Control System and ESD Safety System of Delta-V DCS

Single-Phase Induction Motors Multiple Choice Questions (MCQ)

125+ Single-Phase Induction Motors Multiple Choice Questions (MCQ)

Crowbar fault protection circuit

Crowbar fault protection circuit

SIS Testing and Repair Deferral

SIS Testing and Repair Deferral

Download a Ladder logic program to GE PLC

Single Phase Energy Meter

Measurement of Electrical Parameters in Steam Turbine

Faults in a Transformer

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

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?