0
1
00:00:21,330 --> 00:00:21,880
Hello.
1

2
00:00:21,890 --> 00:00:30,020
In this video we are going to use 2 phase 2 input encoder with Delta plcs and we are going to use
2

3
00:00:30,140 --> 00:00:38,880
D1022 for the frequency selection and I will go to ISP soft and I will create a new project and
3

4
00:00:39,000 --> 00:00:47,670
plc type will be SS2 new project is creating now and in the program area right click a new and.
4

5
00:00:47,740 --> 00:00:48,100
Okay.
5

6
00:00:50,970 --> 00:01:00,320
So  what I am going to use now and a and b phase encoder usage of this example.
6

7
00:01:00,960 --> 00:01:05,220
And we will use two phase input
7

8
00:01:08,000 --> 00:01:17,270
and I will just go to my PowerPoint then I am going to take a look once which counter
8

9
00:01:17,270 --> 00:01:18,740
that we need to use.
9

10
00:01:18,740 --> 00:01:22,730
Just an example we can select counter251
10

11
00:01:22,790 --> 00:01:32,590
We can use this counter and what is this counter specification a phase needs to connect to X0 b phase
11

12
00:01:32,600 --> 00:01:41,810
needs to connect to X1 that's all then you have an encoder and A+ and B+ needs to connect
12

13
00:01:41,810 --> 00:01:46,600
to X0 and X1 terminal of your plc.
13

14
00:01:47,000 --> 00:01:55,390
And then what we need previous example we did some adaptations similar things that we need to do for
14

15
00:01:55,400 --> 00:01:56,020
this example.
15

16
00:01:56,030 --> 00:02:02,450
But now we will use for example for the counting mode two times frequency.
16

17
00:02:03,200 --> 00:02:07,150
So what we need to do LD M1000
17

18
00:02:07,160 --> 00:02:08,080
That's okay.
18

19
00:02:08,180 --> 00:02:13,990
And then we will say MOV 2 D1022
19

20
00:02:14,270 --> 00:02:14,840
Sorry.
20

21
00:02:14,860 --> 00:02:19,180
This will be two no like this.
21

22
00:02:19,290 --> 00:02:22,270
And then what we need in here.
22

23
00:02:22,440 --> 00:02:32,310
I need to add DCNT C251 99999  this is the value but doesn't matter this is the
23

24
00:02:32,310 --> 00:02:33,110
maximum value.
24

25
00:02:33,120 --> 00:02:40,860
It will count but till now the already is going to reset this counter or set something else.
25

26
00:02:40,860 --> 00:02:42,600
So this is okay.
26

27
00:02:42,750 --> 00:02:50,840
And then what we now counting mode  you can read it in here also you device command list.
27

28
00:02:51,090 --> 00:02:54,260
I will go to the device command list and D1022.
28

29
00:02:54,270 --> 00:02:58,410
I will show you the complete explanations by Delta
29

30
00:03:03,520 --> 00:03:06,210
a little bit go up.
30

31
00:03:07,180 --> 00:03:14,580
1022  so counting mode selection for the A and B phase counter
31

32
00:03:14,590 --> 00:03:23,890
This is we need to adopt if you are using just two phase two input counter you need to adopt your new
32

33
00:03:23,890 --> 00:03:34,420
D1022 counting mode selection or you can for one pulse in just one cycle with the A and B fast because
33

34
00:03:34,690 --> 00:03:43,780
why already we learned but again I'm going to tell you we are turning forward and then we can go back
34

35
00:03:44,650 --> 00:03:45,250
backward.
35

36
00:03:45,650 --> 00:03:47,810
So that moment that will happen.
36

37
00:03:47,810 --> 00:03:50,540
The encoder pulses are increased for example.
37

38
00:03:50,570 --> 00:03:53,460
Until now it will be 510.
38

39
00:03:53,570 --> 00:03:56,960
We will go back and it will go four hundred.
39

40
00:03:57,260 --> 00:04:01,430
So for the previous example what we did.
40

41
00:04:01,550 --> 00:04:03,530
We made up and down.
41

42
00:04:03,590 --> 00:04:04,650
So what is happening.
42

43
00:04:04,670 --> 00:04:10,140
It is just going up or increasing or it's just going down decreasing now.
43

44
00:04:10,160 --> 00:04:12,740
It will increase and decrease altogether.
44

45
00:04:12,740 --> 00:04:21,470
So we need to adapt our counting mode to 2 and we selected a counter as default for example counter
45

