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