Basic PLC Programming Tasks on NO & NC

Print Friendly, PDF & Email

Draw the Ladder Diagram for the following logics by using Siemens step 7 SIMATIC MANAGER Software for SIEMENS PLC.

Image Courtesy :

Image Courtesy :

Example 1: Develop a LAD programme such that the lamp Lshould glow when the switch S1 is made ON and the lamp gets OFF when switch Sis made OFF

Example 2: Develop a LAD programme such that the Lamp Lshould not glow when switch S2 is made ON Lamp should glow when switch Sis made OFF.

Example 3: The lamp Lshould glow when both the switch S1 & S2 are ON.

Example 4: The lamp Lshould glow when any one of the switch S1 or S2 is ON.

Example 5: Develop Ladder Logic for a car door/seat belt safety system. When the car door is open, or the seat belt is not done up, the ignition power must not be applied. If all is safe then the key will start the engine.

Example 6: The lamp should glow when either the switch (S1 & S2) or S3 is ON.

Example 7: The lamp should glow when the switch (S1 & S2) or (S3 & S4) is pressed.

Example 8: The lamp should glow when the switch (S1 or S2) & (S3 or S4) is pressed.

Example 9: Develop ladder logic for a car door and inside light system.  If any of the car door, out of four doors is opened or a switch S1 inside the car is made ON a lamp L1 inside the car gets ON .When all the four doors are closed and switch Sis kept open the lamp inside the car gets OFF. If all the 4 doors are opened and switch Sis made ON the lamp inside the car can be made OFF by pressing another switch S2. If all the car doors are closed, then the inside lamp can be made ON by switch S1 and can be made OFF by switch S2.

Example 10: The lamp should glow when the switch (S1 or Sor S3) & (S4 or S5) & S6 are pressed.

Example 11: The lamp should glow when the switch (S1 & S2 & S3) or (S4 & S5) or S6 is pressed.

Example 12: The lamp should glow when the switch S1 & (S2 or S3) & (Sor S5) are made ON.

Example 13: A fan is to run when all the following conditions are met:

  1. a) Switch S1is kept OFF.
  2. b) Switch S2 or S3 is made ON.
  3. c) Switch S4 & S5 are made ON
  4. d) Switch S6 or S7 or S8 is made ON.

Example 14: There are three fans in a room and are controlled individually by toggle switches there is a panel board outside the room. Draw logic in LAD such that when the following condition satisfied the indicator light should glow in panel board.

  1. If all the three fans are running the RED lamp L1 glows in panel board at that time L2 and L3 should off.
  2. If any two fans are running the YELLOW lamp L2 glows at that time L1 and L3 should off.
  3. If any one fan is running the GREEN lamp L3 glows at that time L1 and L2 should off.

Example 15: In a factory there is a switch at the entry gate when it is pressed a main contractor is on when the main contractor is on it makes five light off which was running last night in a corridor loaded on a separate contactor when the corridor lights are off main office building light and other office rooms ten numbers of lights gets on which is loaded on another contactor.

Example 16: When the switch is made ON it makes a lamp L1 OFF which is previously ON. When L1 gets OFF another lamp L2 gets ON which is previously OFF.

Example 17: Lamp L2 is glowing previously. Another lamp L1 should glow when any of the switches S1, S2, S3, S4, and Sis pressed. Lamp L2 gets OFF when the lamp L1 glows.

Example 18: There are four hazard inputs to the alarm system which get ON when the following logics occurs:

  1. a) If one input is ON, nothing happens to alarm.
  2. b) If any two inputs are ON, a pilot light glows.
  3. c) If any three inputs are ON, the pilot light goes OFF & an alarm siren blows.
  4. d) If all the four inputs are ON the fire department light glows with this the alarm siren goes ON as well as the pilot light also glows.

Example 19:

  • When the switch S1is made ON the lamp B1 should glow.
  • When the switch S2is made ON the lamp Bshould glow.
  • When the switch S3is made ON the lamp Bshould glow.
  • When the switch S4is made ON the entire lamp should OFF
  • And B4gets ON.

Example 20:

  • When the switch S1is made ON the lamp B1 should glow.
  • When the switch S2is made ON the lamp B2 should glow.
  • When the switch S3is made ON the lamp Bshould glow.
  • When the switch Sis made ON the entire lamp should OFF
  • And B4gets OFF which was previously ON.

Example 21: Four output (P1, P2, P3 and P4) are wired to a PLC. The status of each output will be displayed in a digital output depending up on the status of another 2 select inputs.

Hints: –

  • S1/S2: 0/0:- P1ON,
  • S1/S2: 0/1:-P2ON,
  • S1/S2: 1/0:-P3ON,
  • S1/S2:1/1:-P4ON,

Example 22:9 numbers of alarm inputs are connected to a PLC. When an alarm comes to the PLC, the alarm-input number will be displayed by 4 digital outputs (4 bit binary equivalent).



  • ALARM 1                    I0.0=1
  • ALARM 2                    I0.1=2
  • ALARM 3                    I0.2=3
  • ALARM 4                    I0.3=4
  • ALARM 5                    I0.4=5
  • ALARM 6                    I0.5=6
  • ALARM 7                    I0.6=7
  • ALARM 8                    I0.7=8
  • ALARM 9                    I1.0=9


  • BIT 1               Q0.0=20
  • BIT 2               Q0.1=21
  • BIT 3               Q0.2=22
  • BIT 4               Q0.3=23

Example 23: There are three fans for cooling purpose of a system and the system is powered through K1 contactor. For proper operation of the system, any two fans, out of three, must run. Write program to start the reserve fan automatically in case of failure of any one of the two running fans. If any two fans fail, the incoming supply to the system (K1 contactor) must be off.

Hints:-Use one Start switch to start the fans (if Start is ON and all fans are healthy, Fan1 and Fan2 will start and Fan3 will be the reserve fan) and three fault switches for the three fans.

Download Solution for all above Questions:

Facebook Comments

About Author

SanjayHumania.Com is a notebook, where I have tried to cover information and tips related to Technology, Social Media, Life Style, Travelling and Others…

It’s owned by me and technically supported by my friend, Stiff Roy. I am from India and completed my M.Tech in Mechatronics from Jawaharlal Nehru Technological University Hyderabad in 2013. The main focus of my notebook is to cover information & tips related to the above topics. I will do my best to provide more informative and unique information to the readers at SanjayHumania.Com

  • Devajyoti Borah

    PLZ share the password of solution of pdf