Changes for page 12 Clock operation

Last modified by Mora Zhou on 2023/11/21 17:27

From version 13.1
edited by Jim
on 2022/11/23 11:04
Change comment: There is no comment for this version
To version 1.6
edited by Joey
on 2022/06/09 15:42
Change comment: (Autosaved)

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,0 @@
1 -12 Clock operation
Parent
... ... @@ -1,1 +1,1 @@
1 -PLC Editor2.07 Basic instructions.WebHome
1 +PLC Editor2.1 User manual.2\.1 LX5V user manual.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Jim
1 +XWiki.Joey
Content
... ... @@ -1,5 +1,388 @@
1 -== ==
1 += **Contact comparison instruction** =
2 2  
3 +== **Signed 16-bit contact comparison instruction** ==
4 +
5 +**LD £, AND £, OR £**
6 +
7 +The BIN 16-bit data of the device specified in (s1) and the BIN 16-bit data of the device specified in (s2) are compared by normal open contact processing.
8 +
9 +LD£: Normally open contact comparison instruction
10 +
11 +AND£: Normally open contact series connection comparison instruction
12 +
13 +OR£: Normally open contact parallel connection comparison instruction
14 +
15 +**Ladder diagram**
16 +
17 +(% style="text-align:center" %)
18 +[[image:07-5 Basic instructions_html_63210db6b7e1512f.png]]
19 +
20 +(You can enter "=", "<>", ">", "<", ">=", "<=" in "£")
21 +
22 +**Content, range and data type**
23 +
24 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
25 +|(s1)|Comparison data or device storing comparison data|-32768 to 32767|Signed BIN 16 bit|ANY16_S
26 +|(s2)|Comparison data or device storing comparison data|-32768 to 32767|Signed BIN 16 bit|ANY16_S
27 +
28 +**Device used**
29 +
30 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="11" %)**Devices**|(((
31 +**Offset modification**
32 +)))|(((
33 +**Pulse extension**
34 +)))
35 +|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**K**|**H**|**[D]**|**XXP**
36 +|LD=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
37 +|LD>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
38 +|LD<|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
39 +|LD>=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
40 +|LD<=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
41 +|LD<>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
42 +|AND=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
43 +|AND>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
44 +|AND<|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
45 +|AND>=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
46 +|AND<=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
47 +|AND<>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
48 +|OR=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
49 +|OR>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
50 +|OR<|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
51 +|OR>=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
52 +|OR<=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
53 +|OR<>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|
54 +
55 +**Features**
56 +
57 +The BIN 16-bit data of the device specified in (s1) and the BIN 16-bit data of the device specified in (s2) are compared by normal open contact processing.
58 +
59 +The comparison operation result of each instruction is shown below.
60 +
61 +|**Instruction Sign**|**Condition**|**Comparison operation result**|**Instruction Sign**|**Condition**|**Comparison operation result**
62 +|==|(s1)=(s2)|(% rowspan="6" %)On state|==|(s1)≠(s2)|(% rowspan="6" %)Non-conduction state
63 +|<>|(s1)≠(s2)|<>|(s1)=(s2)
64 +|>|(s1)>(s2)|>|(s1)≤(s2)
65 +|<|(s1)<(s2)|<|(s1)≥(s2)
66 +|>=|(s1)≥(s2)|>=|(s1)<(s2)
67 +|<=|(s1)≤(s2)|<=|(s1)>(s2)
68 +
69 +**Error code**
70 +
71 +|**Error code**|**Content**
72 +|4085H|(s) read address exceeds the device range
73 +
74 +**Example**
75 +
76 +(((
77 +(1) LD£ instruction:
78 +
79 +(% style="text-align:center" %)
80 +[[image:07-5 Basic instructions_html_1309199eccc7134.png]]
81 +)))
82 +
83 +When the current value of counter C10 is 200, Y10 is set
84 +
85 +When the content of D200 is above -29, and X1 is ON, Y11 is set
86 +
87 +(2) AND£ instruction:
88 +
89 +(% style="text-align:center" %)
90 +[[image:07-5 Basic instructions_html_1c966f74b0bd808e.png]]
91 +
92 +(((
93 +When X0 is ON, or when the current value of counter C10 is 200, Y10 is set
94 +
95 +When X1 is OFF, and the content of data counter D0 is not -10, Y11 is set
96 +
97 +
98 +)))
99 +
100 +(3) OR£ instruction:
101 +
102 +(% style="text-align:center" %)
103 +[[image:07-5 Basic instructions_html_8b000809015ea436.png]]
104 +
105 +(((
106 +When X1 is ON, or when the current value of counter C10 is 200, Y0 is set
107 +
108 +When X2 and M30 are ON, or the content of register D100 is K10000 and above, M60 is set
109 +)))
110 +
111 +== **Signed 32-bit contact comparison instruction** ==
112 +
113 +**LDD £, ANDD £, ORD £**
114 +
115 +The BIN 32-bit data of the device specified in (s1) and the BIN 32-bit data of the device specified in (s2) are compared by normal open contact processing.
116 +
117 +LDD£: Normally open contact comparison command
118 +
119 +ANDD£: Normally open contact series link comparison instruction
120 +
121 +ORD£: Normally open contact parallel link comparison instruction
122 +
123 +**Ladder diagram**
124 +
125 +(% style="text-align:center" %)
126 +[[image:07-5 Basic instructions_html_63210db6b7e1512f.png]]
127 +
128 +“=”, “<>”, “>”, “<”, “>=”, “<=” can be input in “£”
129 +
130 +**Content, range and data type**
131 +
132 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
133 +|(s1)|Comparison data or device storing comparison data|-2147483648 to 2147483647|Signed BIN 32 bit|ANY32_S
134 +|(s2)|Comparison data or device storing comparison data|-2147483648 to 2147483647|Signed BIN 32 bit|ANY32_S
135 +
136 +**Device used**
137 +
138 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="13" %)**Devices**|(((
139 +**Offset modification**
140 +)))|(((
141 +**Pulse extension**
142 +)))
143 +|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**[D]**|**XXP**
144 +|LDD=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
145 +|LDD>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
146 +|LDD<|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
147 +|LDD>=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
148 +|LDD<=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
149 +|LDD<>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
150 +|ANDD=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
151 +|ANDD>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
152 +|ANDD<|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
153 +|ANDD>=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
154 +|ANDD<=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
155 +|ANDD<>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
156 +|ORD=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
157 +|ORD>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
158 +|ORD<|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
159 +|ORD>=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
160 +|ORD<=|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
161 +|ORD<>|s1, s2|●|●|●|●|●|●|●|●|●|●|●|●|●|●|
162 +
163 +**Features**
164 +
165 +The BIN 32-bit data of the device specified in (s1) and the BIN 32-bit data of the device specified in (s2) are compared by normal open contact processing.
166 +
167 +The comparison operation result of each instruction is shown below.
168 +
169 +|**Instruction Sign**|**Condition**|**Comparison operation result**|**Instruction Sign**|**Condition**|**Comparison operation result**
170 +|==|(s1)=(s2)|(% rowspan="6" %)On state|==|(s1)≠(s2)|(% rowspan="6" %)Non-conduction state
171 +|<>|(s1)≠(s2)|<>|(s1)=(s2)
172 +|>|(s1)>(s2)|>|(s1)≤(s2)
173 +|<|(s1)<(s2)|<|(s1)≥(s2)
174 +|>=|(s1)≥(s2)|>=|(s1)<(s2)
175 +|<=|(s1)≤(s2)|<=|(s1)>(s2)
176 +
177 +**Error code**
178 +
179 +|**Error code**|**Content**
180 +|4085H|(S) read address exceeds the device range
181 +
182 +**Example**
183 +
184 +(1) LDD£ instruction:
185 +
186 +(% style="text-align:center" %)
187 +[[image:07-5 Basic instructions_html_8acf0d489297c561.png]]
188 +
189 +When the data of LC10 is 200000, Y10 is set, otherwise Y10 is reset.
190 +
191 +When the 32-bit data composed of D201 and D200 exceeds -5000, and X1 is ON, Y11 is turned ON.
192 +
193 +(2) ANDD£ instruction:
194 +
195 +(% style="text-align:center" %)
196 +[[image:07-5 Basic instructions_html_38be93eec0ced6c.png]]
197 +
198 +When X0 is ON and the value of LC10 is 200000, Y10 is set, otherwise it is reset.
199 +
200 +When X1 is OFF and the 32-bit data composed of D1 and D0 is not equal to K-50000, Y11 is set.
201 +
202 +(3) ORD£ instruction:
203 +
204 +(% style="text-align:center" %)
205 +[[image:07-5 Basic instructions_html_8ebfc7b0562cf370.png]]
206 +
207 +When X1 is ON, or the data of LC10 is equal to the data of LC10 is equal to 200000, Y0 is set.
208 +
209 +When X2 and M30 are set, or the double word data composed of D101 and D100 is greater than or equal to 100000, M60 is set.
210 +
211 +== **Single precision real number contact comparison instruction** ==
212 +
213 +**LDE £, ANDE £, ORE £**
214 +
215 +The single precision real number of the device specified in (s1) and the single precision real number of the device specified in (s2) are compared by normal open contact processing.
216 +
217 +LDE£: Normally open contact comparison command
218 +
219 +ANDE£: Normally open contact series link comparison instruction
220 +
221 +ORE£: Normally open contact parallel link comparison instruction
222 +
223 +**Ladder diagram**
224 +
225 +(% style="text-align:center" %)
226 +[[image:07-5 Basic instructions_html_6ac28f30e24ad296.png||height="352" width="550"]]
227 +
228 +“=”, “<>”, “>”, “<”, “>=”, “<=” can be input in “£”
229 +
230 +**Content, range and data type**
231 +
232 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
233 +|(s1)|Comparison data or the device start number storing the comparison data|0, 2^^-126^^ ≤~|(s)~|< 2^^128^^|Single precision real number|ANYREAL_32
234 +|(s2)|Comparison data or the device start number storing the comparison data|0, 2^^-126^^ ≤~|(s)~|< 2^^128^^|Single precision real number|ANYREAL_32
235 +
236 +**Device used**
237 +
238 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="8" %)**Devices**|(((
239 +**Offset modification**
240 +)))|(((
241 +**Pulse extension**
242 +)))
243 +|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**E**|**[D]**|**XXP**
244 +|LDE=|s1, s2|●|●|●|●|●|●|●|●|●|
245 +|LDE>|s1, s2|●|●|●|●|●|●|●|●|●|
246 +|LDE<|s1, s2|●|●|●|●|●|●|●|●|●|
247 +|LDE>=|s1, s2|●|●|●|●|●|●|●|●|●|
248 +|LDE<=|s1, s2|●|●|●|●|●|●|●|●|●|
249 +|LDE<>|s1, s2|●|●|●|●|●|●|●|●|●|
250 +|ANDE=|s1, s2|●|●|●|●|●|●|●|●|●|
251 +|ANDE>|s1, s2|●|●|●|●|●|●|●|●|●|
252 +|ANDE<|s1, s2|●|●|●|●|●|●|●|●|●|
253 +|ANDE>=|s1, s2|●|●|●|●|●|●|●|●|●|
254 +|ANDE<=|s1, s2|●|●|●|●|●|●|●|●|●|
255 +|ANDE<>|s1, s2|●|●|●|●|●|●|●|●|●|
256 +|ORE=|s1, s2|●|●|●|●|●|●|●|●|●|
257 +|ORD>|s1, s2|●|●|●|●|●|●|●|●|●|
258 +|ORE<|s1, s2|●|●|●|●|●|●|●|●|●|
259 +|ORE>=|s1, s2|●|●|●|●|●|●|●|●|●|
260 +|ORE<=|s1, s2|●|●|●|●|●|●|●|●|●|
261 +|ORE<>|s1, s2|●|●|●|●|●|●|●|●|●|
262 +
263 +**Features**
264 +
265 +The single precision real number of the device specified in (s1) and the single precision real number of the device specified in (s2) are compared by normal open contact processing.
266 +
267 +The comparison operation result of each instruction is shown below.
268 +
269 +|**Instruction Sign**|**Condition**|**Comparison operation result**|**Instruction Sign**|**Condition**|**Comparison operation result**
270 +|E=|(s1)=(s2)|(% rowspan="6" %)On state|E=|(s1)≠(s2)|(% rowspan="6" %)Non-conduction state
271 +|E<>|(s1)≠(s2)|E<>|(s1)=(s2)
272 +|E>|(s1)>(s2)|E>|(s1)≤(s2)
273 +|E<|(s1)<(s2)|E<|(s1)≥(s2)
274 +|E>=|(s1)≥(s2)|E>=|(s1)<(s2)
275 +|E<=|(s1)≤(s2)|E<=|(s1)>(s2)
276 +
277 +**Error code**
278 +
279 +|**Error code**|**Content**
280 +|4084H|When the content of the specified device by (s1) and (s2) is an irregular number, a non-number, or ±∞
281 +|4085H|The read address of (s1) and (s2exceeds the device range
282 +
283 +**Example**
284 +
285 +(1) LDE£ instruction:
286 +
287 +(% style="text-align:center" %)
288 +[[image:07-5 Basic instructions_html_c4c820cf59601493.png]]
289 +
290 +When the real number input in D0 is equal to E1.23, Y10 is ON, otherwise Y10 is OFF.
291 +
292 +When the real number in R0 is greater than or equal to the real number in LC0, Y11 is ON, otherwise it is OFF.
293 +
294 +If the input in D0, R0, LC0 is not a real number, it will report H4084 error.
295 +
296 +(2) ANDE£ instruction:
297 +
298 +(% style="text-align:center" %)
299 +[[image:07-5 Basic instructions_html_7cdd2117360e179b.png]]
300 +
301 +Only when M0 is ON and D2 real number is not equal to E1.23 and R2 real number is less than real number LC2 , Y12 is ON, otherwise all are OFF.
302 +
303 +(3) ORE£ instruction:
304 +
305 +(% style="text-align:center" %)
306 +[[image:07-5 Basic instructions_html_3eba0bd56176441d.png]]
307 +
308 +When the real number of R4 is less than or equal to the real number of R15, or the real number R6 is equal to the real number R20, Y13 is ON, otherwise Y13 is OFF.
309 +
310 +== **String comparison** ==
311 +
312 +**LDS£、ANDS£、 ORS£**
313 +
314 +Compare the string stored after the device number specified in (s1) with the string stored after the device number specified in (s2).
315 +
316 +LDS£: String comparison instruction
317 +
318 +ANDS£: String serial connection comparison instruction
319 +
320 +ORS£: String parallel connection comparison instruction
321 +
322 +**Ladder diagram**
323 +
324 +(% style="text-align:center" %)
325 +[[image:07-5 Basic instructions_html_5fb3b3b70645fef5.png||height="371" width="550"]]
326 +
327 +“=” and “<>” could be entered in “£”
328 +
329 +**Content, range and data type**
330 +
331 +|**Parameter**|**Content**|**Range**|**Date type**|**Date type(label)**
332 +|(S1)|Connection data or the device start number storing the data or the string specified directly|-|String|ANYSTRING_SINGLE
333 +|(S1)|Connection data or the device start number storing the data or the string specified directly|-|String|ANYSTRING_SINGLE
334 +
335 +**Device used**
336 +
337 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|(((
338 +**Offset modification**
339 +)))|(((
340 +**Pulse extension**
341 +)))
342 +|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
343 +|LDS=|s1、s2|●|●|●|●|●|●|●|●|●|●|
344 +|LDS<>|s1、s2|●|●|●|●|●|●|●|●|●|●|
345 +|ANDS=|s1、s2|●|●|●|●|●|●|●|●|●|●|
346 +|ANDS<>|s1、s2|●|●|●|●|●|●|●|●|●|●|
347 +|ORS=|s1、s2|●|●|●|●|●|●|●|●|●|●|
348 +|ORS<>|s1、s2|●|●|●|●|●|●|●|●|●|●|
349 +
350 +**Features**
351 +
352 +• Compare the string stored after the device number specified in (s1) with the string stored after the device number specified in (s2).
353 +
354 +• The comparison operation result of each instruction is shown below.
355 +
356 +|**Instruction sign**|**Condition**|**Comparison operation result**|**Instruction sign**|**Condition**|**Comparison operation result**
357 +|==|(s1)=(s2)|(% rowspan="2" %)On stat|==|(s1)≠(s2)|(% rowspan="2" %)Non-conduction state
358 +|<>|(s1)≠(s2)|<>|(s1)=(s2)
359 +
360 +**Error code**
361 +
362 +|**Error code**|**Content**
363 +|4085H|The read address of (s1) or (s2) exceeds the device range
364 +|408AH|The length of the read string of (s1) or (s2) exceeds, and the continuous length of the string exceeds 400 characters.
365 +|408BH|When (s1) or (s2) reading the string, the maximum range of the device is read but 00H is not found as the end.
366 +
367 +**Example**
368 +
369 +(1) LDS£ instruction:
370 +
371 +(% style="text-align:center" %)
372 +[[image:07-5 Basic instructions_html_449a071f61ff5b58.png]]
373 +
374 +(2) ANDS£ instruction:
375 +
376 +(% style="text-align:center" %)
377 +[[image:07-5 Basic instructions_html_dd6aa995d193bdd2.png]]
378 +
379 +(3) ORS£ instruction:
380 +
381 +(% style="text-align:center" %)
382 +[[image:07-5 Basic instructions_html_4f8fb7c94f87c58d.png]]
383 +
384 += **Clock operation instruction** =
385 +
3 3  == **TADD/The addition of clock data** ==
4 4  
5 5  **TADD(P)**
... ... @@ -204,7 +204,7 @@
204 204  (% style="text-align:center" %)
205 205  [[image:07-5 Basic instructions_html_8f93ea19ba10652b.png]]
206 206  
207 -== **TRD/Clock data reading** ==
590 +**TRD/Clock data reading**
208 208  
209 209  **TRD(P)**
210 210  
... ... @@ -536,7 +536,7 @@
536 536  
537 537  • The measurement stops when the current value reaches the 16-bit maximum. To continue the measurement, clear the current value of (d1) to (d1)+1.
538 538  
539 -✎**Note:**
922 +✎**Note**
540 540  
541 541  • The device specified in (d1) occupies 2 points. Be careful not to overlap with the device used for machine control.
542 542  
... ... @@ -549,14 +549,15 @@
549 549  |4086H|When writing the specified device range exceeds the corresponding device range
550 550  |4084H|When the value of (s) is negative
551 551  
935 +
936 +
552 552  **Example**
553 553  
554 -(% style="text-align:center" %)
555 -[[image:07-5 Basic instructions_html_7570f8c392470a9f.png||height="45" width="320"]]
939 +[[image:07-5 Basic instructions_html_7570f8c392470a9f.png]]
556 556  
557 557  When M0 = ON, the duration of the state is accumulated, the time is recorded in D0, and the seconds less than 1 hour are recorded in D1. When the accumulated time of D0 reaches 98 hours, the Y0 output state is ON. When the timing conditions are met, after reaching the specified value (K98), the accumulated timing will continue and the reading will continue to increase; the current time value D0 reaches the maximum value of 32767 hours and D1 reaches 3599 seconds, the timing measurement will stop. The current time values D0 and D1 are cleared to 0.
558 558  
559 -== **DHOUR/Hour measuring 32 bits** ==
943 +{{id name="_Toc8523"/}}{{id name="_Toc9364"/}}[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DHOUR/Hour measuring 32 bits**
560 560  
561 561  **DHOUR(P)**
562 562  
... ... @@ -568,7 +568,9 @@
568 568  
569 569  |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
570 570  |(s)|(((
571 -The time when the alarm (d2) is turned ON (set by one hour)
955 +The time when the alarm (d2) is turned ON
956 +
957 +(set by one hour)
572 572  )))|0 to 2147483647|Signed BIN 32 bit|ANY32
573 573  |(d1)|Device that stores the current value of measurement (specified data register for power failure retention)|-|Unsigned BIN 32 bit|(((
574 574  ANY32_ARRAY
... ... @@ -579,15 +579,19 @@
579 579  
580 580  **Device used**
581 581  
582 -|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="18" %)**Devices**|(((
583 -**Offset modification**
968 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
969 +**Offset**
970 +
971 +**modification**
584 584  )))|(((
585 -**Pulse extension**
973 +**Pulse**
974 +
975 +**extension**
586 586  )))
587 -|**Y**|**M**|**S**|**SM**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**[D]**|**XXP**
588 -|(% rowspan="3" %)DHOUR|Parameter 1| | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●|●|●
589 -|Parameter 2| | | | | | | | | | | |●|●|●| | | | |●|●
590 -|Parameter 3|●|●|●|●|●| | | | | | | | | | | | | |●|●
977 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
978 +|(% rowspan="3" %)DHOUR|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
979 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
980 +|Parameter 3| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●|●
591 591  
592 592  **Features**
593 593  
... ... @@ -609,7 +609,7 @@
609 609  
610 610  • The measurement stops when the current value reaches the 32-bit maximum. To continue the measurement, clear the current value of (d1) to (d1)+2.
611 611  
612 -✎**Note:**
1002 +✎**Note**
613 613  
614 614  • The device specified in (d1) occupies 3 points. Be careful not to overlap with the device used for machine control.
615 615  
... ... @@ -622,16 +622,17 @@
622 622  |4086H|When writing the specified device range exceeds the corresponding device range
623 623  |4084H|When the value of (s) is negative
624 624  
1015 +
1016 +
625 625  **Example**
626 626  
627 -(% style="text-align:center" %)
628 -[[image:07-5 Basic instructions_html_3f1ef5ecc835de30.png||height="43" width="448"]]
1019 +[[image:07-5 Basic instructions_html_3f1ef5ecc835de30.png]]
629 629  
630 630  When M0=ON, the duration of this state is accumulated, the time is recorded in D1, D0, and the seconds less than 1 hour are recorded in D2. When the accumulated time of D1, D0 reaches 1000 hours, the Y0 output state is ON. When the timing conditions are met, after reaching the specified value (K1000), the accumulated timing will continue, and the reading will continue to increase; the current time values D1 and D0 reach the maximum value of 2147483647 hours, and when D2 reaches 3599 seconds, the timing measurement will stop and the timing should be restarted. The current time values D0, D1, and D2 must be cleared to 0.
631 631  
632 -== **STOH/16-bit data conversion of time data (second → hour, minute, second)** ==
1023 +**{{id name="_Toc11629"/}}STOH/16-bit data conversion of time data (second → hour, minute, second)**
633 633  
634 -**STOH(P)**
1025 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **STOH(P)**
635 635  
636 636  Convert the second 16-bit data stored in the device number specified in (s) into hour, minute, and second, and store the conversion result in the device specified in (d) and later.
637 637  
... ... @@ -640,35 +640,39 @@
640 640  **Content, range and data type**
641 641  
642 642  |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
643 -|(s)|The device start number that stores the clock data before conversion|0 to 32767|Signed BIN 16 bit|ANY16
1034 +|(s)|{{id name="OLE_LINK353"/}}The device start number that stores the clock data before conversion|0 to 32767|Signed BIN 16 bit|ANY16
644 644  |(d)|The device start number that stores the converted clock data|-|Signed BIN 16 bit|(((
645 -ANY16_ARRAY (number of elements: 3)
1036 +ANY16_ARRAY
1037 +
1038 +(number of elements: 3)
646 646  )))
647 647  
648 648  **Device used**
649 649  
650 -|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|(((
651 -**Offset modification**
1043 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
1044 +**Offset**
1045 +
1046 +**modification**
652 652  )))|(((
653 -**Pulse extension**
1048 +**Pulse**
1049 +
1050 +**extension**
654 654  )))
655 -|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
656 -|(% rowspan="2" %)STOH|Parameter 1|●|●|●|●|●|●|●|●|●|●|●
657 -|Parameter 2| |●|●|●|●|●|●|●|●|●|●
1052 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1053 +|(% rowspan="2" %)STOH|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | | | | |●|●
1054 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
658 658  
659 659  **Features**
660 660  
661 661  Convert the second data stored after the device number specified in (s) into hour, minute, and second, and store the conversion result in the device specified in (d) and later.
662 662  
663 -(% style="text-align:center" %)
664 -[[image:07-5 Basic instructions_html_1f5f3f1d80af2a34.png||height="110" width="550"]]
1060 +[[image:07-5 Basic instructions_html_1f5f3f1d80af2a34.png]]
665 665  
666 666  **Example**
667 667  
668 668  When 29,011 seconds are specified in (s)
669 669  
670 -(% style="text-align:center" %)
671 -[[image:07-5 Basic instructions_html_682516cbf773f515.png||height="163" width="550"]]
1066 +[[image:07-5 Basic instructions_html_682516cbf773f515.png]]
672 672  
673 673  **Error code**
674 674  
... ... @@ -679,19 +679,17 @@
679 679  
680 680  **Example**
681 681  
682 -(% style="text-align:center" %)
683 -[[image:07-5 Basic instructions_html_e783349d57adf7d2.png||height="47" width="350"]]
1077 +[[image:07-5 Basic instructions_html_e783349d57adf7d2.png]]
684 684  
685 685  Set D0 seconds to 12537
686 686  
687 687  The hour, minute and second of D10 after the M0 coil is turned on are
688 688  
689 -(% style="text-align:center" %)
690 -[[image:07-5 Basic instructions_html_d3c33949e8684891.png||height="52" width="645"]]
1083 +[[image:07-5 Basic instructions_html_d3c33949e8684891.png]]
691 691  
692 -== **DSTOH/32-bit data conversion of time data (second → hour, minute, second)** ==
1085 +{{id name="_Toc10764"/}}{{id name="_Toc30243"/}}**DSTOH/32-bit data conversion of time data (second → hour, minute, second)**
693 693  
694 -**DSTOH(P)**
1087 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DSTOH(P)**
695 695  
696 696  Convert the second 32-bit data of second stored in the device number specified in (s) into hour, minute, and second, and store the conversion result in the device specified in (d) and later.
697 697  
... ... @@ -702,33 +702,37 @@
702 702  |**Parameter**|**Content**|**Range**|**Data type**|**Data &nbsp;&nbsp;&nbsp;&nbsp;type (label)**
703 703  |(s)|The device start number that stores the clock data before conversion|0 to 117964799|Signed BIN 32 bit|ANY32
704 704  |(d)|The device start number that stores the converted clock data|-|Signed BIN 16 bit|(((
705 -ANY16_ARRAY (number of elements: 3)
1098 +ANY16_ARRAY
1099 +
1100 +(number of elements: 3)
706 706  )))
707 707  
708 708  **Device used**
709 709  
710 -|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|(((
711 -**Offset modification**
1105 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
1106 +**Offset**
1107 +
1108 +**modification**
712 712  )))|(((
713 -**Pulse extension**
1110 +**Pulse**
1111 +
1112 +**extension**
714 714  )))
715 -|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
716 -|(% rowspan="2" %)DSTOH|Parameter 1|●|●|●|●|●|●|●|●|●|●|●
717 -|Parameter 2| |●|●|●|●|●|●|●|●|●|●
1114 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1115 +|(% rowspan="2" %)DSTOH|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | | | | |●|●
1116 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
718 718  
719 719  **Features**
720 720  
721 721  Convert the second data stored after the device number specified in (s) into hour, minute, and second, and store the conversion result in the device specified in (d) and later.
722 722  
723 -(% style="text-align:center" %)
724 -[[image:07-5 Basic instructions_html_cbf13fc3d10fbe61.png||height="99" width="600"]]
1122 +[[image:07-5 Basic instructions_html_cbf13fc3d10fbe61.png]]
725 725  
726 726  **Example**
727 727  
728 728  When 45,325 seconds is specified in (s)
729 729  
730 -(% style="text-align:center" %)
731 -[[image:07-5 Basic instructions_html_d6045506b13275a0.png||height="135" width="600"]]
1128 +[[image:07-5 Basic instructions_html_d6045506b13275a0.png]]
732 732  
733 733  **Error code**
734 734  
... ... @@ -739,17 +739,15 @@
739 739  
740 740  **Example**
741 741  
742 -(% style="text-align:center" %)
743 -[[image:07-5 Basic instructions_html_e7dd49d953db6da4.png||height="39" width="316"]]
1139 +[[image:07-5 Basic instructions_html_e7dd49d953db6da4.png]]
744 744  
745 745  Set D0 seconds to 2152537
746 746  
747 747  The hour, minute and second of D10 after the M0 coil is turned on are
748 748  
749 -(% style="text-align:center" %)
750 -[[image:07-5 Basic instructions_html_10d57bde1ac0a218.png||height="52" width="661"]]
1145 +[[image:07-5 Basic instructions_html_10d57bde1ac0a218.png]]
751 751  
752 -== **TCMP/Clock data comparison** ==
1147 +{{id name="_Toc2937"/}}{{id name="_Toc24209"/}}[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **TCMP/Clock data comparison**
753 753  
754 754  **TCMP(P)**
755 755  
... ... @@ -768,26 +768,29 @@
768 768  
769 769  **Device used**
770 770  
771 -|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="17" %)**Devices**|(((
772 -**Offset modification**
1166 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
1167 +**Offset**
1168 +
1169 +**modification**
773 773  )))|(((
774 -**Pulse extension**
1171 +**Pulse**
1172 +
1173 +**extension**
775 775  )))
776 -|**Y**|**M**|**S**|**SM**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**K**|**H**|**E**|**[D]**|**XXP**
777 -|(% rowspan="5" %)TCMP|Parameter 1| | | | | |●|●|●|●|●|●|●|●|●|●|●| |●|●
778 -|Parameter 2| | | | | |●|●|●|●|●|●|●|●|●|●|●| |●|●
779 -|Parameter 3| | | | | |●|●|●|●|●|●|●|●|●|●|●| |●|●
780 -|Parameter 4| | | | | | | | | |●|●|●|●|●| | | |●|●
781 -|Parameter 5|●|●|●|●|●| | | | | | | | | | | | |●|●
1175 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1176 +|(% rowspan="5" %)TCMP|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1177 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1178 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1179 +|Parameter 4| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●|●
1180 +|Parameter 5| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●|●
782 782  
783 783  **Features**
784 784  
785 785  Compare the time of the reference time (hour, minute, second) [(s1), (s2), (s3)] with the time data (hour, minute, second) [(s4), (s4)+1, (s4) +2] Compare the size and turn on/off the 3 points from (d) according to the result of the same size.
786 786  
787 -(% style="text-align:center" %)
788 -[[image:07-5 Basic instructions_html_5df7ad3057fada12.png||height="385" width="750"]]
1186 +[[image:07-5 Basic instructions_html_5df7ad3057fada12.png]]
789 789  
790 -✎**Note:**
1188 +✎**Note**
791 791  
792 792  The device specified in (s4) and (d) occupies 3 points. Be careful not to overlap with the device used for machine control.
793 793  
... ... @@ -801,29 +801,26 @@
801 801  |4084H|(((
802 802  When the value specified in (s) and (s4) is not in the range of 0 to 23
803 803  
804 -When the value specified in (s2),(s3) (s4)+1 and (s4)+2 is not in the range of 0 to 59
1202 +{{id name="OLE_LINK355"/}}When the value specified in (s2),(s3) (s4)+1 and (s4)+2 is not in the range of 0 to 59
805 805  )))
806 806  
807 807  **Example**
808 808  
809 -(% style="text-align:center" %)
810 -[[image:07-5 Basic instructions_html_fcc16317cf7c0700.png||height="68" width="359"]]
1207 +[[image:07-5 Basic instructions_html_fcc16317cf7c0700.png]]
811 811  
812 812  Set D10 to 1, D11 to 30, D12 to 0
813 813  
814 814  When M0 is turned on, the time that D23 will come is 0:31:27
815 815  
816 -(% style="text-align:center" %)
817 -[[image:07-5 Basic instructions_html_de97dd7a612b2323.png||height="50" width="653"]]
1213 +[[image:07-5 Basic instructions_html_de97dd7a612b2323.png]]
818 818  
819 819  M10 is turned ON
820 820  
821 -(% style="text-align:center" %)
822 -[[image:07-5 Basic instructions_html_56e2d606adc09fd.png||height="52" width="239"]]
1217 +[[image:07-5 Basic instructions_html_56e2d606adc09fd.png]]
823 823  
824 -== **TZCP/Clock data bandwidth comparison** ==
1219 +{{id name="_Toc29031"/}}{{id name="_Toc22923"/}}**TZCP/Clock data bandwidth comparison**
825 825  
826 -**TZCP(P)**
1221 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **TZCP(P)**
827 827  
828 828  Compare the comparison time of the high and low points specified in (s1) and (s2) with the time data specified in (s3), and turn the bit device specified in (d) ON/OFF according to its size and bandwidth.
829 829  
... ... @@ -833,37 +833,46 @@
833 833  
834 834  |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
835 835  |(s1)|Specify the "hour" of the lower limit time (hour, minute, second)|-|Signed BIN 16 bit|(((
836 -ANY16_ARRAY (number of elements: 3)
1231 +ANY16_ARRAY
1232 +
1233 +(number of elements: 3)
837 837  )))
838 838  |(s2)|Specify the "hour" of the lower limit time (hour, minute, second)|-|Signed BIN 16 bit|(((
839 -ANY16_ARRAY (number of elements: 3)
1236 +ANY16_ARRAY
1237 +
1238 +(number of elements: 3)
840 840  )))
841 841  |(s3)|Specify "hour" of time data (hour, minute, second)|-|Signed BIN 16 bit|(((
842 -ANY16_ARRAY (number of elements: 3)
1241 +ANY16_ARRAY
1242 +
1243 +(number of elements: 3)
843 843  )))
844 844  |(d)|The bit device is turned ON/OFF according to the comparison result.|-|Bit|(((
845 -ANY16_ARRAY (number of elements: 3)
1246 +ANY16_ARRAY
1247 +
1248 +(number of elements: 3)
846 846  )))
847 847  
848 848  **Device used**
849 849  
850 -|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="10" %)**Devices**|**Offset modification**|(((
851 -**Pulse extension**
1253 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1254 +**Pulse**
1255 +
1256 +**extension**
852 852  )))
853 -|**Y**|**M**|**S**|**SM**|**D.b**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
854 -|(% rowspan="4" %)TZCP|Parameter 1| | | | | |●|●|●|●|●|●|●
855 -|Parameter 2| | | | | |●|●|●|●|●|●|●
856 -|Parameter 3| | | | | |●|●|●|●|●|●|●
857 -|Parameter 4|●|●|●|●|●| | | | | |●|●
1258 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1259 +|(% rowspan="4" %)TZCP|Parameter 1| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●|●
1260 +|Parameter 2| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●|●
1261 +|Parameter 3| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●|●
1262 +|Parameter 4| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●|●
858 858  
859 859  **Features**
860 860  
861 861  Compare the comparison time of the high and low points specified in (s1) and (s2) with the time data specified in (s3), and turn the bit device specified in (d) ON/OFF according to its size and bandwidth.
862 862  
863 -(% style="text-align:center" %)
864 -[[image:07-5 Basic instructions_html_844291270080313d.png||height="339" width="750"]]
1268 +[[image:07-5 Basic instructions_html_844291270080313d.png]]
865 865  
866 -✎**Note:**
1270 +✎**Note**
867 867  
868 868  • The devices specified in (s1), (s2), (s3), (d) occupy 3 points. Be careful not to overlap with the device used for machine control.
869 869  
... ... @@ -884,90 +884,1176 @@
884 884  
885 885  **Example**
886 886  
887 -(% style="text-align:center" %)
888 -[[image:07-5 Basic instructions_html_30027a2387c26c2e.png||height="46" width="439"]]
1291 +[[image:07-5 Basic instructions_html_30027a2387c26c2e.png]]
889 889  
890 890  Set D0 time to 16:30:00 and D10 time to 4:30:0
891 891  
892 -(% style="text-align:center" %)
893 -[[image:07-5 Basic instructions_html_c64e0faf2af172f8.png||height="49" width="626"]]
1295 +[[image:07-5 Basic instructions_html_c64e0faf2af172f8.png]]
894 894  
895 -(% style="text-align:center" %)
896 -[[image:07-5 Basic instructions_html_66e3a2eadeb2ecbb.png||height="50" width="625"]]
1297 +[[image:07-5 Basic instructions_html_66e3a2eadeb2ecbb.png]]
897 897  
898 898  After the coil is turned on, the reading time to D20 time is 8:30:00
899 899  
900 -(% style="text-align:center" %)
901 -[[image:07-5 Basic instructions_html_75c44dad07eaf80a.png||height="49" width="625"]]
1301 +[[image:07-5 Basic instructions_html_75c44dad07eaf80a.png]]
902 902  
903 903  M0/M12 is ON
904 904  
905 -(% style="text-align:center" %)
906 -[[image:07-5 Basic instructions_html_f512f36261705953.png||height="48" width="218"]]
1305 +[[image:07-5 Basic instructions_html_f512f36261705953.png]]
907 907  
1307 +{{id name="_Toc6129"/}}[[image:07-5 Basic instructions_html_a2e3294e01b2f206.gif]] **7.13 Data control instructions**
908 908  
909 -== **TON/BIN 16-bit Turn-on delay timer** ==
1309 +{{id name="_Toc3339"/}}{{id name="_Toc27829"/}}{{id name="_Toc9204"/}}**BAND/BIN 16-bit data dead zone control**
910 910  
911 -**TON(P)**
1311 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **BAND(P)**
912 912  
913 -Specify the T timer device in (s1), the expected time in (s2), and the time base (resolution) in (s3). And the result of the measured individual time interval operation is stored in the device specified in (s1).
1313 +The input value (BIN 16-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the upper and lower limits of the dead zone specified in (s1) and (s2).
914 914  
915 -PLC Editor2 version that supports this instruction: 2.3.1 and above.
1315 +-[BAND (s1) (s2) (S3) (d)]
916 916  
917 --[TON (s1) (s2) (s3)]
1317 +**Content, range and data type**
918 918  
919 -**Content, scope, data type**
1319 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1320 +|(s1)|Lower limit of dead zone (no output zone)|-32,768 to +32,767|Signed BIN 16 bit|ANY16_S
1321 +|(s2)|Upper limit of dead zone (no output zone)|-32,768 to +32,767|Signed BIN 16 bit|ANY16_S
1322 +|(S3)|Input value controlled by dead zone control|-32768 to +32,767|Signed BIN 16 bit|ANY16_S
1323 +|(D)|The start number of the device that stores the output value controlled by the dead zone control|-|Signed BIN 16 bit|ANY16_S
920 920  
921 -|**parameter**|**Content**|**range**|**type of data**|**Data type (label)**
922 -|(s1)|T device|0~~511|Signed BIN 16 bit|ANY16_S
923 -|(s2)|Expected time|0~~32767|Signed BIN 16 bit|ANY16_S
924 -|(s3)|Time base(resolution)|1/10/100/1000/10000|Signed BIN 16 bit|ANY16_S
1325 +**Device used**
925 925  
1327 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
1328 +**Offset**
1329 +
1330 +**modification**
1331 +)))|(((
1332 +**Pulse**
1333 +
1334 +**extension**
1335 +)))
1336 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1337 +|(% rowspan="4" %)BAND|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1338 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1339 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | | | | |●|●
1340 +|Parameter 4| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
1341 +
1342 +**Features**
1343 +
1344 +The input value (BIN 16-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the upper and lower limits of the dead zone specified in (s1) and (s2). The output value is controlled as follows.
1345 +
1346 +|**Condition**|**The value stored in the output value**
1347 +|When dead zone low limit (s1)> input value (s3)|Input value (s3)-Dead zone low limit (s1)
1348 +|When dead zone high limit (s1) <input value (s3)|Input value (s3)- Dead zone high limit (s2)
1349 +|When dead zone low limit (s1) ≤ input value (s3) ≤ dead zone low limit (s2)|0
1350 +
1351 +
1352 +(((
1353 +•When the output value stored in (d) is a signed BIN 16-bit value, and the operation result exceeds the range of -32768 to 32767, the situation is shown in the following example.
1354 +
1355 +For example, when (s1) is 10 and (s3) is -32768,
1356 +
1357 +the output value = -32768-10=8000H-000AH=7FFFH=32758.
1358 +
1359 +[[image:07-5 Basic instructions_html_6850e21a76b813c0.png]]
1360 +)))
1361 +
1362 +**Error code**
1363 +
1364 +|**Error code**|**Content**
1365 +|4085H|When the specified device range for reading exceeds the range of the corresponding device.
1366 +|4086H|When the specified device range for writing exceeds the range of the corresponding device.
1367 +|4084H|When the low limit specified in (s1) is greater than the high limit specified in (s2).
1368 +
1369 +**Example &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**
1370 +
1371 +[[image:07-5 Basic instructions_html_c0e65cfeed403ecf.png]]
1372 +
1373 +When X000 is ON, when D0<(-1,000), the value of ( D0)-(-1,000) is stored in (D1).
1374 +
1375 +• When -1,000≦ D0≦1,000, 0 is stored in D1.
1376 +
1377 +• When D0<1,000, the value of (D0)-1,000 is stored in D1.
1378 +
1379 +{{id name="_Toc1180"/}}{{id name="_Toc21657"/}}{{id name="_Toc27323"/}}[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DBAND/BIN 32-bit data dead zone control**
1380 +
1381 +**DBAND(P)**
1382 +
1383 +The input value (BIN 32-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the upper and lower limits of the dead zone specified in (s1) and (s2).
1384 +
1385 +-[DBAND (s1) (s2) (S3) (d)]
1386 +
1387 +**Content, range and data type**
1388 +
1389 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1390 +|(s1)|Dead zone low limit (no output zone)|-2,147,483,648 to +2,147,483,647|Signed BIN 32 bit|ANY32_S
1391 +|(s2)|Dead zone high limit (no output zone)|-2,147,483,648 to +2,147,483,647|Signed BIN 32 bit|ANY32_S
1392 +|(S3)|Input value controlled by dead zone control|-2,147,483,648 to +2,147,483,647|Signed BIN 32 bit|ANY32_S
1393 +|(d)|The start number of the device that stores the output value controlled by the dead zone control|-|Signed BIN 32 bit|ANY32_S
1394 +
926 926  **Device used**
927 927  
928 -|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**parameter**|(% colspan="24" %)**Devices**|**Offset modification**|**Pulse extension**
1397 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1398 +**Pulse**
1399 +
1400 +**extension**
1401 +)))
929 929  |**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
930 -|(% rowspan="3" %)TON|Parameter 1| | | | | | | | | | | | | | |●| | | | | | | | | | |
931 -|Parameter 2| | | | | | | | | | |●|●|●|●| |●|●|●|●| | |●|●| | |
932 -|Parameter 3| | | | | | | | | | | | | | | | | | | | | |●|●| | |
1403 +|(% rowspan="4" %)DBAND|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
1404 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
1405 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●| | | |●|●
1406 +|Parameter 4| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
933 933  
934 -**Timing Chart**
1408 +**Features**
935 935  
1410 +The input value (BIN 32-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the upper and lower limits of the dead zone specified in (s1) and (s2). The output value is controlled as follows.
936 936  
937 -|
938 -| |[[image:file:///C:\Users\ANNAXU~~1\AppData\Local\Temp\ksohtml16916\wps2.jpg]]
1412 +|**Condition**|**The value stored in the output value**
1413 +|When dead zone low limit ((s1), (s1)+1)> input value ((s3), (s3)+1)|{{id name="OLE_LINK42"/}}Input value ((s3), (s3)+1)-dead zone low limit ((s1), (s1)+1)
1414 +|When dead zone high limit ((s1), (s1)+1) <input value ((s3), (s3)+1)|{{id name="OLE_LINK357"/}}Input value ((s3), (s3)+1)-dead zone high limit ((s2), (s2)+1)
1415 +|When dead zone low limit ((s1), (s1)+1) ≤ input value ((s3), (s3)+1) ≤ dead zone high limit ((s2), (s2)+1)|0
939 939  
940 940  
1418 +(((
1419 +• When the output value stored in (d) is a signed BIN 32-bit value, and the operation result exceeds the range of -2,147,483,648 to 2,147,483,647, the situation is as the following example. For example,** &nbsp;**When (s1) and (s1)+1 are 1000, (s3) and (s3)+1 are -2,147,483,648, then the output value=
1420 +
1421 +-2,147,483,648-1000=80000000H-000003E8H=7FFFFC18H=2,147,482,648.
1422 +
1423 +[[image:07-5 Basic instructions_html_e0144674dad3e8fd.png]]
1424 +
1425 +
1426 +
1427 +)))
1428 +
1429 +**Error code**
1430 +
1431 +|**Error code**|**Content**
1432 +|4085H|When the specified device range for reading exceeds the range of the corresponding device.
1433 +|4086H|When the specified device range for writing exceeds the range of the corresponding device.
1434 +|4084H|When the low limit specified in (s1) is greater than the high limit specified in (s2).
1435 +
1436 +**Example**
1437 +
1438 +[[image:07-5 Basic instructions_html_88f3fe0fb4841bab.png]]
1439 +
1440 +• When (D1, D0)<(-10,000), the value of (D1, D0)-(-10,000) is stored in (D11, D10).
1441 +
1442 +• When -10,000≦(D1, D0)≦10,000, 0 is stored in (D11, D10).
1443 +
1444 +• When 10,000< (D1, D0), the value of (D1, D0)-10,000 is stored in D1.
1445 +
1446 +{{id name="_Toc21668"/}}{{id name="_Toc25056"/}}{{id name="_Toc17582"/}}{{id name="OLE_LINK165"/}}**BINDA/BIN 16-bit data → Decimal ASCII conversion**
1447 +
1448 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **BINDA(P)**
1449 +
1450 +Convert the BIN 16-bit data specified in (s) and the value of each digit in decimal numbers into ASCII codes and store them after the device number specified in (d).
1451 +
1452 +-[BINDA(s)(d)]
1453 +
1454 +**Content, range and data type**
1455 +
1456 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1457 +|(s)|BIN data for ASCII conversion|-32768 to +32767|Signed BIN 16 bit|ANY16_S
1458 +|(d)|The start number of the device storing the conversion result|-|String|ANYSTRING_SINGLE
1459 +
1460 +**Device used**
1461 +
1462 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1463 +**Pulse**
1464 +
1465 +**extension**
1466 +)))
1467 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1468 +|(% rowspan="2" %)BINDA|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1469 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
1470 +
941 941  **Features**
942 942  
943 -1) When the timer starts timing, the instruction after the timer starts to run when the timing time is greater than the time value of "the product of S2 and S3".
1473 +Convert the BIN 16-bit data specified in (s) and the value of each digit in decimal numbers into ASCII codes and store them after the device number specified in (d).
944 944  
945 -2) When the timer value is greater than 0 and less than the time value of "the product of S2 and S3", the timer will stop whenever the contact is disconnected, and when the contact is connected, the timer will start timing again.
946 946  
947 947  
948 -|**S3 time base**|**Actual value**
949 -|1|100us
950 -|10|1ms
951 -|100|10ms
952 -|1000|100ms
953 -|10000|1s
1477 +(((
1478 +←Only store 0 when SM191 is OFF
954 954  
955 -**Precautions**
1480 +[[image:07-5 Basic instructions_html_57bda5f08026449d.png]]
1481 +)))
956 956  
957 -• Avoid timer number conflict: the same timer number cannot be used for TON, TONR, TOF, TP, OUT_T timers at the same time. For example, TON T32 and TOF T32 cannot be used at the same time (it may cause data confusion and not achieve the effect of the corresponding instruction function).
1483 +For example, when -12,345 is specified in (s) (in the case of specifying signed)
958 958  
1485 +[[image:07-5 Basic instructions_html_f346102467b9bef9.png]]
1486 +
1487 +The calculation result stored in (d) will be as below.
1488 +
1489 +• In "Sign", 20H is stored when the BIN data is positive, and 2DH is stored when it is negative.
1490 +
1491 +• In the 0 to the left of the effective digit, 20H is stored. (Suppress 0.) For example, in the case of "00325", "00" becomes 20H, and "325" becomes the effective digit.
1492 +
1493 +• When storing data to the device specified in (d)+3, when SM191 (output character number switching signal) is OFF, 0 is stored, and it does not change when it is ON.
1494 +
1495 +✎**Note: **The number of occupied points of (d) is 3 when SM191 is ON, and it is 4 when SM191 is OFF.
1496 +
959 959  **Error code**
960 960  
961 961  |**Error code**|**Content**
962 -|4084H|Input data in (s2) (s3) is outside the specified range.
963 -|4085H|Device tpye in (s1) (s2) (s3) is outside the specified range.
964 -|4086H|Device tpye in (s1) is outside the specified range.
1500 +|4085H|The read address of (s) exceeds the device range.
1501 +|4086H|The write address of (d) exceeds the device range.
965 965  
966 966  **Example**
967 967  
968 968  
969 -T1 is used for storing time, setting the expected time as K10 and the time base as K10000.
970 970  
971 -After set on (M8) contact and waiting for the value in the turn-on delay timer (T1) to reach the estimated time of 10s, the contact of (T1) on and output Y0.
1507 +(((
1508 +When X000 is ON, convert the value of 16-bit data (BIN) D1000 into decimal ASCII code, and then use PR instruction to output the
972 972  
973 -If the (M8) contact is off in the process of turn-on delay timer (T1) timing, the turn-on delay timer (T1) value is cleared to 0 and the timing ends.
1510 +converted ASCII code character by character to the program of Y040 to Y057.
1511 +
1512 +[[image:07-5 Basic instructions_html_c598806a42484ed.png]]
1513 +)))
1514 +
1515 +{{id name="_Toc12255"/}}{{id name="_Toc8216"/}}{{id name="_Toc470"/}}**DBINDA/BIN 32-bit data → Decimal ASCII conversion**
1516 +
1517 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DBINDA(P)**
1518 +
1519 +Convert the BIN 32-bit data specified in (s) and the value of each bit in decimal numbers into ASCII codes and store them after the device number specified in (d).
1520 +
1521 +-[DBINDA(s)(d)]
1522 +
1523 +**Content, range and data type**
1524 +
1525 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1526 +|(s)|BIN data for ASCII conversion|-2,147483648 to 2147483647|Signed BIN 32 bit|ANY32_S
1527 +|(d)|{{id name="OLE_LINK2"/}}The start number of the device storing the conversion result|-|String|ANYSTRING_SINGLE
1528 +
1529 +**Device used**
1530 +
1531 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|(((
1532 +**Offset**
1533 +
1534 +**modification**
1535 +)))|(((
1536 +**Pulse**
1537 +
1538 +**extension**
1539 +)))
1540 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1541 +|(% rowspan="2" %)DBINDA|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
1542 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
1543 +
1544 +**Features**
1545 +
1546 +Convert the BIN 32-bit data specified in (s) and the value of each bit when expressed in decimal numbers into ASCII codes, and store them after the device number specified in (d).
1547 +
1548 +For example, when -12345678 is specified in (s). (in the case of specifying signed)
1549 +
1550 +[[image:07-5 Basic instructions_html_4d939462838cf09b.gif]] The calculation result stored in (d) will be as below.
1551 +
1552 +• In "Sign", 20H is stored when the BIN data is positive, and 2DH is stored when it is negative.
1553 +
1554 +• 20H is stored at 0 to the left of the effective number of digits. (Suppress 0.) For example, in the case of "0012034560", "00" becomes 20H, and "12034560" becomes effective digits.
1555 +
1556 +• For the data stored in the upper 8 bits of the device specified in (d)+5, 0 will be stored when SM191 (output character switching signal) is OFF, and 20H will be stored when it is ON.
1557 +
1558 +✎**Note: **(d) Occupies 6 points.
1559 +
1560 +**Error code**
1561 +
1562 +|**Error code**|**Content**
1563 +|4085H|(s) read address exceeds the device range
1564 +|4086H|(d) write address exceeds the device range
1565 +
1566 +**Example**
1567 +
1568 +[[image:07-5 Basic instructions_html_ec8ac32d748a991c.png]]
1569 +
1570 +When X000 is ON, convert the value of 32-bit data (BIN) D1000 into decimal ASCII code, and then use PR (FNC 77) instruction to output the converted ASCII code character by character to the program in Y040 to Y051 in time and time division.
1571 +
1572 +{{id name="_Toc19693"/}}{{id name="_Toc18078"/}}{{id name="_Toc5726"/}}**DABIN/Decimal ASCII → BIN conversion**
1573 +
1574 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DABIN(P)**
1575 +
1576 +Digital ASCII code (30H to 39H) is a instruction to convert real data into BIN data.
1577 +
1578 +-[DABIN (s) (d)]
1579 +
1580 +**Content, range and data type**
1581 +
1582 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1583 +|(s)|The start number of the device that stores the data (ASCII code) to be converted into a BIN value|-|String|ANYSTRING_SINGLE
1584 +|(d)|The device number for storing conversion result|-|BIN16 bit|ANY16_S
1585 +
1586 +**Device used**
1587 +
1588 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1589 +**Pulse**
1590 +
1591 +**extension**
1592 +)))
1593 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1594 +|(% rowspan="2" %)DABIN|Parameter 1| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
1595 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
1596 +
1597 +**Features**
1598 +
1599 +The decimal ASCII data stored after the device number specified in (s) is converted into BIN 16-bit data and stored in the device specified in (d).
1600 +
1601 +[[image:07-5 Basic instructions_html_22c5cb32a0a32214.png]]
1602 +
1603 +|**ASCII S**|**ASCII 10^^0^^**|**ASCII 10^^1^^**|**ASCII 10^^2^^**|**ASCII 10^^3^^**|**ASCII 10^^4^^**
1604 +|**ASCII code**|(((
1605 +{{id name="OLE_LINK36"/}}Units of
1606 +
1607 +ASCII code
1608 +)))|(((
1609 +Tens of
1610 +
1611 +ASCII code
1612 +)))|(((
1613 +Hundreds of
1614 +
1615 +ASCII code
1616 +)))|(((
1617 +Thousands of
1618 +
1619 +ASCII code
1620 +)))|(((
1621 +Ten thousands
1622 +
1623 +of ASCII code
1624 +)))
1625 +
1626 +For example, When -25,108 is specified in (s)
1627 +
1628 +[[image:07-5 Basic instructions_html_10fb2792e37dbf23.png]]
1629 +
1630 +• The ASCII data specified in (s) to (s)+2 is within the range of -32,768 to +32,767.
1631 +
1632 +• In “Sign”, set 20H when the converted data is positive, and set 2DH when it is negative. (When other than 20H or 2DH is set, it will be treated as positive data. (DABIN(P))
1633 +
1634 +• The range of the ASCII code set in each digit is 30H to 39H.
1635 +
1636 +• When the ASCII code set in each bit is 20H or 00H, it will be treated as 30H.
1637 +
1638 +**Error code**
1639 +
1640 +|**Error code**|**Content**
1641 +|4084H|(((
1642 +When the Sign data exceeds the range of 30H to 39H, 20H, 00H, 2DH;
1643 +
1644 +When the ASCII code of each bit specified in (s) to (s)+2 exceeds the range of 30H to 39H, 20H, 00H;
1645 +
1646 +When the ASCII data specified in (s) to (s)+2 is other than -32,768 to +32,767.
1647 +)))
1648 +|4085H|The read address of (s) exceeds the device range.
1649 +|4086H|The write address of (d) exceeds the device range.
1650 +
1651 +
1652 +(((
1653 +When X000 is ON, the Signs set in D20 to D22 and the ASCII code data of 5-digit decimal numbers are converted into BIN values, and then stored in the program of D0.
1654 +
1655 +**Example**
1656 +)))
1657 +
1658 +[[image:07-5 Basic instructions_html_bec2bea131b58c03.png]]
1659 +
1660 +{{id name="_Toc3351"/}}{{id name="_Toc26383"/}}{{id name="_Toc26233"/}}**DDABIN/Decimal ASCII → BIN32-bit data conversion**
1661 +
1662 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DDABIN(P)**
1663 +
1664 +The decimal ASCII data stored after the device number specified in (s) is converted into BIN 32-bit data and stored in the device number specified in (d).
1665 +
1666 +-[DDABIN (s) (d) ]
1667 +
1668 +**Content, range and data type**
1669 +
1670 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1671 +|(s)|The start number of the device that stores data (ASCII code) to be converted into a BIN value|-|String|ANYSTRING_SINGLE
1672 +|(d)|The device number for storing conversion result|-|Signed BIN 32 bit|ANY32_S
1673 +
1674 +**Device used**
1675 +
1676 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1677 +**Pulse**
1678 +
1679 +**extension**
1680 +)))
1681 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1682 +|(% rowspan="2" %)DDABIN|Parameter 1| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
1683 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
1684 +
1685 +**Features**
1686 +
1687 +The decimal ASCII data stored after the device number specified in (s) is converted into BIN 32-bit data and stored in the device specified in (d).
1688 +
1689 +[[image:07-5 Basic instructions_html_c444110b273f33b7.gif]]
1690 +
1691 +|**ASCII S**|**ASCII code**|**ASCII S**|**ASCII code**
1692 +|ASCII 10^^0^^|Units of ASCII code|ASCII 10^^5^^|{{id name="OLE_LINK38"/}}Hundred thousands of ASCII code
1693 +|ASCII 10^^1^^|Tens of ASCII code|ASCII 10^^6^^|Millions of ASCII code
1694 +|ASCII 10^^2^^|Hundreds of ASCII code|ASCII 10^^7^^|Ten millions of ASCII code
1695 +|ASCII 10^^3^^|{{id name="OLE_LINK37"/}}Thousands of ASCII code|ASCII 10^^8^^|Hundred millions of ASCII code
1696 +|ASCII 10^^4^^|Tens thousands of ASCII code|ASCII 10^^9^^|billions of ASCII code
1697 +
1698 +When -1234543210 is specified in (s) (When signed is specified)
1699 +
1700 +[[image:07-5 Basic instructions_html_1b4c7e1c663a4399.png]]
1701 +
1702 +• The ASCII data specified in (s) to (s)+5 is within the range of -2,147,483,648 to +2,147,483,647. In addition, the data stored in the high byte of (s)+5 will be ignored.
1703 +
1704 +• In the Sign data, set 20H when the converted data is positive, and set 2DH when it is negative. (When other than 20H or 2DH is set, it will be treated as positive data. (DABIN(P))
1705 +
1706 +• The range of ASCII code set in each digit is 30H to 39H.
1707 +
1708 +• When the ASCII code set in each bit is 20H or 00H, it will be treated as 30H.
1709 +
1710 +**Error code**
1711 +
1712 +|**Error code**|**Content**
1713 +|4084H|(((
1714 +When the Sign data exceeds the range of 30H to 39H, 20H, 00H and 2DH;
1715 +
1716 +{{id name="OLE_LINK39"/}}When the ASCII code of each bit specified in (s) to (s)+5 exceeds the range of 30H to 39H, 20H and 00H;
1717 +
1718 +When the ASCII data specified in (s) to (s)+5 exceeds the range of -2,147,483,648 to +2,147,483,647
1719 +)))
1720 +|4085H|The read address of (s) exceeds the device range.
1721 +|4086H|The write address of (d) exceeds the device range.
1722 +
1723 +**Example**
1724 +
1725 +[[image:07-5 Basic instructions_html_feea438c943ea9dd.png]]
1726 +
1727 +When X000 is ON, the Signs set in to D20 to D25 and the ASCII code data of 10-digit decimal numbers are converted into BIN values and then saved to the program in D0 to D1.
1728 +
1729 +{{id name="_Toc26556"/}}{{id name="_Toc12799"/}}{{id name="_Toc23863"/}}**LIMIT/ BIN 16-bit data high and low limit control**
1730 +
1731 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **LIMIT(P)**
1732 +
1733 +The input value (BIN 16-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the upper and lower limit value ranges specified in (s1) and (s2).
1734 +
1735 +-[LIMIT (s1) (s2) (s3) (d)]
1736 +
1737 +**Content, range and data type**
1738 +
1739 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1740 +|s1|Low limit value (minimum output limit value)|-32,768 to 32,767|BIN16 bit|ANY16_S
1741 +|s2|High limit value (maximum output limit value)|-32,768 to 32,767|BIN16 bit|ANY16_S
1742 +|s3|Input value controlled by high and low limit control|-32,768 to 32,767|BIN16 bit|ANY16_S
1743 +|d|The start number of device that stores the output value controlled by high and low limit control|-|BIN16 bit|ANY16_S
1744 +
1745 +**Device used**
1746 +
1747 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1748 +**Pulse**
1749 +
1750 +**extension**
1751 +)))
1752 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1753 +|(% rowspan="4" %)LIMIT|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1754 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1755 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | | | | |●|●
1756 +|Parameter 4| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
1757 +
1758 +**Features**
1759 +
1760 +The input value (BIN 16-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the high and low limit value ranges specified in (s1) and (s2). The output value is controlled as follows.
1761 +
1762 +|**Condition**|**The value stored in the output value**
1763 +|Low limit value (s1)>input value (s3)|Low limit value (s1)
1764 +|High limit value (s1) <input value (s3)|High limit value (s2)
1765 +|Low limit value (s1) ≤ input value (s3) ≤ high limit value (s2)|Input value (s3)
1766 +
1767 +
1768 +(((
1769 +•Only in the case of controlling high limit value, set the minimum value of data range in the low limit value specified in (s1).
1770 +
1771 +• Only in the case of controlling low limit value, set the maximum value of data range in the high limit value specified in (s2).
1772 +
1773 +[[image:07-5 Basic instructions_html_50eb5229b027aa14.png]]
1774 +)))
1775 +
1776 +**Error code**
1777 +
1778 +|**Error code**|**Content**
1779 +|4085H|The read address exceeds the device range
1780 +|4086H|The write address exceeds the device range
1781 +|4084H|High limit <low limit
1782 +
1783 +**Example**
1784 +
1785 +[[image:07-5 Basic instructions_html_d67a2e740d4fc738.png]]
1786 +
1787 +When X000 is ON
1788 +
1789 +• When D0 <500, D1 is 500.
1790 +
1791 +• When 500 ≤ D0 ≤ 5,000, D1 is the value of D0.
1792 +
1793 +• When 5,000 <D0, D1 is 5,000.
1794 +
1795 +{{id name="_Toc32553"/}}{{id name="_Toc9981"/}}{{id name="_Toc9158"/}}**DLIMIT/BIN 32-bit data high and low limit control**
1796 +
1797 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DLIMIT(P)**
1798 +
1799 +The input value (BIN 32-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the range of high and low limit values specified in (s1) and (s2).
1800 +
1801 +-[DLIMIT (s1) (s2) (s3) (d)]
1802 +
1803 +**Content, range and data type**
1804 +
1805 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1806 +|s1|Low limit value (minimum output limit value)|-2,147,483,648 to 2,147,483,647|BIN32 bit|ANY32_S
1807 +|s2|High limit value (maximum output limit value)|-2,147,483,648 to 2,147,483,647|BIN32 bit|ANY32_S
1808 +|s3|Input value controlled by high and low limit control|-2,147,483,648 to 2,147,483,647|BIN32 bit|ANY32_S
1809 +|d|The start number of the device that stores the output value controlled by high and low limit control|-|BIN32 bit|ANY32_S
1810 +
1811 +**Device used**
1812 +
1813 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1814 +**Pulse**
1815 +
1816 +**extension**
1817 +)))
1818 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1819 +|(% rowspan="4" %)DLIMIT|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
1820 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
1821 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●| | | |●|●
1822 +|Parameter 4| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
1823 +
1824 +**Features**
1825 +
1826 +The input value (BIN 32-bit value) specified in (s3) controls the output value stored in the device specified in (d) according to the range of high and low limit values specified in (s1) and (s2). The output value is controlled as follows.
1827 +
1828 +|**Condition**|**The value stored in the output value**
1829 +|Low limit value ((s1), (s1)+1)> input value ((s3), (s3)+1)|Low limit value ((s1), (s1)+1)
1830 +|High limit value ((s2), (s2)+1) <input value ((s3), (s3)+1)|High limit value ((s2), (s2)+1)
1831 +|Low limit value ((s1), (s1)+1) ≤ input value ((s3), (s3)+1) ≤ high limit value ((s2), (s2)+1)|Input value ((s3), (s3)+1)
1832 +
1833 +{{id name="OLE_LINK43"/}}{{id name="OLE_LINK40"/}}•Only in the case of controlling high limit value, set the minimum value of data range in the low limit value specified in (s1).
1834 +
1835 +• Only in the case of controlling low limit value, set the maximum value of data range in the high limit value specified in (s2).
1836 +
1837 +**Error code**
1838 +
1839 +|**Error code**|**Content**
1840 +|4085H|The read address exceeds the device range
1841 +|4086H|The write address exceeds the device range
1842 +|4084H|High limit <low limit
1843 +
1844 +**Example**
1845 +
1846 +[[image:07-5 Basic instructions_html_217355b90f4b4e16.png]]
1847 +
1848 +Operation:
1849 +
1850 +• When (D1, D0) <10,000, (D11, D10) is 10,000.
1851 +
1852 +• When 10,000 ≤ (D1, D0) ≤ 1,000,000, (D11, D10) is the value of (D1, D0).
1853 +
1854 +• When 1,000,000 <(D1, D0), (D11, D10) is 1,000,000.
1855 +
1856 +{{id name="_Toc12534"/}}{{id name="_Toc28213"/}}{{id name="_Toc24591"/}}**SCL/BIN 16-bit unit scale (coordinate data of each point)**
1857 +
1858 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **SCL(P)**
1859 +
1860 +The scaling conversion data (16-bit data unit) specified in (s2) is scaled from the input value specified in (s1), and the calculation result is stored in the device specified in (d).
1861 +
1862 +-[SCL (s1) (s2) (d)]
1863 +
1864 +**Content, range and data type**
1865 +
1866 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1867 +|(s1)|The input value for scaling or the start number of device storing the input value|-32,768 to 32,767|Signed BIN 16 bit|ANY16_S
1868 +|(s2)|The start number of the device storing conversion data for scaling|-|Signed BIN 16 bit|ANY16_S
1869 +|(d)|The start number of the device that stores the output value controlled by scaling|-|Signed BIN 16 bit|ANY16_S
1870 +
1871 +**Device used**
1872 +
1873 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
1874 +**Pulse**
1875 +
1876 +**extension**
1877 +)))
1878 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1879 +|(% rowspan="3" %)SCL|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
1880 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
1881 +|Parameter 3| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
1882 +
1883 +**Features**
1884 +
1885 +For the scale conversion data (16-bit data unit) specified in (s2), scale by the input value specified in (s1), and store the operation result in the device specified in (d). Scale conversion is performed based on the scale conversion data stored after the device specified in (s2).
1886 +
1887 +|(% colspan="2" %)**Setting items (n represents the number of coordinate points specified in (s2))**|**Device allocation**
1888 +|(% colspan="2" %)Coordinate points|(s2)
1889 +|(% rowspan="2" %)Point 1|X coordinate|(s2)+1
1890 +|Y coordinate|(s2)+2
1891 +|(% rowspan="2" %)Point 2|X coordinate|(s2)+3
1892 +|Y coordinate|(s2)+4
1893 +|(% colspan="3" %)........
1894 +|(% rowspan="2" %)Point n|X coordinate|(s2)+2n-1
1895 +|Y coordinate|(s2)+2n
1896 +
1897 +[[image:07-5 Basic instructions_html_80185ccddb878234.png]]
1898 +
1899 +• If the operation result is not an integer value, round the first digit below the decimal point.
1900 +
1901 +• The X coordinate data of the conversion data for scaling should be set in ascending order.
1902 +
1903 +• (s1) should be set within the range of conversion data for scaling (device value of (s2)).
1904 +
1905 +• If the same X coordinate is specified for multiple points, the Y coordinate value of the second point will be output.
1906 +
1907 +• Set the number of coordinate points of the conversion data for scaling within the range of 1 to 32,767.
1908 +
1909 +• Setting example of conversion table for scaling.
1910 +
1911 +In the case of scaling conversion characteristics as shown in the figure below, set it as the following data sheet.
1912 +
1913 +[[image:07-5 Basic instructions_html_74fd22d845ad450e.png]]
1914 +
1915 +|(% colspan="2" rowspan="2" %)**Set &nbsp;&nbsp;&nbsp;&nbsp;items**|(% colspan="3" %)**Sett &nbsp;&nbsp;&nbsp;&nbsp;device and content**|(% rowspan="2" %)**Remarks**
1916 +|(% colspan="2" %)**When R0 is specified in (s2)**|**Set &nbsp;&nbsp;&nbsp;&nbsp;content**
1917 +|(% colspan="2" %)Coordinate points|(s2)|R0|K10|
1918 +|(% rowspan="2" %)Point 1|X coordinate|(s2)+1|R1|K5|
1919 +|Y coordinate|(s2)+2|R2|K20|
1920 +|(% rowspan="2" %)Point 2|X coordinate|(s2)+3|R3|K30|
1921 +|Y coordinate|(s2)+4|R4|K50|
1922 +|(% rowspan="2" %)Point 3|X coordinate|(s2)+5|R5|K100|
1923 +|Y coordinate|(s2)+6|R6|K200|
1924 +|(% rowspan="2" %)Point 4|X coordinate|(s2)+7|R7|K25|(% rowspan="6" %)(((
1925 +If the coordinates are specified by 3 points, the intermediate value could be the output value.
1926 +
1927 +In this example, the output value (median value) is specified by the Y coordinate of point 5.
1928 +
1929 +When the X coordinate is the same at 3 points or more, the value of the 2nd point is also output.
1930 +)))
1931 +|Y coordinate|(s2)+8|R8|K200
1932 +|(% rowspan="2" %)Point 5|X coordinate|(s2)+9|R9|K70
1933 +|Y coordinate|(s2)+10|R10|K200
1934 +|(% rowspan="2" %)Point 6|X coordinate|(s2)+11|R11|K250
1935 +|Y coordinate|(s2)+12|R12|K250
1936 +|(% rowspan="2" %)Point 7|X coordinate|(s2)+13|R13|K250|
1937 +|Y coordinate|(s2)+14|R14|K90|
1938 +|(% rowspan="2" %)Point 8|X coordinate|(s2)+15|R15|K350|(% rowspan="4" %)(((
1939 +If the coordinates are specified by two points, the output value is the value of the Y coordinate of the next point.
1940 +
1941 +In this example, the output value is specified by the Y coordinate of point 9.
1942 +)))
1943 +|Y coordinate|(s2)+16|R16|K90
1944 +|(% rowspan="2" %)Point 9|X coordinate|(s2)+17|R17|K350
1945 +|Y coordinate|(s2)+18|R18|K30
1946 +|(% rowspan="2" %)Point 10|X coordinate|(s2)+19|R19|K400|
1947 +|Y coordinate|(s2)+20|R20|K7|
1948 +
1949 +**Error code**
1950 +
1951 +|**Error code**|**Content**
1952 +|4085H|When the specified device range for reading exceeds the range of the corresponding device.
1953 +|4086H|When the specified device range for writing exceeds the range of the corresponding device.
1954 +|4084H|(((
1955 +When the Xn data of data table is not sorted in ascending order. However, the instruction will be executed until the position where the error occurs;
1956 +
1957 +When the input value specified in (s1) exceeds the range of the set scale conversion data;
1958 +
1959 +When the number of start coordinate points of device (s2) is less than 0.
1960 +)))
1961 +
1962 +**Example**
1963 +
1964 +[[image:07-5 Basic instructions_html_5519d7b41f15b6d6.png]]
1965 +
1966 +[[image:07-5 Basic instructions_html_ace075fb7675de8e.gif]] When -100 ≤ D0(X) < 0, D100(Y)=
1967 +
1968 +[[image:07-5 Basic instructions_html_9acd6306c6d91847.gif]] when D0(X)=0, D100(Y)=0;
1969 +
1970 +when 0< D0(X) ≤ 100, D100(Y)=
1971 +
1972 +[[image:07-5 Basic instructions_html_e35e13160c08a133.png]]
1973 +
1974 +
1975 +
1976 +{{id name="_Toc4862"/}}{{id name="_Toc11340"/}}{{id name="_Toc25383"/}}**DSCL/32-bit unit scale (coordinate data of each point)**
1977 +
1978 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DSCL(P)**
1979 +
1980 +The conversion data (32-bit data unit) for scaling specified in (s2) is scaled by the input value specified in (s1), and the operation result is stored in the device specified in (d).
1981 +
1982 +-[DSCL (s1) (s2) (d)]
1983 +
1984 +**Content, range and data type**
1985 +
1986 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
1987 +|(s1)|The input value for scaling or the start number of the device storing the input value|-2,147,483,648 to 2,147,483,647|Signed BIN 32 bit|ANY32_S
1988 +|(s2)|The start number of the device storing conversion data for scaling|-|Signed BIN 32 bit|ANY32_S
1989 +|(d)|The start number of the device that stores the output value controlled by scaling|-|Signed BIN 32 bit|ANY32_S
1990 +
1991 +**Device used**
1992 +
1993 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Device**|**Offset modification**|(((
1994 +**Pulse**
1995 +
1996 +**extension**
1997 +)))
1998 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
1999 +|(% rowspan="3" %)DSCL|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
2000 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
2001 +|Parameter 3| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
2002 +
2003 +**Features**
2004 +
2005 +{{id name="OLE_LINK41"/}}The conversion data (32-bit data unit) for scaling specified in (s2) is scaled by the input value specified in (s1), and the operation result is stored in the device number specified in (d). The scale conversion is performed based on the scale conversion data stored after the device specified in (s2).
2006 +
2007 +|(% colspan="2" %)**Set items (n represents the number of coordinate points specified in (s2))**|**Device allocation**
2008 +|(% colspan="2" %)Coordinate points|(s2)+1, (s2)
2009 +|(% rowspan="2" %)Point 1|X coordinate|(s2)+3, (s2)+2
2010 +|Y coordinate|(s2)+5, (s2)+4
2011 +|(% rowspan="2" %)Point 2|X coordinate|(s2)+7, (s2)+6
2012 +|Y coordinate|(s2)+9, (s2)+8
2013 +|(% colspan="3" %)........
2014 +|(% rowspan="2" %)Point n|X coordinate|(s2)+4n-1, (s2)+4n-2
2015 +|Y coordinate|(s2)+4n+1, (s2)+4n
2016 +
2017 +[[image:07-5 Basic instructions_html_6633ca18cee1218c.png]]
2018 +
2019 +• If the calculation result is not an integer value, round the first digit below the decimal point.
2020 +
2021 +• The X coordinate data of the conversion data for scaling should be set in ascending order.
2022 +
2023 +• For (s1), set within the range of the conversion data for scaling ((s2), (s2) + 1 device value).
2024 +
2025 +• If the same X coordinate is specified for multiple points, the Y coordinate value of the second point will be output.
2026 +
2027 +• Set the number of coordinate points of conversion data for scaling within the range of 1 to 2,147,483,647.
2028 +
2029 +• Setting example of conversion table for scaling.
2030 +
2031 +In the case of scaling conversion characteristics as shown in the figure below, set it as the following data sheet.
2032 +
2033 +[[image:07-5 Basic instructions_html_74fd22d845ad450e.png]]
2034 +
2035 +|(% colspan="2" rowspan="2" %)**Set items**|(% colspan="3" %)**Set &nbsp;&nbsp;&nbsp;&nbsp;device and content**|(% rowspan="2" %)**Remarks**
2036 +|(% colspan="2" %)**When R0 is specified in (s2)**|**Set &nbsp;&nbsp;&nbsp;&nbsp;content**
2037 +|(% colspan="2" %)Coordinate points|(s2)+1, (s2)|R1, R0|K10|
2038 +|(% rowspan="2" %)Point 1|X coordinate|(s2)+3, (s2)+2|R3, R2|K5|
2039 +|Y coordinate|(s2)+5, (s2)+4|R5, R4|K7|
2040 +|(% rowspan="2" %)Point 2|X coordinate|(s2)+7, (s2)+6|R7, R6|K20|
2041 +|Y coordinate|(s2)+9, (s2)+8|R9, R8|K30|
2042 +|(% rowspan="2" %)Point 3|X coordinate|(s2)+11, (s2)+10|R10, R11|K50|
2043 +|Y coordinate|(s2)+13, (s2)+12|R13, R12|K100|
2044 +|(% rowspan="2" %)Point 4|X coordinate|(s2)+15, (s2)+14|R15, R14|K200|(% rowspan="6" %)(((
2045 +if the coordinates are specified by 3 points, the intermediate value could be the output value.
2046 +
2047 +In this example, the output value (median value) is specified by the Y coordinate of point 5.
2048 +
2049 +When the X coordinate is the same at 3 points or more, the value of the 2nd point is also output.
2050 +)))
2051 +|Y coordinate|(s2)+17, (s2)+16|R17, R16|K25
2052 +|(% rowspan="2" %)Point 5|X coordinate|(s2)+19, (s2)+18|R19, R18|K200
2053 +|Y coordinate|(s2)+21, (s2)+20|R21, R20|K70
2054 +|(% rowspan="2" %)Point 6|X coordinate|(s2)+23, (s2)+22|R23, R22|K200
2055 +|Y coordinate|(s2)+25, (s2)+24|R25, R24|K250
2056 +|(% rowspan="2" %)Point 7|X coordinate|(s2)+27, (s2)+26|R27, R26|K250|
2057 +|Y coordinate|(s2)+29, (s2)+28|R29, R28|K90|
2058 +|(% rowspan="2" %)Point 8|X coordinate|(s2)+31, (s2)+30|R31, R30|K350|(% rowspan="4" %)(((
2059 +If the coordinates are specified by two points, the output value is the value of the Y coordinate of the next point.
2060 +
2061 +In this example, the output value is specified by the Y coordinate of point 9.
2062 +)))
2063 +|Y coordinate|(s2)+33, (s2)+32|R33, R32|K90
2064 +|(% rowspan="2" %)Point 9|X coordinate|(s2)+35, (s2)+34|R35, R34|K350
2065 +|Y coordinate|(s2)+37, (s2)+36|R37, R36|K30
2066 +|(% rowspan="2" %)Point 10|X coordinate|(s2)+39, (s2)+38|R39, R38|K400|
2067 +|Y coordinate|(s2)+41, (s2)+40|R41, R40|K7|
2068 +
2069 +**Error code**
2070 +
2071 +|**Error code**|**Content**
2072 +|4085H|When the specified device range for reading exceeds the range of the corresponding device.
2073 +|4086H|When the specified device range for writing exceeds the range of the corresponding device.
2074 +|4084H|(((
2075 +When the Xn data of data table is not sorted in ascending order. However, the instruction will be executed until the position where the error occurs;
2076 +
2077 +When the input value specified in (s1) exceeds the range of the set scale conversion data;
2078 +
2079 +When the number of start coordinate points of device (s2) is less than 0.
2080 +)))
2081 +
2082 +**Example**
2083 +
2084 +[[image:07-5 Basic instructions_html_ba95b2d50d8d1d3e.png]]
2085 +
2086 +[[image:07-5 Basic instructions_html_1de79c7d87d51f78.gif]] When -100 ≤ D0(X) < 0, D100(Y)=
2087 +
2088 +[[image:07-5 Basic instructions_html_9acd6306c6d91847.gif]] When D0(X)=0, D100(Y)=0;
2089 +
2090 +When 0 < D0(X) ≤ 100, D100(Y)=
2091 +
2092 +[[image:07-5 Basic instructions_html_a5b19d1af74a9620.png]]
2093 +
2094 +{{id name="_Toc3776"/}}{{id name="_Toc11170"/}}{{id name="_Toc2957"/}}**SCL2/BIN 16-bit unit scale (X/Y coordinate data)**
2095 +
2096 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **SCL2(P)**
2097 +
2098 +The conversion data (16-bit data unit) for scaling specified in (s2) is scaled by the input value specified in (s1), and the operation result is stored in the device specified in (d).
2099 +
2100 +-[SCL2 (s1) (s2) (d)]
2101 +
2102 +**Content, range and data type**
2103 +
2104 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
2105 +|(s1)|The input value for scaling or the start number of the device storing the input value|-32,768 to 32,767|Signed BIN 16 bit|ANY16_S
2106 +|(s2)|The start number of the device storing conversion data for scaling|-|Signed BIN 16 bit|ANY16_S
2107 +|(d)|The start number of the device that stores the output value controlled by scaling|-|Signed BIN 16 bit|ANY16_S
2108 +
2109 +**Device used**
2110 +
2111 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
2112 +**Pulse**
2113 +
2114 +**extension**
2115 +)))
2116 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
2117 +|(% rowspan="3" %)SCL2|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
2118 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
2119 +|Parameter 3| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
2120 +
2121 +**Features**
2122 +
2123 +The conversion data (16-bit data unit) for scaling specified in (s2) is scaled by the input value specified in (s1), and the operation result is stored in the device number specified in (d). The scale conversion is performed based on the scale conversion data stored after the device specified in (s2).
2124 +
2125 +|(% colspan="2" %)**Set items (n represents the number of coordinate points specified in (s2))**|**Device allocation**
2126 +|(% colspan="2" %)Coordinate points|(s2)
2127 +|(% rowspan="4" %)X coordinate|Point 1|(s2)+1
2128 +|Point 2|(s2)+2
2129 +|.....|......
2130 +|Point n|(s2)+n
2131 +|(% rowspan="4" %)Y coordinate|Point 1|(s2)+n+1
2132 +|Point 2|(s2)+n+2
2133 +|.....|.....
2134 +|Point n|(s2)+2n
2135 +
2136 +[[image:07-5 Basic instructions_html_80185ccddb878234.png]]
2137 +
2138 +• If the operation result is not an integer value, round the first digit below the decimal point.
2139 +
2140 +• The X coordinate data of the conversion data for scaling should be set in ascending order.
2141 +
2142 +• For (s1), set within the range of the conversion data for scaling ((s2), (s2) + 1 device value).
2143 +
2144 +• If the same X coordinate is specified for multiple points, the Y coordinate value of the second point will be output.
2145 +
2146 +• Set the number of coordinate points of conversion data for scaling within the range of 1 to 32,767.
2147 +
2148 +• Setting example of conversion table for scaling.
2149 +
2150 +In the case of scaling conversion characteristics as shown in the figure below, set it as the following data sheet.
2151 +
2152 +[[image:07-5 Basic instructions_html_74fd22d845ad450e.png]]
2153 +
2154 +|(% colspan="2" rowspan="2" %)**Set items**|(% colspan="3" %)**Set device and content**|(% rowspan="2" %)**Remarks**
2155 +|(% colspan="2" %)**When R0 is specified in (s2)**|**Set content**
2156 +|(% colspan="2" %)Coordinate points|(s2)|R0|K10|
2157 +|(% rowspan="10" %)X coordinate|Point 1|(s2)+1|R1|K5|
2158 +|Point 2|(s2)+2|R2|K20|
2159 +|Point 3|(s2)+3|R3|K50|
2160 +|Point 4|(s2)+4|R4|K200|(% rowspan="3" %)Refer to** ✎1**
2161 +|Point 5|(s2)+5|R5|K200
2162 +|Point 6|(s2)+6|R6|K200
2163 +|Point 7|(s2)+7|R7|K250|
2164 +|Point 8|(s2)+8|R8|K350|(% rowspan="2" %)Refer to** ✎2**
2165 +|Point 9|(s2)+9|R9|K350
2166 +|Point 10|(s2)+10|R10|K400|
2167 +|(% rowspan="10" %)Y coordinate|Point 1|(s2)+11|R11|K7|
2168 +|Point 2|(s2)+12|R12|K30|
2169 +|Point 3|(s2)+13|R13|K100|
2170 +|Point 4|(s2)+14|R14|K25|(% rowspan="3" %)Refer to**✎1**
2171 +|Point 5|(s2)+15|R15|K70
2172 +|Point 6|(s2)+16|R16|K250
2173 +|Point 7|(s2)+17|R17|K90|
2174 +|Point 8|(s2)+18|R18|K90|(% rowspan="2" %)Refer to** ✎2**
2175 +|Point 9|(s2)+19|R19|K30
2176 +|Point 10|(s2)+20|R20|K7|
2177 +
2178 +✎**1** Like points 4, 5, and 6, if the coordinates are specified by 3 points, the intermediate value could be the output value.
2179 +
2180 +In this example, the output value (median value) is specified by the Y coordinate of point 5.
2181 +
2182 +When the X coordinate is the same at 3 or more points, the value of the second point is also output.
2183 +
2184 +✎**2** Like points 8 and 9, if the coordinates are specified by 2 points, the output value is the value of the Y coordinate of next point.
2185 +
2186 +In this example, the output value is specified by the Y coordinate of point 9.
2187 +
2188 +**Error code**
2189 +
2190 +|**Error code**|**Content**
2191 +|4085H|When the specified device range for reading exceeds the range of the corresponding device.
2192 +|4086H|When the specified device range for writing exceeds the range of the corresponding device.
2193 +|4084H|(((
2194 +When the Xn data of data table is not sorted in ascending order. However, the instruction will be executed until the position where the error occurs;
2195 +
2196 +When the input value specified in (s1) exceeds the range of the set scale conversion data;
2197 +
2198 +When the number of start coordinate points of device (s2) is less than 0.
2199 +)))
2200 +
2201 +**Example**
2202 +
2203 +[[image:07-5 Basic instructions_html_ace075fb7675de8e.gif]] [[image:07-5 Basic instructions_html_de529c9a16a62ef0.png]]
2204 +
2205 +When -100 ≤D0 (X) < 0, D100(Y)=
2206 +
2207 +[[image:07-5 Basic instructions_html_9acd6306c6d91847.gif]] when D0(X)=0, D100(Y)=0;
2208 +
2209 +when 0 < D0(X) ≤ 100, D100(Y)=
2210 +
2211 +[[image:07-5 Basic instructions_html_a5b19d1af74a9620.png]]
2212 +
2213 +{{id name="_Toc5608"/}}{{id name="_Toc1756"/}}{{id name="_Toc21402"/}}**DSCL2/BIN 32-bit unit scale (X/Y coordinate data)**
2214 +
2215 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **DSCL2(P)**
2216 +
2217 +The conversion data (32-bit data unit) for scaling specified in (s2) is scaled by the input value specified in (s1), and the operation result is stored in the device specified in (d).
2218 +
2219 +-[DSCL2 (s1) (s2) (d)]
2220 +
2221 +**Content, range and data type**
2222 +
2223 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
2224 +|(s1)|The input value for scaling or the start number of the device storing the input value|-2,147,483,648 to +2,147,483,647|Signed BIN 32 bit|ANY32_S
2225 +|(s2)|The start number of the device storing conversion data for scaling|-|Signed BIN 32 bit|ANY32_S
2226 +|(d)|The start number of the device that stores the output value controlled by scaling|-|Signed BIN 32 bit|ANY32_S
2227 +
2228 +**Device used**
2229 +
2230 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
2231 +**Pulse**
2232 +
2233 +**extension**
2234 +)))
2235 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
2236 +|(% rowspan="3" %)DSCL2|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
2237 +|Parameter 2| | | | | | | | | | | | | | | | |●|●|●| | | | | |●|●
2238 +|Parameter 3| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
2239 +
2240 +**Features**
2241 +
2242 +The conversion data (32-bit data unit) for scaling specified in (s2) is scaled by the input value specified in (s1), and the operation result is stored in the device number specified in (d). The scale conversion is performed based on the scale conversion data stored after the device specified in (s2).
2243 +
2244 +|(% colspan="2" %)**Set items (n represents the number of coordinate points specified in (s2))**|**Device allocation**
2245 +|(% colspan="2" %)Coordinate points|(s2)+1, (s2)
2246 +|(% rowspan="4" %)X coordinate|Point 1|(s2)+3, (s2)+2
2247 +|Point 2|(s2)+5, (s2)+4
2248 +|.....|......
2249 +|Point n|(s2)+2n+1, (s2)+2n
2250 +|(% rowspan="4" %)Y coordinate|Point 1|(s2)+2n+3, (s2)+2n+2
2251 +|Point 2|(s2)+2n+5, (s2)+2n+4
2252 +|.....|.....
2253 +|Point n|(s2)+4n+1, (s2)+4n
2254 +
2255 +[[image:07-5 Basic instructions_html_6633ca18cee1218c.png]]
2256 +
2257 +• If the operation result is not an integer value, round the first digit below the decimal point.
2258 +
2259 +• The X coordinate data of the conversion data for scaling should be set in ascending order.
2260 +
2261 +• For (s1), set within the range of the conversion data for scaling ((s2), (s2) + 1 device value).
2262 +
2263 +• If the same X coordinate is specified for multiple points, the Y coordinate value of the second point will be output.
2264 +
2265 +• Set the number of coordinate points of conversion data for scaling within the range of 1 to 2,147,483,647.
2266 +
2267 +• Setting example of conversion table for scaling.
2268 +
2269 +In the case of scaling conversion characteristics as shown in the figure below, set it as the following data sheet.
2270 +
2271 +[[image:07-5 Basic instructions_html_74fd22d845ad450e.png]]
2272 +
2273 +|(% colspan="2" rowspan="2" %)**Set &nbsp;&nbsp;&nbsp;&nbsp;items**|(% colspan="3" %)**Set device and content**|(% rowspan="2" %)**Remarks**
2274 +|(% colspan="2" %)**When R0 is specified in (s2)**|**Set content**
2275 +|(% colspan="2" %)Coordinate points|(s2)+1, (s2)|R1, R0|K10|
2276 +|(% rowspan="10" %)X|Point 1|(s2)+3, (s2)+2|R3, R2|K5|
2277 +|Point 2|(s2)+5, (s2)+4|R5, R4|K20|
2278 +|Point 3|(s2)+7, (s2)+6|R7, R6|K50|
2279 +|Point 4|(s2)+9, (s2)+8|R9, R8|K200|(% rowspan="3" %)Refer to** ✎1**
2280 +|Point 5|(s2)+11, (s2)+10|R10, R11|K200
2281 +|Point 6|(s2)+13, (s2)+12|R13, R12|K200
2282 +|Point 7|(s2)+15, (s2)+14|R15, R14|K250|
2283 +|Point 8|(s2)+17, (s2)+16|R17, R16|K350|(% rowspan="2" %)Refer to** ✎2**
2284 +|Point 9|(s2)+19, (s2)+18|R19, R18|K350
2285 +|Point 10|(s2)+21, (s2)+20|R21, R20|K400|
2286 +|(% rowspan="10" %)Y coordinate|Point 1|(s2)+23, (s2)+22|R23, R22|K7|
2287 +|Point 2|(s2)+25, (s2)+24|R25, R24|K30|
2288 +|Point 3|(s2)+27, (s2)+26|R27, R26|K100|
2289 +|Point 4|(s2)+29, (s2)+28|R29, R28|K25|(% rowspan="3" %)Refer to** ✎1**
2290 +|Point 5|(s2)+31, (s2)+30|R31, R30|K70
2291 +|Point 6|(s2)+33, (s2)+32|R33, R32|K250
2292 +|Point 7|(s2)+35, (s2)+34|R35, R34|K90|
2293 +|Point 8|(s2)+37, (s2)+36|R37, R36|K90|(% rowspan="2" %)Refer to** ✎2**
2294 +|Point 9|(s2)+39, (s2)+38|R39, R38|K30
2295 +|Point 10|(s2)+41, (s2)+40|R41, R40|K7|
2296 +
2297 +✎**1** Like points 4, 5, and 6, if the coordinates are specified by 3 points, the intermediate value could be the output value.
2298 +
2299 +In this example, the output value (median value) is specified by the Y coordinate of point 5.
2300 +
2301 +When the X coordinate is the same at 3 or more points, the value of the second point is also output.
2302 +
2303 +✎**2** Like points 8 and 9, if the coordinates are specified by 2 points, the output value is the value of the Y coordinate of the next point.
2304 +
2305 +In this example, the output value is specified by the Y coordinate of point 9.
2306 +
2307 +**Error code**
2308 +
2309 +|**Error code**|**Content**
2310 +|4085H|When the specified device range for reading exceeds the range of the corresponding device.
2311 +|4086H|When the specified device range for writing exceeds the range of the corresponding device.
2312 +|4084H|(((
2313 +When the Xn data of data table is not sorted in ascending order. However, the instruction will be executed until the position where the error occurs;
2314 +
2315 +When the input value specified in (s1) exceeds the range of the set scale conversion data;
2316 +
2317 +When the number of start coordinate points of device (s2) is less than 0.
2318 +)))
2319 +
2320 +**Example**
2321 +
2322 +[[image:07-5 Basic instructions_html_91dbc16faa9d2ec3.png]]
2323 +
2324 +When -100 ≤D0(X) < 0, D100(Y)=[[image:/xwiki/bin/download/PLC%20Editor2/1%20User%20manual/2.1%20LX5V%20user%20manual/07-5%20Basic%20instruction/WebHome/07-5%20Basic%20instructions_html_2c96d630f666e72c.gif?rev=1.1||alt="07-5 Basic instructions_html_2c96d630f666e72c.gif"]],,[[image:07-5 Basic instructions_html_2c96d630f666e72c.gif]] ,,;
2325 +
2326 +when D0(X)=0, D100(Y)=0;
2327 +
2328 +when 0< D0(X) ≤ 100, D100(Y)=[[image:/xwiki/bin/download/PLC%20Editor2/1%20User%20manual/2.1%20LX5V%20user%20manual/07-5%20Basic%20instruction/WebHome/07-5%20Basic%20instructions_html_47ebf5cc7733fccc.gif?rev=1.1||alt="07-5 Basic instructions_html_47ebf5cc7733fccc.gif"]],,[[image:07-5 Basic instructions_html_47ebf5cc7733fccc.gif]] ,,.
2329 +
2330 +[[image:07-5 Basic instructions_html_a5b19d1af74a9620.png]]
2331 +
2332 +{{id name="_Toc32057"/}}{{id name="_Toc9941"/}}{{id name="_Toc6492"/}}**ZONE/BIN 16-bit data zone control**
2333 +
2334 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] **ZONE(P)**
2335 +
2336 +After adding the offset value specified in (s1) or (s2) to the input value specified in (s3), it is stored in the device number specified in (d).
2337 +
2338 +-[ZONE (s1) (s2) (s3) (d)]
2339 +
2340 +**Content, range and data type**
2341 +
2342 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
2343 +|s1|The negative offset value for addition in the input value|-32,768 to 32,767|BIN16 bit|ANY16_S
2344 +|s2|The positive offset value for addition in the input value|-32,768 to 32,767|BIN16 bit|ANY16_S
2345 +|s3|Input value for zone control`|-32,768 to 32,767|BIN16 bit|ANY16_S
2346 +|d|The start number of the device storing the output value controlled by zone control|-|BIN16 bit|ANY16_S
2347 +
2348 +**Device used**
2349 +
2350 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
2351 +**Pulse**
2352 +
2353 +**extension**
2354 +)))
2355 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
2356 +|(% rowspan="4" %)ZONE|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
2357 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|●
2358 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | | | | |●|●
2359 +|Parameter 4| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|●
2360 +
2361 +**Features**
2362 +
2363 +After adding the offset value specified in (s1) or (s2) to the input value (BIN 16-bit value) specified in (s3), it is stored in the device number specified in (d). The offset value is controlled as follows.
2364 +
2365 +|**Condition**|**The value stored in the output value**
2366 +|When input value (s3)<0|Input value (s3) + negative offset value (s1)
2367 +|When input value (s3)=0|0
2368 +|When input value (s3)>0|Input value (s3) + positive offset value (s2)
2369 +
2370 +
2371 +(((
2372 +• When the output value stored in (d) is a signed BIN 16-bit value, and the operation result exceeds the range of -32,768 to 32,767, the situation is shown in the following example.
2373 +
2374 +For example, when (s1) is -100 and (s3) is -32,768,
2375 +
2376 +the output value = -32768+(-100)=8000H-FF9CH=7F9CH=32668.
2377 +
2378 +[[image:07-5 Basic instructions_html_a2adbf9ccf8f839.png]]
2379 +
2380 +
2381 +
2382 +)))
2383 +
2384 +**Error code**
2385 +
2386 +|**Error code**|**Content**
2387 +|4085H|When the specified device range for reading exceeds the range of the corresponding device
2388 +|4086H|When the specified device range for writing exceeds the range of the corresponding device
2389 +
2390 +**Example**
2391 +
2392 +[[image:07-5 Basic instructions_html_5da523c7765bf5be.png]]
2393 +
2394 +When X000 is ON
2395 +
2396 +• When D0<0, the value of (D0)+(-1,000) is stored in D1.
2397 +
2398 +• When D0=0, 0 is stored in D1.
2399 +
2400 +• When 0<D0, the value of (D0)+(1,000) is stored in D1.
2401 +
2402 +{{id name="_Toc28351"/}}{{id name="_Toc11023"/}}{{id name="_Toc30269"/}}**DZONE/BIN 32-bit data zone control**
2403 +
2404 +[[image:07-5 Basic instructions_html_11b3991e89e21efc.gif]] DZONE(P)
2405 +
2406 +After adding the offset value specified in (s1) or (s2) to the input value specified in (s3), it is stored in the device number specified in (d).
2407 +
2408 +-[DZONE (s1) (s2) (s3) (d)]
2409 +
2410 +**Content, range and data type**
2411 +
2412 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
2413 +|(s1)|The negative offset value for addition in the input value|-2147483648 to 2147483647|BIN32 bit|ANY32_S
2414 +|(s2)|The positive offset value for addition in the input value|-2147483648 to 2147483647|BIN32 bit|ANY32_S
2415 +|(s3)|Input value for zone control|-2147483648 to 2147483647|BIN32 bit|ANY32_S
2416 +|(d)|The start number of the device storing the output value controlled by zone control|-|BIN32 bit|ANY32_S
2417 +
2418 +**Device used**
2419 +
2420 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Offset modification**|(((
2421 +**Pulse**
2422 +
2423 +**extension**
2424 +)))
2425 +|**X**|**Y**|**M**|**S**|**SM**|**T(bit)**|**C(bit)**|**LC(bit)**|**HSC(bit)**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP**
2426 +|(% rowspan="4" %)DZONE|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
2427 +|Parameter 2| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●|●|●| |●|●
2428 +|Parameter 3| | | | | | | | | | |●|●|●|●|●|●|●|●|●|●|●| | | |●|●
2429 +|Parameter 4| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●|●
2430 +
2431 +**Features**
2432 +
2433 +After adding the offset value specified in (s1) or (s2) to the input value (BIN 32-bit value) specified in (s3), it is stored in the device number specified in (d). The offset value is controlled as follows.
2434 +
2435 +|**Condition**|**The value stored in the output value**
2436 +|When input value ((s3), (s3)+1)<0|Input value ((s3), (s3)+1) + negative offset value (s1), (s1)+1
2437 +|When input value ((s3), (s3)+1)=0|0
2438 +|When input value ((s3), (s3)+1)>0|Input value ((s3), (s3)+1) + positive offset value (s2), (s2)+1
2439 +
2440 +
2441 +(((
2442 +• When the output value stored in (d) and (d)+1 is a signed BIN 32-bit value, and the operation result exceeds the range of -2,147,483,648 to 2,147,483,647, the situation is shown in the following example.
2443 +
2444 +For example, (s1), (s1)+1 is -1,000, (s3), (s3)+1 is -2,147,483,648, then the output value=-2,147,483,648+(-1000)=80000000H+FFFFFC18H=2,147,482,648.
2445 +
2446 +[[image:07-5 Basic instructions_html_2f3a96a2565c75c7.png]]
2447 +)))
2448 +
2449 +**Error code**
2450 +
2451 +|**Error code**|**Content**
2452 +|4085H|When the specified device range for reading exceeds the range of the corresponding device
2453 +|4086H|When the specified device range for writing exceeds the range of the corresponding device
2454 +
2455 +**Example**
2456 +
2457 +[[image:07-5 Basic instructions_html_b831b14748df07ab.png]]
2458 +
2459 +• When (D1, D0)<0, the value of (D1, D0)+(-10,000) is stored in (D11, D10).
2460 +
2461 +• When (D1, D0)=0, 0 is stored in (D11, D10).
2462 +
2463 +• When 0<(D1, D0), the value of (D1, D0)+10,000 is stored in (D11, D10).