In this video, we will discuss the basic functions. Okay
On the left side, if you see, these are the basic functions and R, NOR, NAND, XOR, et cetera
Here we will discuss the R logic gate and NOR logic gate
So select the R logic gate and click in this white space one time
This is the R logic block. The symbol for this R logic block is greater than or equal to 1
This block is having 4 inputs. This is 1, 2, 3, 4 and 1 output
So the R logic function is if any one of the input is high or on, then the output will
be on. If all the inputs are off, the output is off
The R logic gate is represented by parallel circuit. See this is the equivalent symbol for the R logic block, which is having 4 inputs and
1 output. So 4 switches which are normally open contact are in parallel and 1 output
So this is the equivalent symbol using make contacts, that means normally open contact
If you see, there are 4 inputs. Suppose we have only 2 inputs, then we can use the 2 inputs only, input 1, input 2
There is no need to use input 3 and input 4 and unused block input status will be taken
as 0. There is no need to define any status at the unused inputs
We can leave it like that. If you see the truth table, the 1, 2, 3, 4 are my inputs, input 1, input 2, input 3
input 4 and Q is the output. The output is off when all the inputs are off
If any one of the input is high, then the output is high or any one of the input is
on, then the output is on. That is why if you see, except the first case, which is all 0s, in remaining cases, the output
is on. We will simulate this using our software. So go to the software
So we are having the R block. Now I will take 3 inputs
You can take 4 inputs also. I am just taking 3 inputs
So go to constants under digital, select the input and take 3 inputs and connect the input
I1 with block 1, input 1, input 2, input 3. So this is overlapping
Select the line and just move aside. If you see, whenever we created a new block, the block number will be assigned automatically
That is why for this R block, B001 is assigned by default
If you create another block, another R block or another logic function, then B2, B3 will
be added. Check it once, take one R, create one more R, B2, B3 like that
So double click on R function, you can assign the block name also or you can assign the
comment also. I will just write R logic
I will take one output and I will connect the output with the R logic
So instead of using I1, I2, I3, I want to use the toggle switches in the Ioverboard
The toggle switches input address is, if you see input 3, input 4, input 5
So I will assign I3, I4, I5. So I am changing this one to I3
So I3 is already available at the bottom. So we have to assign something else
First I will change this one, I5, so that these will be in series
I4, I2, sorry I3
You can do the simulation also. So just go to tools and select simulation
If you do not have the hardware, you can use the simulation. I3, I4, I5 are the inputs, the Q1 is the output
To select the I3, make it on, my I3 is on. See I3 color changed to red
The R logic function is, if any one of the input is on, then the output is on
That is why the R logic block output is on. And this is connected to the Q1
So Q1 is also on. See make I4 also on, same status, because any one of the input is high means the output
is high. Similarly all my inputs are on, the output is on
If any of the input is on, then also the output is on
If all the inputs are off, then the output is off. See so this is the simulation
Now we will download this logic into the PLC. Okay, so this is the PLC
We will download and we will test it with the online test mode
So go to tools, transfer, select the first one, PC to logo
Enter the IP address or enter the IP address and click OK
So it is asking us to change to stop mode. So yes. Now the program is downloading, see the PLC display status
Program download is completed. It is again asking us to change to run mode. Yes
Now the PLC started. So I will turn on the input 3. Okay
So the input 3 is on. The output 1 is also on
See in the Ivo board, I will turn on the input 4
Again same status, input 5, same status, input 3, 4 off and input 5, same status
If you see, we are not using the online test mode in this case
The program is downloaded into the PLC and we are using the inputs and outputs
Now use the online test mode. In this toolbar, you select the PLC icon
This is the online test mode so that the Ivo status will be updated in the program also
real time. Okay. Right now the Ivo's are not showing us any status, right
Blue or red, nothing is there. It is the plain. So click on the online test mode
If you do not have the real hardware, you can ignore this step. Okay
Select the IP address, click okay. Now we are in the online test mode
Remember the Ivo status, which we are seeing in the Ivo board, the same status will be
updated in the program also. Right now input 5 is on, so input 5 is off
The output is off. We can see the same status in the program
See all inputs and output are our logic function. All are in blue color
Everything is logic 0. I will make input 4 on. What happens
The input 4 is on, you can see in the program, the input 4 change to red color
That means I4 status is 1, I3 and I5 inputs are 0
That is why our logic output is high. The output is on
You can see the same status at the simulation window, bottom window, bottom simulation window
The Q1 is on and in Ivo board also output 1 is on
So this is how you can use the online test mode. It is very helpful in a running plant. Okay
Now similarly, we will check the NOR logic. Select this white arrow, so simulation mode will be off or online mode will be off
So now take the NOR logic block. So this is the NOR
Now I will use output 2, Q2. So take one more output
I will use the same inputs I3, I4, I5. Okay. Connect the output and connect the I3
Connect the I4 and I5. And add the comment for the block, which is NOR logic
The NOR logic is the opposite of the OR logic. Okay. So go to the truth table
Before that, we will see the equivalent circuit for the NOR logic
The NOR logic, which is nothing but NOT of OR. Okay. Normally NOR logic is the series circuit with break contacts
Break contacts means normally closed contacts. If there are 4 inputs, then 4 normally closed contact switches in the series
This block is also having 4 inputs by default and 1 output
If you are not using the input, any of the input, then by default it will consider it
as logic 0. And if you see the truth table, it is opposite of the OR logic
When all the inputs are OFF, then the output is ON. If any of the input or all of the inputs are ON, then output is OFF. Okay
In this case, output will be ON only when all inputs are OFF
Otherwise, output is OFF. Now, we will test this in the software
Go to software. First, we will do the simulation and then we will do the online test mode
I am doing the simulation because you may not have the hardware with you
That is why I am showing the simulation also. Okay. So go to tools and select simulation
See the Q1 is ON and Q2 is OFF. Q1 is OR logic output, the Q2 is NOR logic output
As we are using the same inputs and OR logic and NOR logic functions, the Q1, Q2 will be
opposite always with the same input. In the previous simulation, we turned on the I4 input 4
So it is taking the same status from the previous simulation. We can change the status now
I will make all the inputs OFF. Then OR logic output is OFF and NOR logic output is ON
That is why Q1 is OFF, the Q2 is ON. Now we will take the hardware and we will download the program
You can click this icon directly on the toolbar. See the PC2 logo
Click on this icon, select the IP, click okay. Click yes
Program is downloading. Click yes. And go to online mode, online test mode
Click this PLC icon, this one
Again okay. See from the program you can see I4 is ON
I will turn OFF the I4. See output 1 is OFF, output 2 is ON
Because all inputs are OFF, OR logic output is OFF and NOR logic output is ON
That is why output 1 is OFF, output 2 is ON. I will make input 3 ON
So see I3 is ON. The program also you can see I3 is in red color
That is why OR logic output is ON, output 1 is ON and NOR logic output is OFF
Q2 means output 2 is OFF. Again turn ON I4, same status
I5, same status. Okay if you turn OFF all the inputs, then OR logic again will be OFF and NOR logic output
will be ON. You can see the status from the I4 port and also on the program
From the color status, blue color and red color, blue color is OFF, logic 0, red color
is ON, logic 1. And from the simulation window at the bottom, the Q1, Q2, ON and OFF status, we can see
it from here. I will meet you in the next video. Thank you