Hello. 1
In this video we are going to do some encoder examples. 2
We will do up and down counter with the encoder for example in this table just a reminder also this 3
table for counter 235 in X0 input can be up or down counter. 4
But how R and F means in the next page for example M1270 is counter 235. 5
Counting mode on activation auxiliary relay 6
So we will activate this or we will reset or set this bit. 7
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
increase one when ? in the rising edge or falling edge. 9
So we will assign it with the m1270 for c235 10
-- 11
If we selected counter c236 then rising or falling edge selection will be M1271 for 12
up and down counting than we need M1235 bit 13
And then in the next page you will see for example M1235 is for function 14
and for counter 235 counting mode on. 15
Than what is it. 16
It is count down. 17
If we activate it then what will happen. 18
Our encoder is going to count or our counter is going to count to lower side down for example it is 19
going to start from 100 and it will go to lower ninety nine and etc. and 0. 20
If we say count up for example it will start from 100 and 21
It will go to upper side or upper level and in here one more thing. 22
This is just for information also D1022 is for 2-phase 2-input and 23
--- 24
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
1022 it will count in here. 26
For example you can see in the rising edge in the rising edge between these two rising edge. 27
The counter is going to be increased just one and rising edge. 28
And in here rising edge than what we have on and off just one cycle on and off it will increase just one. 29
But if we send 2 to D1022 so that means this is double frequency in just one cycle goes on and off 30
that moment it will increase one and off and on it will increase one. 31
So in this time it was increasing for example just it was one. 32
So it was increasing at between two rising edge one but in here between two rising edge it is increasing 33
as 2 34
So what happens if we select four or other value according to quadruple frequency it is default one 35
it will go four for example it will go up and down between this time you can check here 2 and in here 36
rising edge in here rising edge two rising edge.(note :Check A phase + B phase R+F edges number= 4 ex.) 37
So that means in one cycle it will increase one and two and three and four that's all. 38
So D1022 if you see it in some examples and if any where then you need to know 39
this it is adapting frequency counting frequency for encoders I will go to ISPsoft and create a 40
new project and I will do first and second example first example is going to be up counter programs 41
area new program and new program is creating now than what we need to doLD M1000 always on contact 42
and what we are going to do reset M1235 so you can see it in here count down was M1235 so we are 43
resetting what will happen it will count up and also one more thing in here what we need to put here 44
M1270 so this is the counting mode falling edge count and one more thing that we need to 45
put here. 46
I will come here and I will assign counter but which counter double counter high speed counter the 47
counter insert to here then what we need which counter that we are going to use counter235 and then 48
what is the value maximum value that we will count we can write to here for example just 99999.. thats all. 49
so then what will happen this counter is going to count up up up up and then let's expand our example 50
a little bit more and LD= for example to C235 ->100 and that 51
moment out y0 and we can add one more network to here and ld= c235 52
counter equals to. 53
For example 1000 that moment out y1 will be active and we can say again LD> counter235 54
for example 2000 that moment out Y3 55
What will happen. 56
Our counter is going to count up and it will increase and then according to these conditions we will 57
get these outputs and we can reset this counter. 58
How like this LD M10 for example and reset c235 59
So when we activate M10 this counter is going to be reset it and it will be zero. 60
So this is how to adopt up counter for the Delta plcs imagine. 61
We want to change it to down counter. 62
So this is up counter. 63
That's okay. 64
You can just take a look to our structure. 65
I will. 66
I want to count the down 67
So what we need can this moment up counter. 68
I will take some notes to here M1235 reset but down counter. 69
We will say set M1235 then come here. 70
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
M1270 reset. 72
This is the falling edge 73
And also for the down counter I want to use as falling edge 74
Reset that's all. 75
So now what will happen. 76
SET M1235 special/auxiliary relay and it will count to the down. 77
That's all and we can say now. 78
We can give a value to. 79
For example in the beginning to counter 235 like how for example in the first scan LD M1002 for example 80
move 500 counter235 that it will count down from 500 and you can just change these things for 81
example 400 and this will be. 82
Imagine will be 250 according to your project and it can work like this up and down counters with the 83
Delta plc is like this and you have an encoder. 84
Also I want to put here encoder this is one phase input so your phase I can write put of encoder to X1 85
I will just check to be sure x0 input you can check this table for the c235 86
you need to put your counter phase for ex. phase A input you need to put this input 87
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
is going to count up or down and I'll finish for this video in the next example of the encoder We will 89
check 2 Fast 2 input encoder usage for Delta plcs see you in the next video.