Learn CODESYS PLC programming with toggle switch and solenoid control logic. This tutorial explains how toggle switches can be used to control solenoid-operated devices using ladder logic. Understand the basic operation of toggle logic, output control, and practical implementation in CODESYS PLC programming.
** Video Topics **
0:00 Solenoid PLC Exercise
1:34 CODESYS
1:47 Create PLC Project
2:30 Design Ladder Diagram
3:37 Latching
4:55 Solenoid Valve
6:10 Logic Explanation
7:20 Online Simulation
#training #codesys #solenoid
✨ FOLLOW US ✨
👉WhatsApp: https://whatsapp.com/channel/0029VaAbUecLNSa4rDPOV31o
👉Telegram: https://t.me/+u3qORX5FKec1NjA1
👉LinkedIn: https://www.linkedin.com/company/instrumentationtools/
👉Facebook: https://www.facebook.com/instrumentationtoolss/
👉Instagram: https://www.instagram.com/instrumentationtools/
Show More Show Less View Video Transcript
0:00
[Music]
0:06
Hello everyone, welcome to automation
0:09
community. Today in this video we are
0:12
going to discuss an example in which we
0:15
will be controlling four solenoids using
0:18
two switches. So let's look at the
0:20
example first.
0:23
Example nine. If toggle switch one is on
0:26
then solenoid one and solenoid 2 will be
0:28
on. If toggle switch one is off, then
0:31
solenoid one will be off and solenoid 2
0:34
will be on. If toggle switch two is on
0:37
then solenoid 3 and solenoid 4 will be
0:40
on. If toggle switch 2 is off then
0:43
solenoid 3 will be off and solenoid 4
0:46
will be on. That means when to switch
0:50
one is turned on both the solenoids turn
0:53
on and when it is turned off one
0:56
solenoid will turn off but the other
0:59
solenoid will remain on. Similarly when
1:02
toggle switch two is turned on both the
1:05
solenoid soilite 3 and solenoide 4 both
1:08
turn on and when switch is turned off
1:10
one solenoid turns off but the second
1:14
solenoid remains on. So for this example
1:18
we will be using normally open contacts
1:21
and coils with that we will be also
1:24
implementing lateral. So let's move to
1:27
codicuses where we will draw a ladder
1:29
diagram for this example and also we
1:32
will do it simulation.
1:34
So I will open cortices.
1:46
Let's create a new project here. You can
1:50
uh select template as standard project.
1:52
You can rename the rename here as
1:55
example
1:57
9 and you can also
2:00
you can also select the location of the
2:03
file and then click on okay.
2:08
Here
2:13
you need to uh uh select the PLC
2:16
programming. Keep it ladder logic
2:18
diagram and click on open.
2:25
Go to PLC program. So here we will draw
2:27
the ladder diagram.
2:30
So firstly we will insert a normally
2:33
open contact. It will be for toggle.
2:37
switch one and then we will insert a
2:42
coil here for solenoid one. So this will
2:45
be solenoid one. Okay.
2:50
So when toggle switch one when we will
2:53
turn it on solenoid one gets on and when
2:56
we will turn it off solenoid one gets
2:58
on. And then let's insert network below
3:02
this and you insert a normally open
3:05
contact.
3:07
And this normally open contact will be
3:10
again toggle switch one
3:27
and then we will insert a coil and this
3:30
coil will be solenoid
3:33
2. Okay.
3:38
And after that when toggle switch one is
3:41
turned on both the solenoid gets on it's
3:43
okay. But when toggle switch one is
3:46
turned off both the solenoids gets off
3:49
but only solenoid one should turn off
3:53
and this solenoid 2 should remain on.
3:55
For that we will implement latching
3:58
here. So we will insert branch here or
4:02
we can simply add a normally open
4:05
contact parallel. So we will insert a
4:09
normally open contact here at parall to
4:12
this toggle switch one and we will give
4:16
the tag to this normally open contact
4:18
same as solenoid 2. So this will be
4:21
solenoid
4:22
2. So in this way we have done latching.
4:26
So when toggle switch one is turned off.
4:28
Solenoi 2 remains on. Similarly, we will
4:32
insert one more network here
4:35
and we will insert a normally open
4:37
contact and a coil. This normally open
4:41
contact will be toggle
4:45
switch two.
4:48
Okay. And this coil will be solenoid 3.
4:53
Solenoid 3. So when toggle switch two is
4:57
turned on solenoid 3 get on and with
5:01
that solenoid 4 should also get on. So
5:04
for that we will insert one more network
5:07
and add a normally open contact and a
5:11
coil. So this normally open contact will
5:14
be toggle switch two
5:19
and this will be this coil will be
5:22
solenoid
5:24
4.
5:25
Okay. So when toggle switch 2 is turned
5:28
on, solenoid 3 and solenoid 4 both gets
5:32
on and when toggle switch 2 is turned
5:34
off solenoid 3 should get off but solid
5:38
4 should remain on but for now solenite
5:41
4 gets off. So to keep it on even when
5:44
we turn off uh this toggle switch two we
5:47
will implement latching. So with a
5:50
toggle switch two we will insert a
5:52
contact parall to it. So in this way we
5:55
have inserted a normally open contact
5:57
parall to this toggle switch two and we
6:00
will tag this normally open contact same
6:02
as this solenoid 4. So it is solenoid 4.
6:05
So in this way we have implemented
6:08
latching here. So when toggle switch two
6:10
is turned off solenoid 4 remains on.
6:14
So when toggle switch one is turned on
6:16
the signal will pass through this
6:17
solenoid one gets on. Similarly, the
6:20
signal will also pass through this as
6:22
solenoid 2 gets on. And then when toggle
6:26
switch one is turned off, the signal
6:28
will not pass through this as this is a
6:30
normally open contact. So solenoid one
6:33
gets off. Similarly, the signal will not
6:36
pass through this toggle switch one. But
6:38
we have large solenoid 2 here. So on
6:41
turning off this toggle switch one, the
6:43
signal will not pass through this, but
6:45
it will pass through this contact. So
6:48
the soil knight 2 remains on. Similarly
6:51
when toggle switch two is turned on the
6:53
signal passes through this soil 3 gets
6:56
on and also the signal passes through
6:58
this contact as well the so four gets
7:01
on. And when toggle switch two is turned
7:04
off the signal will not pass through
7:06
this. As a result the solenite 3 turns
7:08
off. But due to latching the signal will
7:12
pass through this and keep the solid 4
7:15
on even when we turn off this toggle
7:18
switch too. For now we will generate
7:21
code.
7:24
Go to online and start simulation.
7:28
Login.
7:30
Yes.
7:34
And then start. As you can see here all
7:36
all the solenoids are off.
7:39
Because
7:45
because all the toggle switches are off.
7:47
Both the toggle switches are off. So
7:50
firstly we will click here make it true
7:52
and then go to debug and write values.
7:55
As you can see here when we turn on this
7:57
toggle switch solenoid one and solenoid
8:00
2 both the solenoides turn on. You can
8:03
see here the signal passes through this
8:05
as well as this and makes these two
8:08
solenoides on. And when I turn off this
8:11
toggle switch one, I click here make it
8:13
false and then go to debug and write
8:15
values. You can see here the signal does
8:18
not pass through this. As a result, the
8:20
solenoid one gets off. Similarly, this
8:22
toggle switch one does not allow signal
8:24
to pass through this. But the signal
8:27
passes through this contact which is a
8:28
solenoid I2 and which keeps the soleno
8:31
I2 on even when we turn off this toggle
8:35
switch one. Similarly when we turn on
8:38
toggle switch two click here make it
8:41
true then go to uh go to debug and write
8:45
values. You can see here solenoid 3 and
8:47
solenoid 4 both are on. And when we turn
8:51
it off, make it false. Go to debug and
8:54
write values. So 93 turns off. But so 94
8:57
remains on. It remains on due to the
9:00
latching here. We have use this normally
9:02
open contact same as output. So the
9:05
signal passes through this and keeps
9:07
this solite for on even when we turn off
9:11
this toggle switch too. It was all about
9:14
this example. Thank you for watching.
9:18
[Music]
#Science

