0
1
00:00:21,350 --> 00:00:22,090
Hello.
1

2
00:00:22,140 --> 00:00:28,200
In this video you are going to learn how to read revolution with a encoder  left side.
2

3
00:00:28,200 --> 00:00:34,350
You can see applicable software high speed counters and applicable hardware.
3

4
00:00:34,410 --> 00:00:38,970
High speed counters in this table for example.
4

5
00:00:39,130 --> 00:00:41,640
X0 input of plc.
5

6
00:00:41,670 --> 00:00:49,620
You can use c235 as up and down counter for example if you want to use
6

7
00:00:49,620 --> 00:00:53,340
your X7 input of your plc.
7

8
00:00:53,340 --> 00:01:02,580
You can use C242 and you can use this counter as up and down in here.
8

9
00:01:02,580 --> 00:01:12,860
You can see auxiliary relays M bits in plc for 2 phase 2 input counters.
9

10
00:01:12,960 --> 00:01:20,760
You can use counter two hundred thirty two thirty three and two hundred thirty four counters and you
10

11
00:01:20,760 --> 00:01:30,540
can use for example two hundred thirty two counter as A phase input or phase A input and this can be
11

12
00:01:30,540 --> 00:01:31,470
connected.
12

13
00:01:31,470 --> 00:01:43,020
This can connect just x 0 so you can use phase B input for c232 and you can connect
13

14
00:01:43,020 --> 00:01:55,080
it to X2 input of your plc for hardware high speed counters you can use x 0 for example with X0
14

15
00:01:55,410 --> 00:02:06,750
you can use counter two hundred forty three just up counter it will just count up and X1 for counter
15

16
00:02:06,780 --> 00:02:18,570
two hundred forty three will be reset signal input and dir means direction and U and D means up
16

17
00:02:18,570 --> 00:02:28,980
and down counter so A phase  A input and phase B input counters then you can select your counter according
17

18
00:02:28,980 --> 00:02:38,910
to these tables for example you are just turning one direction and you can you just want to read a revolution
18

19
00:02:38,940 --> 00:02:46,890
or pulses from your encoder with one direction you can use one phase  input or you can use.
19

20
00:02:46,920 --> 00:02:56,480
Okay I'm going to count up and also I will give a direction to my motor so you can use one phase and
20

21
00:02:56,490 --> 00:03:06,630
two input for your application and also you can say Okay I will go count up and I will
21

22
00:03:06,630 --> 00:03:16,380
count down and go forward and backward and I need to know exact pulses or position in my application
22

23
00:03:16,640 --> 00:03:27,240
then you can use 2 phase 2 input counters for example pulse signals received from the encoder connected
23

24
00:03:27,240 --> 00:03:34,710
to the shaft of the motor and these are going to be counted and the speed of the motor is going to be
24

25
00:03:34,710 --> 00:03:43,110
measured in your application an example let's say this is an example the motor needs to stop for five
25

26
00:03:43,110 --> 00:03:47,020
seconds  after every five turns.
26

27
00:03:47,100 --> 00:03:49,960
Let's take a look it in our solution.
27

28
00:03:50,130 --> 00:03:58,980
It was determined from the table that the input point of the pulse signal to be counted is the x 0 input
28

29
00:03:59,010 --> 00:04:03,930
of the counter 235 to be used.
29

30
00:04:04,070 --> 00:04:13,520
Let's go here counter235 is here and we are going to use software high speed counter
30

31
00:04:13,850 --> 00:04:19,140
and for the up-downcounter of counter 235.
31

32
00:04:19,310 --> 00:04:28,970
We need to use x 0 and all other speed counter could also be used for the encoder the a phase of the
32

33
00:04:28,970 --> 00:04:35,740
2 phase encoder used can be connected to X0 input if desired and also B phase if desired.
33

34
00:04:36,170 --> 00:04:43,820
While feeding the encoder it should be paying attention to its direction we need to paid attention
34

35
00:04:44,090 --> 00:04:54,050
to encoder direction since the encoder used produces 100 pulse signals in 1 turn 500 pulse signals should
35

36
00:04:54,050 --> 00:04:56,980
be counted for 5 turns.
36

37
00:04:57,020 --> 00:04:58,530
So in here.
37

38
00:04:58,540 --> 00:05:07,040
Always on contact and then we are going to start our counters and we will count up.
38

39
00:05:07,420 --> 00:05:08,090
OK.
39

40
00:05:08,150 --> 00:05:16,150
And this value is the maximum value is counters can count this value but this is just a random value
40

41
00:05:16,500 --> 00:05:17,250
then
41

42
00:05:17,380 --> 00:05:28,700
We will reset each time our counters before this value so M1000 always on contact that we put here
42

