0:07
hello everyone myself badas in this
0:10
video I will discuss about analog
0:15
comparison here we have two analog
0:19
inputs ai1 and ai2 analog input one
0:24
analog input two so we have to compare
0:30
or we have to generate three status bits
0:33
which are greater than less than and
0:37
to for this we are not going to use
0:41
comparator block and we have to complete
0:51
okay first open your PLC
0:55
software now take two analog inputs
1:20
2 now I will use two analog amplifier
1:26
blocks this is for scaling and also
1:30
in logo PLC we have to use analog
1:34
amplifier block for driving an analog
1:38
input or for scaling an analog input
1:42
okay and give the block name this
1:51
1 and I want to use 0 to 100 scale so I
1:55
have to adjust the gain the default is 0
1:58
to th000 and I have to enter
2:02
0.1 then the scale is 0 to 100 you can
2:06
use any range as per your
2:11
okay and this one is I will give the
2:14
block name amplifier 2 and again I will
2:20
0.1 so the output range is 0 to 100 the
2:25
default range in logo PLC is 0 to 1,000
2:45
okay now connect these analog input one
2:50
and two to these blocks
3:01
okay now for comparison purpose I will
3:05
use analog threshold trigger blocks so
3:18
threshold trigger blocks so I will give
3:22
the comment instead of block name
3:39
and I give the comment same for the
3:46
okay now connect this amplifier one with
3:50
analog threshold Trigger
3:52
1 similarly connect the second one
3:56
amplifier to Output with analog
4:17
now for comparison purpose we have to
4:21
give analog input one values in analog
4:28
block s similarly we have to give analog
4:33
two analog input two values to the
4:37
unlock threshold trigger one block then
4:40
only the comparison can happen right
4:43
each block must have both inputs for
4:46
that purpose click this plus symbol and
4:51
here also plus symbol
4:53
and unlock the should Trigger 2
4:56
also now what I will do I will connect
5:00
analog amplifier 1 output which is
5:05
ax to the analog threshold trigger to on
5:12
field again I will connect analog
5:25
okay I just want the comparison must
5:28
happen with single number only there is
5:31
no need to compare on value and off
5:34
value at different values right that is
5:37
why I connected this ax to the both
5:40
inputs of on and off of analog threshold
5:44
Trigger 2 block similarly I will do the
5:47
same thing for the next one I click this
6:04
Conn at amplifier 2 output ax to
6:08
the analog threshold trigger one on
6:13
field and again ax to
6:26
clear now I will take two digital
6:41
outputs and give the name for q1 this is
6:47
than a i1 greater than ai2
7:22
okay now the program is
7:26
completed so I will go to the simulation
7:30
go to tools and start
7:36
simulation now ai1 and ai2 both are 0
7:53
okay right now I will increase a i1
8:01
now ai1 is 20 ai2 is zero we can see the
8:10
value a amplifier 2 is zero and ai1 is
8:18
so ai1 is greater than ai2 that is why
8:23
the greater than output is on q1 is on
8:36
ai2 now ai2 is also 20 that means both
8:44
20 if you see these values will go to
8:48
this on and off parameters
8:52
also now greater than is off less than
8:54
is off now I will increase anlog input
8:58
2 now it is 40 ai1 is 20 ai2 is
9:07
means this less than is on ai1 is less
9:15
see the on and off parameters the
9:19
reference values of both the analog
9:21
threshold trigger one and two blocks are
9:26
dynamically then only this comparison is
9:30
happen that is why we connected this ax
9:34
this on and off parameters we just want
9:38
to compare at single value that is why
9:41
both are connected to the same
9:43
values you can try with a different
9:45
values what will happen you can observe
9:48
in your simulation no
9:53
required so this is how we can do the
10:00
without using comparator
10:04
okay now a task for you if you see we
10:09
completed greater than less than right
10:13
and the pending one is equal to I will
10:17
give you one hint now right now ai 1 is
10:20
50 ai2 is 50 both are same values and
10:25
when both are same values if you see
10:27
analog threshold trigger one output is
10:30
off similarly threshold trigger two
10:33
block output is also off you can use
10:37
status to generate equal to status equal
10:42
to Output okay just pause the video here
10:47
and try to complete the
10:50
task try to use basic
10:55
gates for the equal to option okay
11:00
now I'll continue with the equal to so
11:03
I'll come out of the
11:07
simulation what I will do I will take
11:10
output Q3 and this is my equal
11:27
now when A1 and A2 are equal both
11:31
outputs are 0 0 right for that case I
11:39
gate okay this is end
11:51
Gates I will connect analog threshold
11:54
trigger one output to the not gate and
11:57
not gate output I connect to the end
12:00
gate similarly I will connect threshold
12:04
trigger two output to the not gate and
12:07
not get output to the end
12:10
gate then when both are 0 0 I will get
12:14
equal to status simple you can use not
12:20
block two blocks or simply you can
12:33
PLC if you double click here not gate
12:37
will appear bubble will appear see dot
12:43
appear that means the input is inverted
12:47
not is given okay in simple way you can
12:50
do like this also or you can use not
12:54
block also two blocks now I will connect
12:59
again I will give the
13:01
not I will double click here
13:08
okay now I will do the
13:11
simulation for the equal
13:19
to right now A i1 is 50 and ai2 is 50
13:24
both are equal see Trier unlock ual
13:29
trigger output one is off similarly
13:32
trigger two output is off
13:36
and with the combination of not and end
13:43
on so this is how we can generate
13:46
greater than less than equal to status
13:50
from two analog values okay try to do
13:55
this program in your PLC software
14:05
implement this type of comparison using
14:09
some other block combinations
14:11
also now another task is for you that
14:15
try to complete or generate this greater
14:18
than less than equal to with combination
14:23
of some other blocks and share with us
14:27
how you implemented this type of
14:30
program through the comment