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
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

Five Types of PLC Programming languages
PLC Timers Program
PLC Programming: Sorting and Distribution of Boxes by Height
PLC Programming Example on Timers Function Block
Complete PLC Project: Traffic Light Auto and Manual Automation
OMRON PLC Tutorial: Car Parking System Application
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

How to do Scaling for Analog Input in RSLogix 500?
Motor Speed Control using VFD and PLC Programming
Quiz Program Logic Using PLC Programming
Finding the Best PLC for Your Project – Tips and Tricks
PLC Programming Example for a Batch Process
T-Junction Traffic Control System – PLC Programming
Which Language is Best for PLC Programming?
STAR-DELTA Auto And Manual Program using XG5000 Software

Keep Learning

Field Instrument package

Package System Architecture – Control & Instrumentation

Conveyor Control with Main Motor and Backup Motor

Conveyor Operation with a Backup Motor using PLC Ladder Diagram

How to Read an Electrical Wiring Diagram

How to Read an Electrical Wiring Diagram?

Surface Grinding Process using PLC Program

Surface Grinding Process using PLC Program

car parking example logic

Up Down Counter Instruction in PLC

Connect PLC with SCADA System via OPC UA

How to Connect PLC with SCADA System via OPC UA?

Top PLC Manufacturers

PLC Brands Software Information

Simatic Prosave HMI

How to Backup and Restore from Simatic Prosave HMI?

Learn More

Calibration and Troubleshooting of Oxygen Analyzer

Calibration and Troubleshooting of Oxygen Analyzer

Motor contactors

What is Contactor ?

Field Instruments Selection Aid

Field Instruments Selection Aid

PLC engineering software

How to Download GX Works? Mitsubishi PLC Software

Vortex Flow GIF

Working Principle of Vortex Flow Meter

Power Electronics Objective Questions

Single-Phase Full Wave AC-DC Converter Questions

Multiplexers and Demultiplexers Objective Questions

Multiplexers and Demultiplexers Objective Questions

Level Control Loop Principle

Integrating Processes – Liquid Level Control

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?