Understand how to create and execute a PLC program using CODESYS for automation example.
#CODESYS #PLCProgramming #PLC #IndustrialAutomation #Automation #PLCTutorial #LadderLogic #InstrumentationTools
Tags:
CODESYS, PLC programming, PLC program, CODESYS tutorial, PLC automation, automation example, CODESYS programming, PLC ladder logic, industrial automation, PLC training, PLC example, PLC programming tutorial, CODESYS PLC, automation control, PLC inputs and outputs, IEC 61131-3, PLC software, control systems, automation engineering, instrumentation tools
Show More Show Less View Video Transcript
0:05
Hello everyone, welcome to automation
0:07
community. Today in this video we are
0:10
going to discuss another example in
0:12
which we will draw a ladder diagram for
0:14
digital logic circuit. So let's look at
0:17
the example first.
0:19
Example 26.
0:22
As you can see here we have six inputs
0:25
A, B, C, D, E, and F. For input B, D and
0:30
F we will be using normally closed
0:32
contacts. So in this way we will be
0:34
implementing no autologic gate. As you
0:37
can see this symbol this symbol this and
0:40
this these symbols are representing no
0:42
autologic gate. And for input A C and E
0:47
we will be using normally open contacts.
0:50
And then A and B will be connected
0:54
in series with each other. So this the
0:57
symbol is denoting an logic gate. So A
1:00
and B in series, C and D in series and E
1:03
F E and F in series. But A B in parallel
1:07
to CD and then EF
1:10
in parallel to this CD.
1:13
So A in series and below that C and D in
1:17
series below that E and F in series. So
1:20
we are implementing add logic gates or
1:23
logic gate and not logic gates. So let's
1:27
move to codicises where we will draw a
1:30
ladder diagram for this example.
1:33
So I will open codices.
1:45
Let's create a new project here.
1:51
I will select the template as standard
1:53
project. We can also name the project as
1:58
example
2:00
26
2:02
and we can also select the location
2:03
where we want to select we want to save
2:06
our project and then click on okay.
2:11
After that
2:13
we need to select the device. Here we
2:15
have many devices
2:17
uh like cortices control RTE like I will
2:21
be using this one. Okay. And after that
2:23
we need to select the language
2:25
programming. Okay. So uh so PLC can be
2:29
programmed in many ways like continuous
2:32
uh function chart, function block
2:34
diagram, CFC's, LDS, okay, sequential
2:37
function chart or structured text. For
2:40
now we will be using lad logic diagram.
2:42
So I will select this and click on okay.
2:51
After that go to view and click on
2:54
devices. Okay. Let's
2:59
expand this. Okay. Then again then
3:02
application expand. Okay. Then we have
3:04
this PLC. Let's double click on it.
3:07
Okay. So here we will be drawing ladder
3:10
diagram.
3:11
So firstly we have two inputs A and B.
3:15
For input A I will be inserting a
3:17
normally open contact and this will be
3:20
for A. So this is for A. And then we
3:25
have B not. We have to implement not
3:27
logic gate. For that I will insert a
3:30
normally closed contact for B.
3:34
So this is A B KN. And then we have to
3:37
implement our logic gate. So we have to
3:40
connect C and D with series with each
3:43
other. In series with each other but in
3:45
parallel to this AB.
3:48
So for that I will insert
3:51
contact parallel here
3:54
and then like this. Okay. So this will
3:58
be C. And after that we have one more
4:01
input that is D. But for D we will be
4:04
using normally closed contact. Okay. So
4:07
for that I will insert a negated contact
4:09
here. Sorry here.
4:12
A negated contact.
4:17
A negated contact here. So I will delete
4:20
this. Okay. So this is for D. So in this
4:23
way we have implemented not logic gate.
4:25
So how do we implement not logic gate?
4:28
By using a negated contact. By using a
4:31
normally closed contact. So this is a b
4:34
not plus. Plus means in parallel C D not
4:39
and then we have again plus. Plus means
4:41
again we have to connect in parallel.
4:44
Okay. So I have uh I have inserted a
4:47
negated contact in parallel. Let's move
4:50
it like this. Okay. So this will be for
4:53
E and then we have F not. Okay. For F
4:57
not to implement not logic gate I will
4:59
insert a negated contact here. So this
5:01
will be F.
5:03
And then we have a coil for the output
5:06
Y. Here I I have inserted the coil here.
5:09
So this will be for Y.
5:11
So in this way we have drawn the ladder
5:14
diagram for that digital logic circuit.
5:16
So this is a B plus C B plus C E F.
5:23
Okay. So for output Y to be on we have
5:26
three choices. Either A should be on and
5:30
B should be off. Okay. C should be on, D
5:33
should be off. Or E should be on and F
5:36
should be off. Okay. So if A is on, B
5:39
should be off. Then the output Y will
5:41
turn on. If C is on, D should be off.
5:44
The output Y will turn on. If A is on, F
5:47
should be off, then the output Y will be
5:49
on. If A is on and B is also on, then
5:52
the output Y will not turn on. Okay? So
5:56
either A or C or E should be on. And
6:00
with that if A is on B should be off. If
6:03
C is on D should be off. If A is on F
6:06
should be off. So A B not C D knot E F
6:11
not. Okay we have a choice here. So the
6:13
output Y will turn on. Okay. So let's uh
6:18
generate a code for this
6:23
and after that go to online and start
6:25
simulation.
6:29
After that we need to log in here.
6:32
Yes
6:39
and then start.
6:42
So as you can see here the output Y is
6:45
off. Okay. To turn it on I will make the
6:50
input A true. Let's see what happens.
6:53
Let's write the values here. And you can
6:55
see here the output Y turn on. Why?
6:58
because A is on and B is off then the
7:01
output Y will is on. Okay, if I turn on
7:04
B as well. If I turn on B as well, let's
7:08
go to debug and write values. You can
7:10
see here the output Y turned off. Okay,
7:13
so if A is on, B should be off. Then
7:16
only the output Y will turn on. Okay, so
7:18
instead of using A and B, we can also
7:20
use C and D. Okay, if I turn on C,
7:25
if I turn on C, go to debug and write
7:28
values, you can see here the output Y
7:30
turned on. Okay, why turned on? Because
7:33
C is on and D is off. If I turn on D as
7:36
well, the output Y will turn off. Yes,
7:39
the output Y turned off. Okay, so
7:41
instead of C, I can also turn on the
7:44
input E. So when I turn on input E, go
7:47
to debug and write values. And you can
7:50
see here the output Y turn on. Okay. So
7:54
if I turn on F as well, if I turn on F
7:58
as well, the output Y turn off. Okay. So
8:03
A should be on, B should be off, then
8:05
the output Y will turn on. Or C should
8:08
be on, D should be off, then the output
8:09
Y will turn on. Or E should be on, F
8:12
should be off, then the output Y will
8:14
turn on. It was all about this example.
8:17
Thank you for watching.
Jobs & Education

