PLC Programming Examples

PLC Programming Examples

This section covers programmable logic controller, PLC programming examples. Every example program includes the description of the problem, the solution as well as PLC code, explanation and run time test cases of the problem. These examples can be simple PLC programs or advanced PLC programs. So, they are suitable for any user (dummies, beginners or advanced users).

Here is the listing of PLC programming examples for different categories viz. Digital logic, Home and Industrial automations.

1. PLC Programs on Digital Logic

This section of PLC programming examples cover various digital logics likes Logic gates, boolean functions and combinational logic circuits. It also contains PLC programs on converters like Binary to BCD to Excess-3 code to BCD to Gray code, etc. followed by Multiplexers, de-multiplexers, Line encoders and decoders. It subsequently implements various Flip-Flop circuits like SR, D and T Flip Flops followed by PLC programs on Latching and Unlatching an Output by Time delays and Sealings.

PLC Program to Perform Various Logic Gates
PLC Program to Perform Various Boolean Functions
PLC Program to Perform Various Boolean Functions with Don’t Care Condition
PLC Program to Implement a Combinational Logic Circuit – Example 1
PLC Program to Implement a Combinational Logic Circuit – Example 2
Binary to BCD Conversion in PLC
PLC Program to Convert BCD to Excess-3
PLC Program to Convert Excess-3 to BCD
Binary to Gray Code Conversion in PLC
PLC Program to Convert Gray Code to Binary
BCD to Gray Code Conversion in PLC
PLC Program to Implement 2-bit Magnitude Comparator
PLC Program to Implement 4:1 Multiplexer
PLC Program to Implement 8:1 Multiplexer
PLC Program to Implement 1:8 Demultiplexer
PLC Program to Implement 3 to 8 Line Decoder
PLC Program to Implement 8 to 3 Encoder
PLC Program to Implement SR Flip-Flop
PLC Program to Operate Seven Segment Display
PLC Program to Operate Stamping of Parts
PLC Program to Implement D Flip Flop
PLC Program to Implement T Flip Flop
PLC Program to Simply Latch and Unlatch an Output
PLC Program to Latch and Unlatch an Output by Sealing
PLC Program to Latch and Unlatch Output with Time Delay

2. PLC Programming Examples on Home Automation

The section of PLC programs covers problems surrounding Home Automation like Burglar Alarm Systems, Car Parking Systems and Classroom Capacity Problem.

PLC Program for Burglar Alarm Security System
PLC Program for Car Parking System
PLC Program to Maintain the Capacity of a Particular Classroom

3. PLC Programming Examples on Industrial Automation

This section of PLC programming covers problems in Industrial Automation. There are lots of Industries and Services to which processes can be employed to automate the work flow using PLC circuits. For example: One can employ PLC programming for Automatic Car-washing, to Control Traffic Lights, Sequencing of Light Controls, Movement of Motors in Forward and Backward directions, Generation of Outputs based on Mathematical Functions and Equations, Level Control of Tanks (Two Tanks, Series Tank, Parallel Tank), Mixing in Process Pineline, Counting of Parts in Conveyor Belts and many more Industrial and Manufacturing Applications.

advertisement
advertisement
PLC Program to Implement an Automatic Car-Wash Process
PLC Program to Operate 4 Outputs Simultaneously with Time Delay
PLC Program to Drive Motors Simultaneously with Interlocking
PLC Program to Control Motor in Forward and Reverse Direction
PLC Program to Control Lights in a Sequence using Timers
PLC Program to Control Lights in a Sequence using Bit Shift Registers
PLC Program to do Mathematical Functions
PLC Program to Generate Outputs Based on Equations
PLC Program to Jump to Other Process
PLC Program to Perform Pulse Width Modulation
PLC Program to Call a Subroutine for a Different Process
PLC Program to Control Traffic Lights and Pedestrian Lights
PLC Program to Control Traffic Lights
PLC Program to Control Level of a Single Tank
PLC Program to Control Level of Two Tanks
PLC Program to Control Level of Series Tanks
PLC Program to Control Level of Parallel Tanks
PLC Program to Heat the Liquid in the Tank with a Heater
PLC Program to Control Mixing in a Tank
PLC Program to Control Three Mixing Devices in a Processing Line
PLC Program to Maintain the Pressure Head in a Bottle Filling System
PLC Program for Counting of Parts from Conveyor
PLC Program to Count and Pack Parts from Conveyor
PLC Program to Control Conveyor Sequence with Interlock
PLC Program to Operate Drilling of Parts
PLC Program for Cleaning and Rinsing Bottles in Beverage Industries
PLC Program to Sort Parts for Quality Control on Conveyor
PLC Program to Heat the Liquid in Tank by Steam Flow
PLC Program for Heating and Mixing of Products
PLC Program to Control Level of a Tank
PLC Program for Continuous Stirred Tank Reactor
PLC Program to Measure Unknown Frequency
PLC Program to Measure the Scan Cycle of PLC
PLC Program to Heat and Bend Glass Tubes
PLC Program to Perform Bottle’s Capping with Rotating Mechanism
PLC Program to Perform Capping of Beverage Bottles
PLC Program to Remove Empty Detected Bottle on Conveyor
PLC Program to Measure Time Taken by an Event
PLC Program to Operate Light as an Emergency Signal
PLC Program to Reset all Non-Retentive Outputs
PLC Program to Change Preset Value of Counter
PLC Program to Drain Same Products from Two Tanks
PLC Program to Drain Different Products from Two Tanks
PLC Program to Display Level of a Tank
PLC Program to Display Level of Three or More Tanks
PLC Program to Control Spray-Painting of Parts
PLC Program to Separate Big and Small Parts
PLC Program to Operate Screwing of Parts
PLC Program to Detect and Remove Burned Chips
PLC Program to Store Data of Various Process Sequentially
PLC Program to Store Temperature Data of a Process at Different Time
PLC Program for Oil and Water Separation Process

If you would like to learn PLC programming thoroughly, you should attempt to work on the complete set of example programs listed above.

Wish you the best in your endeavor to learn and master PLC Programming!

advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.