Hello. 1
In this video we are going to learn move. 2
And comparison commands so move command is data source is going to transfer to data destination in 3
here ISPsoft usage of move command or move instruction. 4
D10 is going to transfer to D20 ,the data value is going to transfer. 5
So for example this is WPLSOFT usage. 6
15, decimal 15 value is going to transfer to D0, BMOV block move command is from the data source 7
to data destination we will move datas as blocks. 8
So for example in here one example that we can analyze block move D0 D10 k4 so for data is 9
starting from D0 is going to transfer to D10 and D10 is starting address. 10
So D0 is going to the first data to D10. 11
So second data is going to transfer to D11. 12
The third one it's coming from d2 to D12 and D3 is going to transfer to D13. 13
This is the usage of ISPsoft 14
So what will happen now for example from the starting D10. 15
We will move 5 data to starting from D20. 16
So D10 is going to transfer to D20, D11 is going to transfer to D21 and D24 is the 17
last one , D14 is going to transfer to d24 ,and FMOV is Fill move cmd 18
So we will fill data registers with the value which value we assign to and as ten value 19
So we will for example ten value is not a filling module so we will start from D10 and 10 20
value starting from D10 we will fill values inside of the D area so D20 for example in here 21
we will get this value from D10 for example let's say D10 equals to 5. 22
So what will happen starting from D20 ten data registers. 23
Value is going to be 5 D20 will be 5 D21 is going to be 5 D25 value is going 24
to be 5 and D the last value is D29 is going to be 5 and the next one exchange come 25
on exchange command what happens. 26
This is the wplsoft usage and this is ıspsoft usage D25 value let's say 5 and 27
D30 value is let's say 3 after exchange command is started or activated D25 value is 28
going to be 3 and D30 value is going to be 5. 29
So two data value is going to be exchanged altogether and swap command is we have D0 for example 30
in here then let's say the value of D0 1-2 and 3 and 4. 31
This is our high word than this is low word** 32
So the low byte and high byte this is a complete the one word. 33
So this side is high byte by this is low byte. 34
So after swap command this instruction is activated 3 and 4 / 1 and 2. 35
So high byte and the low byte these positions are exchanged. 36
So 3 and 4 became now high byte 1 and 2 became low byte and compare command for example if we compare to 37
data in here S1 and S2 is going to be compared and D50 value is lower than 10 so M0 is going 38
to be activated if 10 equals to D50 or D50 data register, value equal to 10 so M1 is going 39
to be activated and if D50 value is bigger than 10 so M2 is going to be activated so we can 40
get a result of the comparison like this from the comparison result and it is coming in here 41
and zone compare so we will compare a zones and areas. 42
So from starting 10 to 100 we will check D60 is lower than 10 or bigger than 100 or between 43
10 and 100. 44
If D60 value is lower than 10 and M0 becomes high. 45
If D60 is between 10 and 100 and M1 contact or auxiliary relay will be active and if D60 46
bigger than 100 and M2 auxiliary relay or M2 bit becomes high. 47
So in here also you can see comparison contact and usage. 48
For example if you want to compare D0 D2 . 49
And if you want to compare with equal instruction you should use this one and if you want to aDD second 50
and or series comparison instruction you can use this one and if you want to use a comparison as parallel 51
block or OR block you can use this one and the rest of all this is the equal not equal bigger than bigger 52
or equal bigger than or equal and lower than and this is lower than or equal contact. 53
So let's do some practices about these commands new project controller type dvp and plc type ss2 54
lets say OK our plc project is opened and programs and new program and ladder diagram is selected 55
and the device monitor table and new, I will create a monitor table in here to monitor our values. 56
So let's start from move command LD M0 and then let's add mov d0 d2 and sent this PLC project 57
and it's transferring now and Okay now it's transferring and the back to running state yes. 58
Now our CPU is in the run status and I will open also online edit mode, M0 is activated. 59
So what is the data registers value for example D0 becomes 5 and let's take a look. 60
D2 is 5, D0 value is 10 and D2 is ten ,now because of this contact is activated by me always on now 61
so it's transferring the data of D0 to D2 always and let's change it to 13 for example and 62
you can see D2 is 13 now, so it is a move command and now add one more network and let's take a look to 63
Block Move - LD M1 64
bmov d10 d20 65
And 3. 66
So what will happen. 67
For example I will add D10 to 3 data and 68
D20 3 data so I will activate this one so D10 is going to be transferred to d20. 69
D11 is going to be transferred to D21 and D12 is going to be transferred to D22. 70
Let's take a look once D10 change this value to 1 and what will happen. 71
What we need we need to see D20 must be 1. 72
Let's take a look what's wrong in here. 73
Ah sorry D10 yes. 74
D10is now 1. 75
What's wrong with it. 76
I will take a look at the sorry ,because of me. 77
We need to send changes to plc project update. 78
Okay now it's updated because we add a block move command to our project but we didn't send this to 79
this. 80
This all changes to plc and monitor table. 81
Now D10 is 1. 82
D20 is 1. 83
Let's change this to 2. 84
Okay now you can see D20 is 2, D11 is going to be transferred to the 21. 85
So let's change it to 3 and you can see it's 3. 86
d12 give the value 4 and you can see d22 is four and now I will add D13 87
and I will add D23. 88
So I will change it to D13 to 5 but it is not transferred to D23 but what happens if I say sent four 89
data and I will update my plc project and okay and update program line and update is completed. 90
Let's take a look. 91
Now it's transferred 92
So this is block move command or instruction and this is how we can use block move command inside of 93
the plc projects and add one move network and LD M2. 94
And let's take a look to fill move, FMOV D30 D40 and 5 value and I will send these changes 95
to PLC and update and yes and yes. 96
And I will activate this contact and what we are waiting D30 97
value is going to be transferred from starting D40. 98
And how many data is going to be transferred. 99
Just 5 data. 100
-- 101
Register or 5 data is going to be transferred. 102
And what will be the whole values D30. 103
Let's change to 5 andlet's monitor these values in here. 104
D30 is 5 and D40. 105
I will add in here. 106
And how many data. 107
5 data. 108
So let's take a look once. 109
1 and 2 and 3 and 4 and 5. 110
Data is transferred equals D30, D45 111
Let's take a look. 112
The value of it. 113
in here you can see we can add D45 to here zero. 114
You can see but if you want to fill it with 5 we need to right here. 115
So for example six and I will update my program and change to send it to plc, monitor table. 116
You can see d45 now is 5 D46 for example is must be zero like this and go back to our 117
program a new network and let's look to exchange command LD M3 and right here exchange D50 118
D55 and I will send this changes to plc and okay and okay. 119
Okay activate this and give a present value to 5 and change this value to 3 and now it is 120
changing always what's wrong with it. 121
we will set off now 122
So now D50 is 3 D55 is 5. 123
Activate this one. 124
So let's take a look to registers 125
D50 126
D55 127
So it is always exchanging because of this. 128
This is happening. 129
If I put here one up like this and I will send this to plc project and now let's take a look. 130
What will happen now. 131
All values is 3 and 5. 132
I will activate this. 133
You should see 5 and 3. 134
It's changed its exchange in just once and set off and set on again. 135
And 3 and 5. 136
So this is exchange instruction usage. 137
And if we always activate these one these values are always going to be changed between and always 3 138
and 5 5 and 3 3 and 5 and 5 and 3 like this because before condition high. 139
But if we put just once this is up or this is rising edge contact it will change just at once. 140
Then we can monitor it like this and it is working like this. 141
So the next one will be swap command. 142
Let us add swap command 2 here. 143
Swap command lets choose D60 in here. 144
Like this. 145
-- 146
This is the usage of it. 147
So D60 clear current value. 148
So I will add one more command to show or activate before condition from the swap command LD M4 149
and disactivate this value and let's take a look. 150
First of all I will use hexadecimal values for the swap command to see high byte and the low byte exchanging 151
we need to come here and the view and the monitoring data format as hexadecimal. 152
Okay and I will give to D60 change present value and for the usage of hexadecimal you need to put 153
16 and imagine ,we can give 2 3 and 4 and 5. 154
This is our present value of D60 and I will add up contact to here. 155
Okay. 156
And this changes to our plc and update program line. 157
And there is nothing to change. 158
Okay. 159
And M4 I will activate M4 contact and you say 4 5 2 and 3. 160
This is exchange data so I will disactivate M4 and I will change this value to 1 2 3 and 4. 161
So what are expecting from the swap instruction. 162
High byte is 1 and 2 low byte is 3 and 4 3 and 4 should be high by 1 and 2 should be low byte let's activate 163
our instruction and now we can see 3 and 4 now is high byte 1 and 2 is low byte and continue to comparison instructions. 164
It is going on LD M5 is our contact and values compare contact and compare it with 20 and let's 165
say D70 and output should start from imagine M20 and I will update our project and okay and update 166
the program line and update is completed now so M5 is set on. 167
So look now D70 is lower than S1 is S2 is lower than S1 so this is 0 is lower than 20 so M20 168
is activated go monitor table and I will add m20 and 3 contact and program. 169
Let's take a look once I will change it. 170
First of all view. 171
I will say automatically and I will change it to 20. 172
So let's take a look now S1 equals S2 and our 21 auxiliary relay. 173
Or contact or output is high. 174
So what happens if d70 equals 21. 175
So now you can see M22 is activated so we can check our comparison result with the auxiliary relays 176
with the contacts with the outputs. 177
So again let's change it to zero. 178
So M20 is high. 179
So what happens if we want to use zone compare. 180
So let's add LD M6. 181
This is our condition contact and add zone compare and then let's give a region to range from starting 182
in value to bigger or end value 50 and 60 and the 80 and our output can start M30 and then monitor 183
table left click M30 and 3 count and program. 184
Let's go back to our program and send changes to our plc and update the program line and update is 185
completed. 186
M6 is set on. 187
So now look D80 is, the value of the 8 is 0 so 0 is not between 50 and 60 ,0 is lower than S1 188
or 15 so M30 is activated. 189
So D80 let's change it to 55 so M30 is disactivated now or off situation and the monitor table 190
you can see M31 is active now. 191
So let's go back our project and change it to 17. 192
And now you can see M30 is disactive or disactivated M31 is also off but M32 is high. 193
So now we can say if we want to compare our values between data registers you can use compare or 194
if you need to compare your value with 1 range or with a region from the starting the lowest value 195
to highest value if you compare it with this area you can use zone compare and for a moment the check 196
compare region and the movement instructions in this video and also I am finished for this video 197
see you in the next video.