46
00:04:21,470 --> 00:04:22,990
C251
46

47
00:04:23,330 --> 00:04:24,140
That's okay.
47

48
00:04:24,170 --> 00:04:32,090
So what will happen if you do a download this code to your plc from your x0 and X1 inputs will come
48

49
00:04:32,210 --> 00:04:37,770
and from A input it will increase this counter will be increase from B input comes then .
49

50
00:04:37,770 --> 00:04:45,200
This counter value is going to be decreased and for the Reset this counter we can  add LD M50 for
50

51
00:04:45,200 --> 00:04:49,660
example and reset counter251
51

52
00:04:49,670 --> 00:04:54,550
This is reset counter and you can continue.
52

53
00:04:54,620 --> 00:05:04,730
Now then you can say if machines started LD start like this for example we can define this variable
53

54
00:05:05,220 --> 00:05:21,000
and then you can say LI= C251 for example 250 and out for example pumps work1 then you
54

55
00:05:21,000 --> 00:05:28,100
can work with counter value is like this or we can say the second option.
55

56
00:05:28,260 --> 00:05:38,340
Now we can define a value to the data register to here like D250 and we can give a value to D250
56

57
00:05:38,790 --> 00:05:40,380
--
57

58
00:05:40,500 --> 00:05:47,700
Then when this counter equals to D250
58

59
00:05:47,700 --> 00:05:53,290
What will happen according to this condition we can get an output.
59

60
00:05:53,300 --> 00:05:56,550
via these conditions.
60

61
00:05:56,550 --> 00:05:58,900
What I mean now.
61

62
00:05:58,980 --> 00:06:02,200
Previous one it will go not K.
62

63
00:06:02,250 --> 00:06:06,300
It will go to up up up until when ? until this value.
63

64
00:06:06,420 --> 00:06:09,620
So you can specify your maximum value.
64

65
00:06:09,910 --> 00:06:18,240
So you can say this is your start position and this is your maximum position and it equals to for example
65

66
00:06:18,550 --> 00:06:24,310
200 pulse s and then you can just write there two hundred.
66

67
00:06:24,390 --> 00:06:30,030
Or just write d0 and inside of d0 you can change your values.
67

68
00:06:30,030 --> 00:06:38,760
For example you can say go to d0  always and you can say first to go to 100 pulse and stop.
68

69
00:06:38,760 --> 00:06:50,370
And second movement you can say go 300 pulse or imagine 1 pulse equals to 1 centimeter go 300 centimeter
69

70
00:06:50,640 --> 00:06:51,210
and stop.
70

71
00:06:51,210 --> 00:06:53,940
How can you do this with 9 9 9.
71

72
00:06:53,970 --> 00:06:57,020
You cannot do this but you can change.
72

73
00:06:57,030 --> 00:07:00,480
D0 value how let's continue to example.
73

74
00:07:00,480 --> 00:07:15,610
For example we can say LD M10 and then move MOV 200 D0 and go first position.
74

75
00:07:16,600 --> 00:07:27,960
And then you can say the second LD M11 mov 300 D0 and go.
75

76
00:07:28,060 --> 00:07:36,050
Second position and according to this you can reset or you can continue to movement.
76

77
00:07:36,240 --> 00:07:45,120
via your counterC251 is going to help you to going up and down or 
77

78
00:07:45,120 --> 00:07:46,650
the directions.
78

79
00:07:46,750 --> 00:07:53,440
I mean not the direction increasing and decreasing pulses is going to give you exact position of your
79

80
00:07:53,440 --> 00:08:00,640
motor than you can control your motors with like this for encoder  example for the usage high speed
80

81
00:08:00,640 --> 00:08:03,890
counter with the Delta plcs I am finished here.
81

82
00:08:03,890 --> 00:08:11,710
This two example is going to help you a lot then don't forget this auxiliary relays and this counting 
82

83
00:08:11,710 --> 00:08:18,710
more table and these applicable software high speed counter and applicable hardware high speed counters
83

84
00:08:18,730 --> 00:08:22,180
tables that you are going to need these tables a lot.
84

85
00:08:22,450 --> 00:08:30,210
Please take a picture or just take some notes then you can use them all in your projects easily if you
85

86
00:08:30,220 --> 00:08:37,360
stuck in a point or if you want to ask any question immediately you can ask to us see you in the next
86

87
00:08:37,360 --> 00:08:37,690
video.
