# PLC Ladder Logic Examples – Example 2

We have discussed many PLC ladder logic examples on our blog and in this article, we are going to see another example. To understand this concept, we have taken the example of motors that will be controlled with the use of different switches and push-buttons. It is similar to the previous example of lamps, however, the approach to the ladder logic programming is different.

A switch is a device used to make or break the connection in an electric circuit. We use switches in our daily life. A common example of a switch is the on/off button in our homes and offices.

In this article, we are going to see how to draw a ladder logic diagram for controlling the motor outputs using PLC. One should note that these are the basic examples of PLC ladder logic examples for PLC ladder logic practices.

## PLC Ladder Logic Examples 2

In this ladder logic example, we will see how to draw a ladder logic diagram to control the different outputs of a system.

### Problem Statement

Draw a ladder logic diagram to control the motor output as per the given logic. Make use of start and stop pushbuttons, 4 switches to turn on and off 2 motors (M), and a buzzer (B).

Take a start and stop push button to turn on and off the system.

• Pressing Switch 1 results in turning ON Motors M1 and M2 and a buzzer B1.
• After pressing switch 2, Motor M1 will turn OFF while Motor M2 and buzzer B1 remain ON.
• After pressing switch 3, Motor M2 will turn OFF while Motor M1 and buzzer B1 remain ON.
• After pressing switch 4, Buzzer B1 will turn OFF while Motors M1 and M1 remain ON.

Write down a ladder logic diagram for the above problem statement.

### List of Input and Output Tags

In this PLC ladder logic example, we have used 6 inputs, 3 outputs, and 4 memory. Among 6 inputs, 2 are push buttons and the rest switch.

In this PLC ladder logic example, we have used Siemens S7-1500 PLC and Siemens TIA portal for programming a ladder logic diagram. The PLC we selected has a work memory of 250 kB, 24 V DC power supply with 24V DC 32 digital inputs, 16 digital outputs, 4 analog inputs, and 2 analog outputs on board.

For a better explanation, we have divided the program into 3 networks. The function of each network is discussed below.

#### Network 1

It is the cycle Start and Stop network. Push Button (PB) is used for starting and stopping purposes.

A Normally Closed (NC) input is taken for Stopping the cycle. A Normally Open (NO) input is taken to start the cycle. A memory (M0.0) is taken that will be used in further networks. This memory is latched to the Start PB.

The cycle is started by pressing START PB (I0.0) and is stopped by pressing STOP PB(I0.1).

#### Network 2

Network 2 is used only to create memories of respective switches that will be further used in the main program in network 3.

Memory M0.1 is the memory of switch 2. Similarly, memory M0.2 and M0.3 are memories of switch 3 and Switch 4 respectively.

#### Network 3

Network 3 contains the main program that gives desired outputs of the given problem statement.

Switch 1 is normally open (N.O) switch connected in parallel to all other switches in the network. Switch 2 memory (N.C) and switch 3 memory (N.O) are in parallel connected to the output Motor M1.

Switch m memory (N.C) and switch 4 memory (N.O) are in parallel connected to the output Motor M2, and switch 4 memory (N.C) is connected in series with the output buzzer B1