0
1
00:00:21,420 --> 00:00:21,990
Hello.
1

2
00:00:22,010 --> 00:00:25,990
In this video we are going to do some encoder examples.
2

3
00:00:26,000 --> 00:00:34,160
We will do up and down counter with the encoder for example in this table just a reminder also this
3

4
00:00:34,160 --> 00:00:42,450
table for counter 235 in X0  input can be up or down counter.
4

5
00:00:42,590 --> 00:00:52,010
But how R and F means in the next page for example M1270 is counter 235.
5

6
00:00:52,130 --> 00:00:56,340
Counting mode on activation auxiliary relay
6

7
00:00:56,390 --> 00:01:02,820
So we will activate this or we will reset or set this bit.
7

8
00:01:02,870 --> 00:01:11,750
Then we will say okay it is rising edge or falling edge when rising edge or falling edge the counter will be a counter
8

9
00:01:11,930 --> 00:01:16,060
increase one when ? in the rising edge or falling edge.
9

10
00:01:16,070 --> 00:01:24,500
So we will assign it with the m1270 for c235
10

11
00:01:24,500 --> 00:01:24,940
--
11

12
00:01:25,160 --> 00:01:33,230
If we selected counter c236 then rising or falling edge selection will be M1271 for
12

13
00:01:33,440 --> 00:01:41,000
up and down counting than we need M1235 bit
13

14
00:01:41,120 --> 00:01:47,690
And then in the next page you will see for example M1235 is for function
14

15
00:01:47,930 --> 00:01:52,500
and for counter 235 counting mode on.
15

16
00:01:52,590 --> 00:01:53,740
Than what is it.
16

17
00:01:53,750 --> 00:01:55,470
It is count down.
17

18
00:01:55,520 --> 00:01:59,060
If we activate it then what will happen.
18

19
00:01:59,060 --> 00:02:05,420
Our encoder is going to count or our counter is going to count to lower side down for example it is
19

20
00:02:05,420 --> 00:02:13,160
going to start from 100 and it will go to lower ninety nine and etc. and 0.
20

21
00:02:13,430 --> 00:02:17,360
If we say count up for example it will start from 100 and
21

22
00:02:17,540 --> 00:02:23,560
It will go to upper side or upper level and in here one more thing.
22

23
00:02:23,570 --> 00:02:34,490
This is just for information also D1022 is for 2-phase 2-input and
23

24
00:02:34,730 --> 00:02:35,760
---
24

25
00:02:35,780 --> 00:02:52,440
So for these high speed counters  we are using D1022 for what for example if we move k 1 or just 1 in D
25

26
00:02:52,520 --> 00:02:56,510
1022 it will count in here.
26

27
00:02:56,510 --> 00:03:02,630
For example you can see in the rising edge in the rising edge between these two rising edge.
27

28
00:03:02,720 --> 00:03:07,420
The counter is going to be increased just one and rising edge.
28

29
00:03:07,490 --> 00:03:16,160
And in here rising edge  than what we have on and off just one cycle on and off it will increase just one.
29

30
00:03:16,190 --> 00:03:26,840
But if we send 2 to D1022 so that means this is double frequency in just one cycle goes on and off
30

31
00:03:26,870 --> 00:03:31,990
that moment it will increase one and off and on it will increase one.
31

32
00:03:32,000 --> 00:03:36,860
So in this time it was increasing for example just it was one.
32

33
00:03:36,890 --> 00:03:44,900
So it was increasing at between two rising edge one but in here between two rising edge it is increasing
33

34
00:03:45,290 --> 00:03:45,930
as 2 
34

35
00:03:45,950 --> 00:03:53,360
So what happens if we select four or other value according to quadruple frequency it is default one
35

36
00:03:53,690 --> 00:04:02,930
it will go four for example it will go up and down between this time you can check here 2 and in here
36

37
00:04:03,170 --> 00:04:06,760
rising edge in here rising edge two rising edge.(note :Check A phase + B phase R+F edges number= 4 ex.)
37

38
00:04:06,770 --> 00:04:14,650
So that means in one cycle it will increase one and two and three and four that's all.
38

39
00:04:14,690 --> 00:04:21,560
So D1022 if you see it in some examples and if any where then you need to know
39

40
00:04:21,560 --> 00:04:31,100
this it is adapting frequency counting frequency for encoders I will go to ISPsoft and create a
40

41
00:04:31,100 --> 00:04:42,320
new project and I will do first and second example first example is going to be up counter programs
41

42
00:04:42,320 --> 00:04:55,040
area new program and new program is creating now than what we need to doLD M1000 always on contact
42

43
00:04:55,460 --> 00:05:06,980
and what we are going to do reset M1235 so you can see it in here count down was M1235 so we are
43

44
00:05:06,980 --> 00:05:15,800
resetting what will happen it will count up and also one more thing in here what we need to put here
44

