Inst ToolsInst ToolsInst Tools
  • 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
  • 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 !

Recommended Articles

OFF Delay Timer using PLC
Connect to the Siemens S7 PLC
How to Troubleshoot a PLC System?
PLC Program for Automatic Mixing Control in a Tank
Basic Conveyor System for Product Handling in Omron PLC
Automated Test Bench – Complex PLC Programming Examples
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

  • William Snyder on Top Non-PLC Certification Courses for Automation Professionals
  • 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

Related Articles

Siemens CPU Clock Memory

Alarm Acknowledge using PLC

PLC Structured Text Program for Light Sequences via Timers

PLC Structured Text Program for Light Sequences via Timers

LED Indications on PLC

Getting to Know the LED Indications on GE Make PLC

Mitsubishi PLC Programming Tutorials

Encode and Decode Instructions

How to Use Encode and Decode Instructions in PLC ?

Allen Bradley PLC to PLC Communication in Studio 5000

Allen Bradley PLC to PLC Communication in Studio 5000

Failsafe interlock Design

Failsafe Wiring Practices

SR Flip Flop Logic

How to implement SR Flip Flop using PLC Ladder Logic

More Articles

Electrical Machines Questions and Answers

Armature Quiz

Open Loop Control Block Diagram

Self-regulating Processes – Liquid Flow Control

Pressure Gauge Calibration according to Standard DKD-R-6-1

Pressure Gauge Calibration according to Standard DKD-R-6-1

Comparison of Humidity Sensors - Industrial Instruments

Comparison of Humidity Sensors – Industrial Instruments

Time Response Analysis

Time Response of Second Order Systems – IV

PLC Hoist Crane Programming

PLC Hoist Crane Programming: Example using Schneider

Design a PLC program for Operational Sequence of Packaging Process

Design a PLC program for Operational Sequence of Packaging Process

Siemens TIA Portal Free Version Download

Siemens TIA Portal Free Version Download

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?