43
00:05:29,090 --> 00:05:42,020
and first we are moving our counter value to D0 data registers and D0 data register is comparing
43

44
00:05:42,110 --> 00:05:46,420
in here with K 500 because our encoder.
44

45
00:05:46,550 --> 00:05:55,850
Let's imagine our encoder is producing 100 pulse each turn that moment 500 is going to be equals to 5
45

46
00:05:56,300 --> 00:06:06,200
turn and in our example we said okay after 5 turn after every 5 turn Motor needs to stop.
46

47
00:06:06,410 --> 00:06:09,050
Just 5 seconds in here
47

48
00:06:12,620 --> 00:06:19,120
our data registers 0 is less than five hundred.
48

49
00:06:19,240 --> 00:06:21,820
So the motor is turning.
49

50
00:06:21,820 --> 00:06:23,800
This is motor forward.
50

51
00:06:23,800 --> 00:06:25,090
Output.
51

52
00:06:25,090 --> 00:06:26,720
Imagine like this.
52

53
00:06:27,070 --> 00:06:31,000
Y0 is our motor forward.
53

54
00:06:31,300 --> 00:06:43,210
Output than motor is turning forward when the pulses reached 2500 in D0 will be equal or greater
54

55
00:06:43,210 --> 00:06:44,780
than 500.
55

56
00:06:44,830 --> 00:06:49,960
That moment this timer is going to be activated in this line.
56

57
00:06:50,290 --> 00:07:02,510
So that moment our counter is going to count always but our timer is going to be active and
57

58
00:07:02,510 --> 00:07:05,380
that moment motor is going to stop.
58

59
00:07:05,390 --> 00:07:15,660
Just five seconds and when timer's came OK our counter is going to be resetted after five seconds and
59

60
00:07:16,140 --> 00:07:18,510
this loop is going to start again.
60

61
00:07:18,960 --> 00:07:27,200
And we are going to transfer our counter value D0 always in this line after timer is goes high.
61

62
00:07:27,240 --> 00:07:34,830
We will move zero to D0 and this time motor is going to turn forward again.
62

63
00:07:34,890 --> 00:07:41,820
And with this loop each time we will wait five turn and we will wait five seconds.
63

64
00:07:41,820 --> 00:07:44,540
We will wait five turn five turn later.
64

65
00:07:44,700 --> 00:07:50,700
We will wait five seconds and with like this we can use our encoder.
65

66
00:07:50,730 --> 00:07:54,570
We can use our counter in this page.
66

67
00:07:54,570 --> 00:07:58,770
You can see complete outputs and the counter
67

68
00:08:02,180 --> 00:08:08,570
maximum kilohertz So what is the meaning of the maximum Khz.
68

69
00:08:08,810 --> 00:08:13,810
We can count a pulses from coming encoder.
69

70
00:08:13,900 --> 00:08:17,860
That's OK but our counters has limited.
70

71
00:08:18,020 --> 00:08:29,960
For example for dvpss2 one phase one simple counter can connect to x 0 x1 x2 and X3 terminals.
71

72
00:08:30,170 --> 00:08:41,300
And this input terminals can read a pulses as maximum 20 kilohertz and in here you can see our counters
72

73
00:08:41,540 --> 00:08:44,110
maximum input frequencies.
73

74
00:08:44,240 --> 00:08:48,370
And in here you can see it is really different.
74

75
00:08:48,500 --> 00:08:59,660
Each other counter233 is 5Khz has maximum input frequency but counters two hundred forty
75

76
00:08:59,660 --> 00:09:02,290
nine is 20kHz
76

77
00:09:02,330 --> 00:09:13,990
So in here we have calculation motor rotation speed per second multiply by encoder resolution must
77

78
00:09:13,990 --> 00:09:25,120
be less than this maximum input frequency for example encoder resolution is 1000 pulses
78

79
00:09:25,360 --> 00:09:26,070
pulses.
79

80
00:09:26,110 --> 00:09:34,240
Let's say like this and your motor rotation speed per second for example let's say 10.
80

81
00:09:34,750 --> 00:09:48,020
So this is ten thousand and that moment ten thousand value is c235 can maximum
81

82
00:09:48,050 --> 00:09:56,370
according to these maximum input frequency table it can be read these value from the encoder.
82

83
00:09:56,390 --> 00:10:01,320
So this is just an example.
83

84
00:10:01,660 --> 00:10:08,900
And 10 kilohertz means ten thousand Hz
84

85
00:10:08,910 --> 00:10:15,860
So according to this calculation you can select your encoders in this video.
85

86
00:10:15,980 --> 00:10:17,130
I'm finished.
86

87
00:10:17,130 --> 00:10:18,740
See you in the next video.
