logo
  • Home
  • About
  • Training
  • Programming
  • CS
  • IT
  • IS
  • ECE
  • EEE
  • EE
  • Civil
  • Mechanical
  • Chemical
  • Metallurgy
  • Instrumentation
  • Aeronautical
  • Aerospace
  • Biotechnology
  • Agriculture
  • MCA
  • BCA
  • Internship
  • Contact

PLC Programming Examples

PLC Programming Examples
Practice following PLC examples which are from Digital Logic, Home and Industrial Automation areas.

Get Started

PLC - Logic Gates
PLC - Boolean Functions
PLC - Boolean Don't Care
PLC - Combinational Logic 1
PLC - Combinational Logic 2
PLC - Binary to BCD Converter
PLC - BCD to Excess-3
PLC - Excess-3 to BCD
PLC - Binary to Gray Code
PLC - Gray Code to Binary
PLC - BCD to Gray Code
PLC - Magnitude Comparator
PLC - 4:1 Multiplexer
PLC - 8:1 Multiplexer
PLC - 1:8 Demultiplexer
PLC - 3 to 8 Decoder
PLC - 8 to 3 Encoder
PLC - SR Flip-Flop
PLC - Seven Segment Display
PLC - Parts Stamping
PLC - D Flip Flop
PLC - T Flip Flop
PLC - Latch & Unlatch
PLC - Latch & Unlatch - Sealing
PLC - Latch & Unlatch - Delay
PLC - Burglar Alarm Security
PLC - Car Parking System
PLC - Classroom Capacity
PLC - Automatic Car-Wash
PLC - Operate 4 Outputs - Delay
PLC - Interlocking Drive Motors
PLC - Forward/Reverse Drive
PLC - Control Lights Sequence 1
PLC - Control Lights Sequence 2
PLC - Mathematical Functions
PLC - Outputs Based Equations
PLC - Jump to Other Process
PLC - Pulse Width Modulation
PLC - Subroutine Process
PLC - Traffic/Pedestrian Lights
PLC - Control Traffic Lights
PLC - Single Tank Level Control
PLC - Two Tanks Level Control
PLC - Series Tanks Level
PLC - Parallel Tanks Level
PLC - Tank - Heating Liquid
PLC - Tank - Control Mixing
PLC - Control Processing Line
PLC - Bottle Filling System
PLC - Conveyor - Count Parts
PLC - Conveyor - Pack Parts
PLC - Conveyor Sequence
PLC - Drilling of Parts
PLC - Cleaning/Rinsing Bottles
PLC - Conveyor - Sort Parts
PLC - Heat Tank - Steam Flow
PLC - Products Heating/Mixing
PLC - Maintain Tank Level
PLC - Continuous Tank Reactor
PLC - Unknown Frequency
PLC - Measure PLC Scan Cycle
PLC - Heat/Bend Glass Tubes
PLC - Bottle's Capping Rotation
PLC - Beverage Bottle Capping
PLC - Conveyor Bottle Removal
PLC - Event Time Measurement
PLC - Light as Signal
PLC - Reset NonRetentive O/P
PLC - Counter Preset Value
PLC - Drain Same Products
PLC - Drain Different Products
PLC - Display Tank Level
PLC - Display More Tank Levels
PLC - Spray-Painting
PLC - Separate Big/Small Parts
PLC - Operate Screwing of Parts
PLC - Detect Burned Chips
PLC - Store Process Data
PLC - Store Temperature Data
PLC - Oil/Water Separation

« Prev Page
Next Page »

PLC Program to Operate Seven Segment Display

Posted on January 20, 2017 by Manish

This is a PLC Program to Operate Seven Segment Display.

Problem Description

Implement displaying 0-9 digits in 7 Segment LED Display interfacing with PLC using Ladder Diagram programming language.

Problem Solution
  • 7 Segment LED Displays are also known as BCD to 7 Segment decoder.
  • These displays are readily available or can be made easily organizing simple LEDs in the same structure as in actual display.
  • Input to this display is BCD number which are decoded into digits 0 to 9.
  • Connect this display with Output card of a PLC.
  • Write a truth table to energize various outputs according to BCD input applied.
  • This displays do not come with internal latches, we can latch inputs in PLC using either seal in contact or Latch-Unlatch instructions in Allen Bradley and Set-Reset instructions in Siemens PLCs.
  • Use K-Map to obtain output equations.
  • Implement this equations in Ladder Diagram format using AND and OR operations.

Truth Table of 7 Segment Display

Inputs	Outputs
	a b c d	e f g	Display
