In this article, we are going to discuss another PLC ladder logic example i.e. the First priority circuit.
The first priority circuit is the circuit in which light glows at the end of the contestant that presses the button first. That means, if there are three group of contestants and the host asks a question, the group that presses the button first will get the chance to answer first.
Table of Contents
Problem Statement
Draw a ladder logic diagram for first in priority circuit using Siemens Tia Portal.
There are 3 groups participating in the quiz game
- Pupil group
- High School students group
- Professor group
If they want to get the chance of answering the question from the host, they must press the answer button on their table first. Other groups’ pressing will be invalid if any group gets the chance successfully.
There are 2 answer buttons for the pupil group and professor group and 1 answer button for the high school student group. In order to give preferential treatment to the pupil group, Y0 will be ON if any of X0 or X1 is pressed. However, in order to limit the professor group, Y2 will be ON when X2 is pressed.
If the host presses X5 (Reset button), Y0, Y1, and Y2 will be OFF.
List of Input and Output tags
In this example, we have used Siemens S7-1200 PLC and Siemens TIA portal for programming a ladder logic diagram. The PLC we selected has a work memory of 100 kb, 24 V DC power supply with 24V DC 14 digital inputs, 10 digital outputs, and 2 analog inputs on board.
Address | Device | Description | Type |
I0.0 | X5 | RESET BUTTON FOR HOST | INPUT |
I0.1 | X0 | ANSWER BUTTON FOR PUPIL GROUP | INPUT |
I0.2 | X1 | ANSWER BUTTON FOR PUPIL GROUP | INPUT |
I0.3 | X2 | ANSWER BUTTON FOR HIGH SCHOOL STUDENT GROUP | INPUT |
I0.4 | X3 | ANSWER BUTTON FOR PROFESSOR GROUP | INPUT |
I0.5 | X4 | ANSWER BUTTON FOR PROFESSOR GROUP | INPUT |
Q0.0 | RESET | ALL INDICATOR RESET | OUTPUT |
Q0.1 | Y0 | INDICATOR FOR PUPIL GROUP | OUTPUT |
Q0.2 | Y1 | INDICATOR FOR HIGH SCHOOL STUDENTS GROUP | OUTPUT |
Q0.3 | Y2 | INDICATOR FOR PROFESSOR GROUP | OUTPUT |
First Priority Circuit Ladder Logic Diagram
To draw a ladder logic diagram, we use the Siemens TIA portal. For a better explanation, we have divided the program into 4 networks. The function of each network is discussed below.
Network 1
If the host didn’t press the reset button X5, instruction will be executed and the program will be executed normally.

When the host presses the reset button, the program will not be executed. The outputs Y0, Y1, and Y2 will be out of power, and all the indicators for the 3 groups will be OFF. When the host releases the button X5, the program will be executed normally again, and the new round will begin as well.
Network 2
The answer buttons are connected in parallel connection (X0 and X1) for the pupil group, and in series connection (X3 and X4) for the professor group. For the high school students group, there is only one answer button.
If one group presses the answer button successfully, its indicator will form a latching circuit, that is, the indicator will be ON even the button is released.
Through the interlock circuit, any other button pressing will be invalid as long as one indicator is ON.

This network shows, if the pupil group presses the push button first, the output Y0 will turn ON.
Network 3

This network shows, if the high school students group presses the push button first, the output Y1 will turn ON.
Network 4

This network shows, if both the users from the professor group presses the push button first, then only output Y2 will turn ON.
Networks 1, 2, 3, and 4 can be combined to form a single network of sequential motor control. The same is shown in the figure below.

Download first priority circuit plc program, plc programming examples, and solutions pdf.
If you like this article, please subscribe to our Youtube channel for more updates.