0:05
Hello everyone, welcome to automation
0:08
community. Today in this video we are
0:11
going to discuss an example in which we
0:13
will be drawing ladder diagram for
0:15
boolean expressions. So let's look at
0:20
Example 38 y1 is equal to a1
0:27
dot b1. And the second one is y2 is
0:30
equal to a2 dob b2 plus c2 dot d2.
0:36
So for the b first boolean expression
0:40
we have two inputs to turn on output y1.
0:45
So for a1 there is a not there. So we
0:49
will use a normally closed contact for
0:51
a1 and a normally open contact for b1.
0:55
And we will connect these two contacts
0:58
in series. So there is and logic gain
1:01
between A1 and B1. And for the second
1:04
boolean expression we have four inputs
1:07
A2 B2 C2 and D2. So A2 and B2 will be
1:12
connected in series and C2 and D2 will
1:15
be connected in series but in parall to
1:18
A2 dot B2. So let's move to codicuses
1:21
where we will draw the ladder diagram
1:23
for these boolean expressions one by
1:26
So I will open cortices.
1:40
Let's create a new project. First we can
1:43
write the name of the project here.
1:50
13. We can also select the location
1:53
where this file will be saved. We can
1:55
also use a template. We can select it as
1:58
standard project and click on open.
2:04
We can select this device from this
2:06
drop-own list and select PLC programming
2:08
as ladder logic diagram and then click
2:15
So click on double click on PLC
2:17
programming. So here we will draw the
2:19
ladder diagram. So we have two inputs A1
2:23
and B1. There is A1 do A1 not dot B1. So
2:29
for A1 we will use a normally closed
2:31
contact. So I will insert a normally
2:33
closed contact for A1 and I will insert
2:36
a normally open contact for B2. And I
2:39
will insert a coil for Y1.
2:53
and then this will be y1.
3:04
So the coil will be used for y1 output
3:11
And then we have another boolean
3:13
expression that is a2 d2 + c2 d2. So uh
3:20
a2 and d2 will be connected in series.
3:23
Okay. So I will insert one more network
3:25
below. So here we will insert two
3:28
normally open contacts. So this will be
3:31
a2. Okay. And this normally open contact
3:36
will be b2. So it was A2 dot V2
3:41
and then we have plus sign that means
3:44
there will be or logic 8. So uh we have
3:48
C2 and D2 that will be connected in
3:51
parallel with this A2B2.
3:53
So here we need to select both these. I
4:00
Press shift. Keep pressing the shift
4:03
button. Then click on B2 and then insert
4:07
contact parallel to this and then delete
4:12
So this normally open contact will be
4:15
C2. Okay. And we need to add one more
4:18
normally open contact. This will be D2.
4:23
Okay. So this is A2 dot B2 plus C2. D2.
4:28
And then we will insert a coil and this
4:36
So this output Y will be on.
4:59
Okay. So, Y1 will be on when A1 is off
5:03
and B1 is on. Okay. So, for output Y1 to
5:07
be on, A should be off and B should be
5:09
on. And then for output Y to be on,
5:12
either A2 and B2 both should be on or C2
5:16
and D2 both should be on. If A2 and D2
5:20
are on, then output Y2 will not be on
5:23
either. If A1 A2 is on then with that B2
5:26
should be on then only output Y2 will be
5:28
on and then if C2 is on then with that
5:32
D2 should be on then Y2 will be on.
5:36
Okay. So let's generate code.
5:40
Go to online start simulation
5:48
and then start. Okay. So for now A1 is
5:52
off and we need to turn on B1 to turn on
5:54
Y1. So I will make it true. I will make
5:58
B1 true and then go to debug and write
6:01
values. And you can see Y1 is on. If I
6:05
turn on A1 as well. I will make it true.
6:08
Go to debug and write values. Then you
6:11
can see the signal will not pass through
6:13
this because this is a normally closed
6:15
contact. In true state the signal will
6:17
not pass through this. As a result, this
6:19
Y1 will not turn on. It will turn off.
6:22
And then for output Y2 to be on, we need
6:29
and B2. Let's debug it. Write values.
6:36
You can see here Y2 turned on when I
6:38
turned on A2 and B2. If I turn off B2,
6:42
you can see here the debug and write
6:45
value. You can see Y2 is off when I turn
6:48
off B2. And then I will turn off A2
6:53
and turn on C2 and D2. And you can see
7:01
when I turn on C2 and D2, Y2 turn on. If
7:05
I turn off D2 or C2, when I turn off D2,
7:09
the output Y2 will turn off. So output
7:13
for output Y2 be Y2 to be on A2 and B2
7:16
both should be on or C2 and D2 both
7:20
should be on. It was all about this
7:22
example. Thank you for watching.