0000	1 1 1 1	1 1 0	0
0001	0 1 1 0	0 0 0	1
0010	1 1 0 1	1 0 1	2
0011	1 1 1 1	0 0 1	3
0100	0 1 1 0	0 1 1	4
0101	1 0 1 1	0 1 1	5
0110	1 0 1 1	1 1 1	6
0111	1 1 1 0	0 0 0	7
1000	1 1 1 1	1 1 1	8
1001	1 1 1 1	0 1 1	9

Simplified Boolean expressions to obtain a to g outputs using K-Map
plc-program-operate-seven-segment-display-01 plc-program-operate-seven-segment-display-02 plc-program-operate-seven-segment-display-03

PLC Program

Here is PLC program to Operate Seven Segment Display, along with program explanation and run time test cases.

List of Inputs and Outputs
I:1/0 to I:1/3	= I0 Input 0 to I3 Input 3 respectively.	(Input)
O:2/0 to O:2/6	= a to g respectively.				(Outputs)

Ladder Diagram for 7 segment display
plc-program-operate-seven-segment-display-04 plc-program-operate-seven-segment-display-05

Program Description
  • After performing K-Map simplification method, equations for all the 7 outputs are obtained.
  • I:1/0 to I:1/3 are the inputs I0 to I3 respectively and O:2/0 to O:2/6 are the outputs ‘a’ to ‘g’ respectively.
  • Output ‘a’ 0:2/0 energizes in 4 cases, when I2 and I0 are low, I1 is high, I0 and I2 are high or when I3 is high.
  • Output ‘c’ O:2/2 energizes in 3 cases, when I1 is low, I0 is high, or when I2 is high.
  • Similarly all the remaining outputs b, d, e, f and g are obtained.
  • Simply this is a method to convert BCD inputs into Seven Segments to display 0-9 digits.

Separated by commas are different cases of outputs being energized.

Runtime Test Cases

plc-program-operate-seven-segment-display-06

Sanfoundry Global Education & Learning Series – PLC Algorithms.
To practice all PLC programs, here is complete set of 100+ PLC Problems and Solutions.

« Prev Page - PLC Program to Implement T Flip Flop
» Next Page - PLC Program to Simply Latch and Unlatch an Output
« PLC Program to Implement T Flip Flop
PLC Program to Simply Latch and Unlatch an Output »

Deep Dive @ Sanfoundry:

  1. C Programming Examples on Linked List
  2. C++ Programming Examples on Data-Structures
  3. C# Programming Examples on LINQ
  4. C Programming Examples on Graph Problems & Algorithms
  5. C Programming Examples on Computational Geometry Problems & Algorithms
  6. Java Programming Examples on Data-Structures
  7. Java Programming Examples on Collection API
  8. C Programming Examples on Data-Structures
  9. C++ Programming Examples on STL
  10. PLC Programming Examples
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer and SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage & Cluster Administration, Advanced C Programming, SAN Storage Technologies, SCSI Internals and Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him below:
LinkedIn | Facebook | Twitter | Google+

Best Careers

Developer Tracks
SAN Developer
Linux Kernel Developer
Linux Driver Developer
Linux Network Developer

Live Training Photos
Mentoring
Software Productivity
GDB Assignment
Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel Programming. Our Founder has trained employees of almost all Top Companies in India such as VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft, Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium, ST-Micro, Samsung, LG-Soft, Wipro, TCS, HCL, IBM, Accenture, HSBC, Mphasis, Tata-Elxsi, Tata VSNL, Mindtree, Cognizant and Startups.

Best Trainings

SAN I - Technology
SAN II - Admin
Linux Fundamentals
Advanced C Training
Linux-C Debugging
System Programming
Network Programming
Linux Threads
Kernel Programming
Kernel Debugging
Linux Device Drivers

Best Reference Books

Computer Science Books
Algorithm & Programming Books
Electronics Engineering Books
Electrical Engineering Books
Chemical Engineering Books
Civil Engineering Books
Mechanical Engineering Books
Industrial Engineering Books
Instrumentation Engg Books
Metallurgical Engineering Books
All Stream Best Books

Questions and Answers

1000 C Questions & Answers
1000 C++ Questions & Answers
1000 C# Questions & Answers
1000 Java Questions & Answers
1000 Linux Questions & Answers
1000 Python Questions
1000 PHP Questions & Answers
1000 Hadoop Questions
Cloud Computing Questions
Computer Science Questions
All Stream Questions & Answers

India Internships

Computer Science Internships
Instrumentation Internships
Electronics Internships
Electrical Internships
Mechanical Internships
Industrial Internships
Systems Internships
Chemical Internships
Civil Internships
IT Internships
All Stream Internships

About Sanfoundry

About Us
Copyright
TOS & Privacy
Jobs
Bangalore Training
Online Training
SAN Training
Developers Track
Mentoring Sessions
Contact Us
Sitemap
© 2011 Sanfoundry