45
00:05:15,890 --> 00:05:24,890
M1270 so this is the counting mode falling edge count and one more thing that we need to
45

46
00:05:24,890 --> 00:05:25,520
put here.
46

47
00:05:26,060 --> 00:05:35,870
I will come here and I will assign counter but which counter double counter high speed counter the
47

48
00:05:35,870 --> 00:05:44,330
counter insert to here then what we need which counter that we are going to use counter235 and then
48

49
00:05:45,440 --> 00:05:54,410
what is the value maximum value that we will count we can write to here for example just 99999.. thats all.
49

50
00:05:54,460 --> 00:06:03,680
so then what will happen this counter is going to count up up up up and then let's expand our example
50

51
00:06:03,710 --> 00:06:13,590
a little bit more and LD= for example to C235 ->100 and that
51

52
00:06:13,590 --> 00:06:25,340
moment out y0 and we can add one more network to here and ld= c235 
52

53
00:06:25,340 --> 00:06:26,520
counter equals to.
53

54
00:06:26,540 --> 00:06:37,840
For example 1000 that moment out y1 will be active and we can say again LD> counter235
54

55
00:06:37,840 --> 00:06:45,140
for example 2000 that moment out Y3
55

56
00:06:45,410 --> 00:06:46,550
What will happen.
56

57
00:06:46,550 --> 00:06:53,990
Our counter is going to count up and it will increase and then according to these conditions we will
57

58
00:06:53,990 --> 00:06:57,630
get these outputs and we can reset this counter.
58

59
00:06:57,680 --> 00:07:04,700
How like this LD M10 for example and reset c235
59

60
00:07:04,700 --> 00:07:10,550
So when we activate M10 this counter is going to be reset it and it will be zero.
60

61
00:07:10,550 --> 00:07:20,690
So this is how to adopt up counter for the Delta plcs imagine.
61

62
00:07:20,880 --> 00:07:24,870
We want to change it to down counter.
62

63
00:07:24,870 --> 00:07:26,330
So this is up counter.
63

64
00:07:26,340 --> 00:07:27,050
That's okay.
64

65
00:07:27,150 --> 00:07:30,120
You can just take a look to our structure.
65

66
00:07:30,120 --> 00:07:30,710
I will.
66

67
00:07:30,870 --> 00:07:33,710
I want to count the down
67

68
00:07:33,720 --> 00:07:37,090
So what we need can this moment up counter.
68

69
00:07:37,290 --> 00:07:44,600
I will take some notes to here M1235 reset but down counter.
69

70
00:07:44,820 --> 00:07:52,600
We will say set M1235 then come here.
70

71
00:07:52,650 --> 00:08:02,690
Set it and also we forgot one more thing we need to reset M1270(selection rising/falling edge- for falling reset it always) in here also.
71

72
00:08:03,520 --> 00:08:06,860
M1270 reset.
72

73
00:08:06,860 --> 00:08:08,110
This is the falling edge
73

74
00:08:08,340 --> 00:08:15,650
And also for the down counter I want to use as falling edge 
74

75
00:08:15,770 --> 00:08:18,550
Reset that's all.
75

76
00:08:18,550 --> 00:08:19,810
So now what will happen.
76

77
00:08:19,810 --> 00:08:27,550
SET M1235 special/auxiliary relay and it will count to the down.
77

78
00:08:27,640 --> 00:08:30,390
That's all and we can say now.
78

79
00:08:30,490 --> 00:08:33,110
We can give a value to.
79

80
00:08:33,220 --> 00:08:42,820
For example in the beginning to counter 235 like how for example in the first scan LD M1002 for example
80

81
00:08:42,850 --> 00:08:52,180
move 500 counter235 that it will count down from 500 and you can just change these things for
81

82
00:08:52,180 --> 00:08:55,960
example 400 and this will be.
82

83
00:08:56,080 --> 00:09:04,270
Imagine will be 250 according to your project and it can work like this up and down counters with the
83

84
00:09:04,270 --> 00:09:08,650
Delta plc is like this and you have an encoder.
84

85
00:09:08,650 --> 00:09:22,550
Also I want to put here encoder this is one phase input so your phase I can write put of encoder to X1 
85

86
00:09:23,120 --> 00:09:32,360
I will just check to be sure  x0 input you can check this table for the c235
86

87
00:09:32,390 --> 00:09:40,910
you need to put your counter phase for ex. phase A input you need to put this input
87

88
00:09:40,910 --> 00:09:49,010
to X0 that's all and then if you write this code to your plc then you are going to see it your counter
88

89
00:09:49,010 --> 00:09:58,430
is going to count up or down and I'll finish for this video in the next example of the encoder We will
89

90
00:09:58,670 --> 00:10:05,140
check 2 Fast 2 input encoder usage for Delta plcs see you in the next video.
