Hello. 1
In this video we are going to learn the importance of scanning order in plc programs. 2
Sample application. 3
The conveyor will move with the start signal but with the stop signal. 4
conveyor movement will be stopped at any time. 5
The number of boxes passing over the belt with the sensor on the converter will be counted when the number 6
of boxes reaches 10. 7
This is an example number. 8
The conveyor will stop and the counter value will be reset for the next count. 9
The above mentioned process will repeat periodically with each start signal. 10
This is the condition , write the plc program according to the above scenario and the test operation 11
in simulator mode. 12
This is the first example solution. 13
And just for this page just you need to know this. 14
Imagine we are using reset command at the third line in here. 15
Here the second example of solution and in here you need to reset command. 16
What happens if we use it in the second line. 17
So let's go to a ISPSoft and let's create a new project and let's take a look. 18
What will happen 19
program section and the new program and say okay a new project. 20
Pages opened I will use m internal relays for example X0 will be m0, X1 will be M1 and X2 21
will be m2 , because of simulator can not detect physical input sometimes. 22
Already we know in here we have set MPU X on and off ,so we can adopt/monitor our physical input on and 23
off but I will use m internal relays. 24
So let us start to write code. 25
LD M0 and LDI M1 and LDI C0 26
and out Y0. 27
I will put OR contact then I will latch output like this and one more network the first showing our example 28
I will use it LD M2 and LD Y0 and CNT C0 3 and I will say just 3 is enough for a moment 29
not 10 in here. 30
LD C0 and reset 31
like this and let's send this project to plc. 32
I will use simulator for a moment. 33
So it is writing this project to the simulator now and simulated a stop situation. 34
I will say run Plc , also confirm. 35
So now we are at run situation. 36
So start signals came and somebody released start button of conveyor and it is turning forward and the sensor 37
detected boxes and counter value is one and the second one and the third one. 38
So what will happen now counter is resetted in here and because of this C0 is didn't lose condition 39
and the latched is not broken. 40
So conveyor is still turning forward and the counter is resetted and we don't need to press the start button 41
anymore, 42
Again I will show you. 43
Set on set off and set on and set off and set on and set off. 44
Still our conveyor is turning forward and forward because when the counter is get to reach three I mean 45
counter goes from off to on. 46
Then suddenly in the next network it is resetting so it's going to beginning position and everything 47
is continue and the counter is already resetted at the second line or second network. 48
So what will happen if I change this network two to network three, I will go off line and I will delete 49
this line and I will edit to here , LD C0 and reset C0 and I will do a download again and it 50
is transferring now 51
object code is sended and I will say yes. 52
Now we are ready. 53
I will go online to my simulator and I will give a start to my conveyor. 54
Now it started and released start button and now conveyor is turning forward and sensor is detected a 55
box and counter value is 1 and counter value will be 2. 56
And what will happen if counter detected or sensor is detected. 57
The third box let's see set on you see when counter-revolution. 58
It equals to tree it will go to up and that moment because of C0 counter zero goes from off to on 59
this contact goes off. 60
Because of this is normally close contact. 61
So the latched is from here is broken. 62
The line broken or it didn't float continuously because of this , this line is now output our conveyor is 63
stopped. 64
And then suddenly we goes to network 2, in the network 2 it was 3 ,but suddenly it resetted and 65
it goes to zero. 66
So what will happen now. 67
Somebody needs to press Start button again and stopped , started and somebody released his hand from the 68
start button. 69
Now conveyor turning again and again and sensor detect box , 70
And the second box it's detected. 71
And the third box detected and suddenly we have no output and conveyor is stopped. 72
So according to our scenario this will repeat periodically with the each start signal so we can say 73
this is the correct one. 74
So the importance of the scanning if you put your reset after counter and if you put your reset before 75
counter what's changing. 76
One time the conveyor stopping , another time continuously conveyor turning. 77
This is really important. 78
Just one network a above or just one network is lower. 79
Everything can be change. 80
So while you are writing plc code code as ladder logic inside of the Delta plc or another one plc 81
you must be careful about the scanning order that all saw in this video. 82
I am finished here. 83
See you in the next video.