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