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 Implement 1:8 Demultiplexer

Posted on January 20, 2017 by Manish

This is a PLC Program to Implement 1:8 Demultiplexer.

Problem Description

Implementing 1:8 De-multiplexer in PLC using Ladder Diagram programming language.

Problem Solution
  • It has one data input Di, three select input S0, S1 and S3 and 8 outputs Y0 to Y7.
  • To select n outputs, we need m select lines such that 2^m = n. Depending on the output. The selection of one of the n outputs is done by the select pins.
  • It does not need K-map and simplification so one step is eliminated to create Ladder Logic Diagram.
  • Realize the de-multiplexer using Logic Gates.
  • Truth Table can be written as given below.

Truth Table relating 1:8 De-Multiplexer

Data	Select Inputs	Output
Inputs	S2 S1 S0        Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
Di	0  0  0	        0  0  0	 0  0  0  0  Di
Di	0  0  1	        0  0  0	 0  0  0  Di 0
Di	0  1  0	        0  0  0	 0  0  Di 0  0
Di	0  1  1	        0  0  0	 0  Di 0  0  0
Di	1  0  0	        0  0  0	 Di 0  0  0  0
Di	1  0  1	        0  0  Di 0  0  0  0  0
Di	1  1  0	        0  Di 0	 0  0  0  0  0
Di	1  1  1	        Di 0  0	 0  0  0  0  0

Realizing 1:8 De-Mux using Logic Gates
plc-program-implement-1-8-demultiplexer-01

PLC Program

Here is PLC program to Implement 1:8 Demultiplexer, along with program explanation and run time test cases.

List of Inputs and Outputs
 S0=		I:1/0	(Select Line Input)
 S1=		I:1/1	(Select Line Input)
 S2=		I:1/2	(Select Line Input)
 Din=		I:1/3	(Data Input)
 Y0=		O:2/0	(Output)
 Y1=		O:2/1	(Output)
 Y2=		O:2/2	(Output)
 Y3=		O:2/3	(Output)
 Y4=		O:2/4	(Output)
 Y5=		O:2/5	(Output)
 Y6=		O:2/6	(Output)
 Y7=		O:2/7	(Output)

Ladder Diagram to obtain outputplc-program-implement-1-8-demultiplexer-02

Program Description
  • In all the rungs, S2 (I:1/0), S1 (I:1/1) and S0 (I:1/2) are used as a selector line input as shown in Logic Circuit.
  • Y0 to Y7, O:2/7 are Onputs respectively.
  • When S2 (I:1/0), S1 (I:1/1) and S0 (I:1/2) are low, Y0 output will have whatever state Data Input bit I:1/3 holds, either 1 or 0.
  • When S2 (I:1/0) and S1 (I:1/1) are low and S0 (I:1/1) is high, Y1 output will have whatever state Data Input bit I:1/3 holds.
  • Similarly remaining six different outputs are obtained.
  • In other words, according to bit pattern of S2, S1 and S0, Data Input bit Din is passed to outputs Y0-Y7.
  • Here, instead of outputs Y0 to Y7, any final control element can be operated depending upon the application.
Runtime Test Cases
Data    Select Inputs	Output
Inputs  S2 S1 S0        Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
Di	0  0  0	        0  0  0	 0  0  0  0  Di
Di	0  0  1	        0  0  0	 0  0  0  Di 0
Di	0  1  0	        0  0  0	 0  0  Di 0  0
Di	0  1  1	        0  0  0	 0  Di 0  0  0
Di	1  0  0	        0  0  0	 Di 0  0  0  0
Di	1  0  1	        0  0  Di 0  0  0  0  0
Di	1  1  0	        0  Di 0	 0  0  0  0  0
Di	1  1  1	        Di 0  0	 0  0  0  0  0

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 8:1 Multiplexer
» Next Page - PLC Program to Implement 3 to 8 Line Decoder
« PLC Program to Implement 8:1 Multiplexer
PLC Program to Implement 3 to 8 Line Decoder »

Deep Dive @ Sanfoundry:

  1. C Programming Examples on Stacks & Queues
  2. Java Programming Examples on Data-Structures
  3. C++ Programming Examples on Data-Structures
  4. C++ Programming Examples on Set & String Problems & Algorithms
  5. C# Programming Examples on LINQ
  6. C Programming Examples on Set & String Problems & Algorithms
  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