Home » PLC Program for Two Way Switch Logic
Guest Articles PLC Tutorials

PLC Program for Two Way Switch Logic

This is PLC Program for Two ways switch logic for staircase light in house

PLC Two Way Switch Logic

  • In duplex type house there are ground floor and first floor and sometimes second floor also.
  • Sometimes people need to go from ground floor to first floor or from first floor to ground floor by staircase provided in house.
  • But in staircase there is no sunlight so people need a lamp/light to see the steps of the staircase easily.
  • Here we are using a simple PLC to control this lamp using two switches, one switch at ground floor and second switch at first floor to control one lamp as shown in below figure.
  • Note : we can also build the circuit using simple relays/switches also. This article only for understanding the basic concept of 2 way switch using  a PLC Ladder Logic.

Problem Diagram

PLC Program for Two ways switch logic for staircase light

Problem Solution

  • We will solve this problem by simple automation. As shown in figure consider one simple house with one floor and staircase is provided in the house.
  • Here we will set lighting system for the users to switch ON/OFF the light whether they are on bottom of the stair or at top.
  • We will provide separate switch for each floor as shown in above figure.

List of inputs/outputs

Digital Inputs

  • SW1 : I0.1
  • SW2 : I0.2

Digital Outputs

  • Lamp : Q0.0

PLC Ladder diagram for two ways switch logic

PLC Ladder Logic for Two Way Switch

Program Description

  • For this application, we used S7-1200 PLC and TIA portal software for programming.
  • In above program, we have added two NO contacts of SW 1 (I0.1) and SW 2 (I0.2) in series and NC contacts of SW1 (I0.1) and SW2 (I0.2) in parallel of this series SW1 & SW2 NO Contacts.
  • If the status of the bottom switch (SW1) and status of the top switch (SW2) are same then lamp will be ON. And if either status of the bottom or top switch is different from other then lamp (Q0.0) will be OFF.
  • When lamp (Q0.0) is OFF then user can ON the lamp by changing status of any switch. Also user can turn OFF the lamp by changing the status of one of the two switches.

Runtime Test Cases

PLC Two Way Switch Logic

Note : The above PLC Logic provided for basic idea about application of PLC for Two Way Switch Logic. The Logic is limited and not complete application.

Author : Bhavesh

Articles You May Like :

PLC Ladder Logic : Contacts and coils

Sequence of Conveyors with Interlock

Two out of Three Logic Analogy

Float-type Level Switch to Control a pump

Programmable Logic Controllers MCQ

Similar Articles:

Related Articles

Level Transmitter and Level Gauge Design Tips

S Bharadwaj Reddy

How a 4-20mA Transmitter Works ?

S Bharadwaj Reddy

PLC Example with Switches

S Bharadwaj Reddy

How a PLC do the Scaling for a Sensor ?

S Bharadwaj Reddy

Inhouse Moisture separator for Pneumatic Systems

S Bharadwaj Reddy

PLC Multiple Outputs Configuration

S Bharadwaj Reddy

1 comment

Alisahib March 18, 2019 at 2:35 pm

I think this LD is wrong.There must be SW1 (NO) to SW2(NC) (1st rung)
SW2(NO) to SW1(NC)(2 nd rung)

Reply

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

WordPress Image Lightbox