May 13, 2020

Combinational logic operation using AND gate and OR gate

Application:-Draw electrical diagram and write PLC program for combinational logic for 3 switches. Use AND gate and OR gate for three switches combinational logic. Operate lamp in the following condition,
If S1 or S2 is ON and S3 is ON, the lamp will be ON.
Components:-Programmable logic controller, Electrical panel, wires, 24VDC switches with NO contacts, 24VDC indication lamp, 24 VDC relay.


Diagram:-Electrical wiring diagram for combinational logic.






Explanation:-
Here we have 3 switches S1, S2, and S3. So the condition is either S1 or S2 should be ON or S3 should be ON. So S1 and S2 should be put in OR gate and this combination should be put in series with S3.
Hence the lamp will be ON if S1 or S 2 is ON and S3 is ON.
PLC program:-
Write the ladder program for combinational logic using ladder diagram language. Here for ladder logic, we can use any PLC system. For PLC logic we need digital inputs and outputs.
For our application, all switches are digital inputs, and the lamp is a digital output. To define digital input address and output address as per below explanation,

Digital inputs:-
S1=I0.0
S2=I0.1
S3=I0.2
Digital Output:-
Lamp=Q0.0
Memory coil:-
Memory bit-M0.0










PLC program Explanation:-
In-network 1 we have considered three digital inputs for three switches S1, S2, and S3. So we have taken NO contact of S1 (I0.0) and S2 (I0.1) in OR gate and. So when S1 or S2 OFF, memory bit (M0.0) will be ON.










Two switches series operation

Application:-Operate lamp if two-panel switches are from different two panels. Draw electrical drawing and write PLC programs using ladder diagram language.

Diagram:-Electrical wiring diagram of two switches series operation.




Explanation:-
For series operation of two switches we can use AND gate logic. Here there are two switches, panel 1 switch, and panel 2 switches. As per AND gate we need to put panel 1 switch NO contact in series with panel 2 switch NO contact as shown in the above electrical diagram.
PLC program:-
Write the ladder program for series operation using ladder diagram language. Here for ladder logic, we can use any PLC system. For PLC logic we need digital inputs and outputs.
For our application, all switches are digital inputs and the lamp is a digital output. To define digital input address and output address as per below explanation,
Digital inputs:-
Panel 1 switch=I0.0
Panel 2 switch=I0.1
Digital Output:-
Lamp=Q0.0
Memory coil:-

M=Memory bit


















PLC program Explanation:-
In-network 1 we have considered two digital inputs for two switches panel 1 switch and panel 2 switch. So we have taken NO contact of panel 1 switch (I0.0) in series with panel 2 switch (I0.1) for series operation. So when both are ON, memory bit (M0.0) will be ON.

In-network 2 we have taken NO contact of memory bit (M0.0) to operate a lamp (Q0.0).







Two switches parallel operation



Application:-Make operation in two different control panels so the operator can operate one lamp from two different control rooms. One panel is in the control room 1 and the second panel is in control room 2. The lamp can be operated from two different switches. Explain using and electrical drawing and write PLC program for application.
Components:-Programmable logic controller, Electrical panels, wires, 24VDC switches with NO contacts, 24VDC indication lamp, 24 VDC relay.

Diagram:-Electrical wiring diagram of two switches parallel operation.



























Explanation:-
As per our application, we can use the above OR gate for parallel operation. In the application, we are using two switches and one lamp for indication. If panel switch 1 or Panel switch 2 pressed, an indication lamp should be ON. So in the above electrical wiring diagram, we have used panel switch 1 and panel switch 2 in parallel connection so electrical supply can flow either from panel switch 1or Panel switch 2.

PLC program:-
Write the ladder program for parallel operation using ladder diagram language. Here for ladder logic, we can use any PLC system. For PLC logic we need digital inputs and outputs.
For our application, all switches are digital inputs and lamp is a digital output. To define digital input address and output address as per below explanation,

 Digital inputs:-
Panel 1 switch=I0.0
Panel 2 switch=I0.1
Digital Output:-
Lamp=Q0.0
Memory coil:-

Memory bit-M0.0
















PLC program Explanation:-
In-network 1 we have considered two digital inputs for two panel 1 switch (I0.0) and panel 2 switch (I0.1). So we have taken NO contact of panel 1 switch (I0.0) in parallel with panel 2 switch (I0.1) for parallel operation. So when panel 1 switch or panel 2 switch ON, memory bit (M0.0) will be ON.
In-network 2 we have taken NO contact of memory bit (M0.0) to operate lamp (Q0.0).