Wiki source code of 12 Clock operation

Version 15.1 by Bob on 2022/11/23 11:09

Hide last authors
Bob 15.1 1 == ==
Jim 10.1 2
Joey 1.4 3 == **TADD/The addition of clock data** ==
Leo Wei 1.1 4
5 **TADD(P)**
6
7 Add the time data stored after the device number specified in (s1) and the time data stored after the device number specified in (s2), and store the result of the addition operation after the device number specified in (d) .
8
9 -[TADD (s1) (s2) (d)]
10
11 **Content, range and data type**
12
13 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
Joey 1.4 14 |(s1)|The device start number that stores the added time data|-|Signed BIN 16 bit|(((
Leo Wei 1.1 15 ANY16_ARRAY
16
17 (number of elements: 3)
18 )))
19 |(s2)|The device start number that stores the addition operation time (time) data|-|Signed BIN 16 bit|(((
20 ANY16_ARRAY
21
22 (number of elements: 3)
23 )))
24 |(d)|The device start number that stores the time (time) data of the addition operation result|-|Signed BIN 16 bit|(((
25 ANY16_ARRAY
26
27 (number of elements: 3)
28 )))
29
30 **Device used**
31
Joey 1.5 32 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="5" %)**Devices**|(((
33 **Offset modification**
Leo Wei 1.1 34 )))|(((
Joey 1.5 35 **Pulse extension**
Leo Wei 1.1 36 )))
Joey 1.5 37 |**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
38 |(% rowspan="3" %)TADD|Parameter 1|●|●|●|●|●|●|●
39 |Parameter 2|●|●|●|●|●|●|●
40 |Parameter 3|●|●|●|●|●|●|●
Leo Wei 1.1 41
42 **Features**
43
44 Add the time data specified in (s1) and the time data specified in (s2), and store the result of the addition in the device number specified in (d) or later.
45
Joey 1.5 46 (% style="text-align:center" %)
47 [[image:07-5 Basic instructions_html_37222a6e282347f9.png||height="79" width="750"]]
Leo Wei 1.1 48
49 **Example**
50
51 When 6:32:40 and 7:48:10 are added together
52
Joey 1.5 53 (% style="text-align:center" %)
54 [[image:07-5 Basic instructions_html_90138670198ab422.png||height="94" width="750"]]
Leo Wei 1.1 55
56 When the calculation result time exceeds 24 o'clock, the carry flag turns ON, and the value after 24 hours is subtracted becomes the calculation result. For example, when 14:20:30 and 20:20:20 are added, the result is not 34:40:50, but 10:40:50.
57
Joey 1.5 58 (% style="text-align:center" %)
59 [[image:07-5 Basic instructions_html_bac419ce2dc0dc2.png||height="91" width="750"]]
Leo Wei 1.1 60
61 When the calculation result is 0 (0 hour, 0 minute, 0 second), the zero flag turns on.
62
63 When 23:59:59 and 1 second are added, the result of the calculation is 0:00:00, and the carry flag and zero flag are turned on.
64
65 Related device are as follows:
66
67 |**Devices**|**Name**|**Content**
68 |SM151|Carry|It is ON when the result of the TADD(P) instruction exceeds the maximum clock data value of 23:59:59
69 |SM153|Zero|It is ON when the result of the TADD(P) instruction is 0:00:00
70
Joey 1.5 71 ✎**Note:**
Leo Wei 1.1 72
73 The devices specified in (s1), (s2), (d) occupy 3 points respectively. Be careful not to overlap with the device used for machine control.
74
75 When using the clock data time (hour, minute, second) of the built-in real-time clock of the CPU module, use the TRD(P) instruction to read the value of the special register and assign the word device to each operand.
76
77 **Error code**
78
79 |**Error code**|**Content**
Joey 1.5 80 |4085H|When reading the specified device range exceeds the corresponding device range
Leo Wei 1.1 81 |4086H|When writing the specified device range exceeds the corresponding device range
82 |4084H|(((
83 When the values specified in (s1) and (s2) are other than 0 to 23
84
85 When the values specified in (s1)+1, (s2)+1, (s1)+2 and (s2)+2 are other than 0 to 59
86 )))
87
88 **Example**
89
Joey 1.5 90 (% style="text-align:center" %)
91 [[image:07-5 Basic instructions_html_4f75eedee7172bbb.png||height="35" width="349"]]
Leo Wei 1.1 92
93 Set D0 time to 16:30:00 and D10 time to 4:30:0
94
Joey 1.5 95 (% style="text-align:center" %)
Leo Wei 1.1 96 [[image:07-5 Basic instructions_html_c64e0faf2af172f8.png]]
97
Joey 1.5 98 (% style="text-align:center" %)
Leo Wei 1.1 99 [[image:07-5 Basic instructions_html_66e3a2eadeb2ecbb.png]]
100
101 After the coil is turned on, the D20 time is 21:0:0
102
Joey 1.5 103 (% style="text-align:center" %)
Leo Wei 1.1 104 [[image:07-5 Basic instructions_html_a9b235835aa41200.png]]
105
Joey 1.5 106 == **TSUB/The subtraction of clock data** ==
Leo Wei 1.1 107
Joey 1.5 108 **TSUB(P)**
Leo Wei 1.1 109
110 Subtract the time data stored after the device number specified in (s1) and the time data stored after the device number specified in (s2), and store the subtraction result in the device number specified in (d) or later .
111
112 -[TSUB (s1) (s2) (d)]
113
114 **Content, range and data type**
115
116 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
117 |(s1)|The device start number that stores the subtracted time data|-|Signed BIN 16 bit|(((
118 ANY16_ARRAY
119
120 (number of elements: 3)
121 )))
122 |(s2)|The device start number that stores the subtraction operation time (time) data|-|Signed BIN 16 bit|(((
123 ANY16_ARRAY
124
125 (number of elements: 3)
126 )))
127 |(d)|The device start number that stores the time (time) data of the subtraction result|-|Signed BIN 16 bit|(((
128 ANY16_ARRAY
129
130 (number of elements: 3)
131 )))
132
133 **Device used**
134
Joey 1.5 135 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="5" %)**Devices**|(((
136 **Offset modification**
Leo Wei 1.1 137 )))|(((
Joey 1.5 138 **Pulse extension**
Leo Wei 1.1 139 )))
Joey 1.5 140 |**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
141 |(% rowspan="3" %)TSUB|Parameter 1|●|●|●|●|●|●|●
142 |Parameter 2|●|●|●|●|●|●|●
143 |Parameter 3|●|●|●|●|●|●|●
Leo Wei 1.1 144
145 **Features**
146
147 Subtract the time data specified in (s1) and the time data specified in (s2), and store the subtraction result in the device number specified in (d) or later.
148
Joey 1.5 149 (% style="text-align:center" %)
Leo Wei 1.1 150 [[image:07-5 Basic instructions_html_5a93455e4cd8a27.png]]
151
152 **Example**
153
154 When subtracting 10:40:20 and 3:50:10
155
Joey 1.5 156 (% style="text-align:center" %)
Leo Wei 1.1 157 [[image:07-5 Basic instructions_html_2473f03fc493780c.png]]
158
159 When the calculation result time is a negative number, the borrow flag turns on and the data +24 is the calculation result. For example, in the case of subtracting 4:50:32 and 10:42:12, the result is not -6:8:20, but 18:8:20.
160
Joey 1.5 161 (% style="text-align:center" %)
Leo Wei 1.1 162 [[image:07-5 Basic instructions_html_24b998b4c3c4ec73.png]]
163
164 When the calculation result is 0 (0 hour, 0 minute, 0 second), the zero flag turns on.
165
166 Related device are as follows:
167
168 |**Devices**|**Name**|**Content**
169 |SM152|Borrow|It is ON when the result of the TSUB(P) instruction is less than 0:00:00
170 |SM153|Zero|It is ON when the result of the TSUB(P) instruction is at the time of 0:00:00:00
171
Joey 1.5 172 ✎**Note:**
Leo Wei 1.1 173
174 • The devices specified in (s1), (s2), and (d) occupy 3 points respectively. Be careful not to overlap with the device used for machine control.
175
176 • When using the clock data time (hour, minute, second) of the built-in real-time clock of the CPU module, use the TRD(P) instruction to read the value of the special register and assign the word device to each operand.
177
178 **Error code**
179
180 |**Error code**|**Content**
181 |4085H|When reading the specified device range exceeds the corresponding device range
182 |4086H|When writing the specified device range exceeds the corresponding device range
183 |4084H|(((
184 When the values specified in (s1) and (s2) are other than 0 to 23
185
186 When the values specified in (s1)+1, (s2)+1, (s1)+2 and (s2)+2 are other than 0 to 59
187 )))
188
189 **Example**
190
Joey 1.5 191 (% style="text-align:center" %)
192 [[image:07-5 Basic instructions_html_e3a5d4793d3ccd2d.png||height="36" width="372"]]
Leo Wei 1.1 193
194 Set D0 time to 16:30:00 and D10 time to 4:30:0
195
Joey 1.5 196 (% style="text-align:center" %)
Leo Wei 1.1 197 [[image:07-5 Basic instructions_html_c64e0faf2af172f8.png]]
198
Joey 1.5 199 (% style="text-align:center" %)
Leo Wei 1.1 200 [[image:07-5 Basic instructions_html_66e3a2eadeb2ecbb.png]]
201
202 After the coil is turned on, the D20 time is 12:00:00
203
Joey 1.5 204 (% style="text-align:center" %)
Leo Wei 1.1 205 [[image:07-5 Basic instructions_html_8f93ea19ba10652b.png]]
206
Jim 8.1 207 == **TRD/Clock data reading** ==
Leo Wei 1.1 208
209 **TRD(P)**
210
211 Read the clock data of the built-in real-time clock of the CPU module.
212
213 -[TRD (d)]
214
215 **Content, range and data type**
216
217 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
218 |(d)|Read destination and start device number of clock data|-|Signed BIN 16 bit|(((
219 ANY16_ARRAY
220
221 (number of elements: 7)
222 )))
223
224 **Device used**
225
Joey 1.5 226 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="4" %)**Devices**|(((
227 **Offset modification**
Leo Wei 1.1 228 )))|(((
Joey 1.5 229 **Pulse extension**
Leo Wei 1.1 230 )))
Joey 1.5 231 |**T**|**C**|**D**|**R**|**[D]**|**XXP**
232 |TRD|Parameter 1|●|●|●|●|●|●
Leo Wei 1.1 233
234 **Features**
235
236 Read the clock data (SD100 to SD106) of the real-time clock built into the CPU module into (d) to (d)+6 in the following format.
237
Joey 1.2 238 |**Parameter**|**Element**|**Project**|**Clock data**| |**Element**|**Project**
Leo Wei 1.1 239 |(% rowspan="7" %)Special register|SD105|Year (Gregorian)|2000 to 2099|→|(d)|Year (Gregorian)
240 |SD104|Month|1 to 12|→|(d)+1|Month
241 |SD103|Day|1 to 31|→|(d)+2|Day
242 |SD102|Hour|0 to 23|→|(d)+3|Hour
243 |SD101|Minute|0 to 59|→|(d)+4|Minute
244 |SD100|Seconds|0 to 59|→|(d)+5|Seconds
245 |SD106|Week|0 (Sun) to 6 (Sat)|→|(d)+6|Week
246
247 • The related devices are shown below. The clock data of these special registers are updated through END processing.
248
249 |**Devices**|**Content**
250 |SD100|The second data of the clock data is stored in BIN code.
251 |SD101|The sub-data of the clock data is stored in BIN code.
252 |SD102|Time data of clock data is stored in BIN code.
253 |SD103|The daily data of the clock data is stored in BIN code.
254 |SD104|The monthly data of the clock data is stored in BIN code.
255 |SD105|The year data of the clock data is stored in a 4-digit BIN code of the Gregorian calendar.
256 |SD106|The week data of the clock data is stored in BIN code. (0: day, 1: one, ..., 6: six) are stored in BIN code.
257
Joey 1.5 258 ✎**Note:**
Leo Wei 1.1 259
260 • The device specified in (d) occupies 7 points. Be careful not to overlap with the device used for machine control.
261
262 **Error code**
263
264 |**Error code**|**Content**
265 |4086H|When reading the specified device range exceeds the corresponding device range
266
267 **Example**
268
Joey 1.5 269 (% style="text-align:center" %)
270 [[image:07-5 Basic instructions_html_b81c1991fec5b4b1.png||height="68" width="250"]]
Leo Wei 1.1 271
272 After the M0 coil is turned on, the current date and time are read as 2020-2-19 13:10:38 Wednesday
273
Joey 1.5 274 (% style="text-align:center" %)
275 [[image:07-5 Basic instructions_html_fe82ecd18ebfd787.png||height="48" width="602"]]
Leo Wei 1.1 276
Joey 1.5 277 == **TWR/Clock data writing** ==
Leo Wei 1.1 278
Joey 1.6 279 **TWR(P)**
Leo Wei 1.1 280
281 Write the clock data of the built-in real-time clock of the CPU module.
282
283 -[TWR (s)]
284
285 **Content, range and data type**
286
287 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
288 |(s)|Clock data write source, start device number|-|Signed BIN 16 bit|ANY16_ARRAY (number of elements: 7)
289
290 **Device used**
291
Joey 1.6 292 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="4" %)**Devices**|(((
293 **Offset modification**
Leo Wei 1.1 294 )))|(((
Joey 1.6 295 **Pulse extension**
Leo Wei 1.1 296 )))
Joey 1.6 297 |**T**|**C**|**D**|**R**|**[D]**|**XXP**
298 |TWR|Parameter 1|●|●|●|●|●|●
Leo Wei 1.1 299
300 **Features**
301
302 Write the set clock data (s) to (s)+6 to the clock data (SD100 to SD106) of the real-time clock built into the CPU module.
303
Joey 1.2 304 |(% colspan="3" %)**Set data at all times**|(% rowspan="2" %) |(% colspan="2" %)**Special register**
Leo Wei 1.1 305 |**Element**|**Project**|**Clock data**|**Element**|**Project**
306 |(s)|Year (Gregorian)|2000 to 2099 or 0 to 99|→|SD105|Year (Gregorian)
307 |(s)+1|Month|1 to 12|→|SD104|Month
308 |(s)+2|Day|1 to 31|→|SD103|Day
309 |(s)+3|Hour|0 to 23|→|SD102|Hour
310 |(s)+4|Minute|0 to 59|→|SD101|Minute
311 |(s)+5|Seconds|0 to 59|→|SD100|Seconds
312 |(s)+6|Week|0 (Sun) to 6 (Sat)|→|SD106|Week
313
314 • If the TWR(P) instruction is executed, the clock data of the real-time clock is changed immediately. Therefore, the clock data after a few minutes should be transferred to the set clock data (s) to (s)+6 in advance, and the instruction will be executed when the correct time is reached.
315
316 • If the year in (s) is in the range of 0 to 99, it will be automatically treated as 2000 to 2099.
317
318 • When a value indicating an impossible time is set, the clock data will not be updated. Set the correct clock data and write again.
319
320 • The day of the week (SD100) is automatically corrected.
321
322 • The related devices are shown below.
323
324 |**Devices**|**Content**
325 |SD100|The second data of the clock data is stored in BIN code.
326 |SD101|The sub-data of the clock data is stored in BIN code.
327 |SD102|Time data of clock data is stored in BIN code.
328 |SD103|The daily data of the clock data is stored in BIN code.
329 |SD104|The monthly data of the clock data is stored in BIN code.
330 |SD105|The year data of the clock data is stored in a 4-digit BIN code of the Gregorian calendar.
331 |SD106|The week data of the clock data is stored in BIN code. (0: day, 1: one, ..., 6: six) are stored in BIN code.
332
Joey 1.6 333 ✎**Note:**
Leo Wei 1.1 334
335 The device specified in (s) occupies 7 points. Be careful not to overlap with the device used for machine control.
336
337 **Error code**
338
339 |**Error code**|**Content**
340 |4085H|When reading the specified device range exceeds the corresponding device range
341
342 **Example**
343
344 Set D0 date and time to 2020-2-19 12:36:00 in advance
345
Joey 1.6 346 (% style="text-align:center" %)
347 [[image:07-5 Basic instructions_html_994c66d1a4cbd45f.png||height="57" width="305"]]
Leo Wei 1.1 348
349 At the moment when the time 12:36:00 arrives, turn on the M0 coil and write the time.
350
Joey 1.6 351 (% style="text-align:center" %)
352 [[image:07-5 Basic instructions_html_bf3e906ee5265598.png||height="42" width="586"]]
Leo Wei 1.1 353
Joey 1.6 354 == **HTOS/16-bit data conversion of time data (hour, minute, second → second)** ==
Leo Wei 1.1 355
356 **HTOS(P)**
357
358 Convert the time data stored after the device number specified in (s) into seconds and store the conversion result as BIN 16-bit data in the device specified in (d).
359
360 -[HTOS (s) (d)]
361
362 **Content, range and data type**
363
364 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
365 |(s)|The device start number that stores the data of the subtracted time|-|Signed BIN 16 bit|ANY16_ARRAY (number of elements: 3)
366 |(d)|The device start number that stores the converted clock data|-|Signed BIN 16 bit|ANY16
367
368 **Device used**
369
Joey 1.6 370 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|**Offset modification**|(((
371 **Pulse extension**
Leo Wei 1.1 372 )))
Joey 1.6 373 |**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
374 |(% rowspan="2" %)HTOS|Parameter 1|●|●|●|●|●|●|●|●|●|●|●
375 |Parameter 2| |●|●|●|●|●|●|●|●|●|●
Leo Wei 1.1 376
377 **Features**
378
379 Convert the time data stored after the device number specified in (s) into seconds and store the conversion result in the device specified in (d).
380
Joey 1.6 381 (% style="text-align:center" %)
382 [[image:07-5 Basic instructions_html_a84b7741fd5bef2f.png||height="130" width="550"]]
Leo Wei 1.1 383
384 **Example**
385
386 When 4 hours, 29 minutes and 31 seconds are specified in (s)
387
Joey 1.6 388 (% style="text-align:center" %)
389 [[image:07-5 Basic instructions_html_5effb7bc9b8e5cf7.png||height="162" width="550"]]
Leo Wei 1.1 390
391 **Error code**
392
393 |**Error code**|**Content**
394 |4085H|When reading the specified device range exceeds the corresponding device range
395 |4086H|When writing the specified device range exceeds the corresponding device range
396 |4084H|(((
Joey 1.6 397 When the calculation result is not in the range of 0 to 32767
Leo Wei 1.1 398
399 When the value specified in (s) is not in the range of 0 to 9
400
401 When the value specified in (s)+1 and (s)+2 is not in the range of 0 to 59
402 )))
403
404 **Example**
405
Joey 1.6 406 (% style="text-align:center" %)
407 [[image:07-5 Basic instructions_html_e23e38c4ba4c34bb.png||height="43" width="338"]]
Leo Wei 1.1 408
409 D0 time is set to 5:36:53
410
Joey 1.6 411 (% style="text-align:center" %)
Leo Wei 1.1 412 [[image:07-5 Basic instructions_html_2866a121e5ca5713.png]]
413
414 The time of D10 after the M0 coil is turned on is as below.
415
Joey 1.6 416 (% style="text-align:center" %)
Leo Wei 1.1 417 [[image:07-5 Basic instructions_html_1dd6c5de05890797.png]]
418
Joey 1.6 419 == **DHTOS/32-bit data conversion of time data (hour, minute, second → second)** ==
Leo Wei 1.1 420
Joey 1.6 421 **DHTOS(P)**
Leo Wei 1.1 422
423 Convert the time data stored after the device number specified in (s) into seconds and store the conversion result as BIN 32-bit data in the device specified in (d).
424
425 -[DHTOS (s) (d)]
426
427 **Content, range and data type**
428
429 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
430 |(s)|The device start number that stores the data of the subtracted time|-|Signed BIN 16 bit|ANY16_ARRAY (number of elements: 3)
431 |(d)|The device start number that stores the converted clock data|-|Signed BIN 32 bit|ANY32
432
433 **Device used**
434
Joey 1.6 435 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|(((
436 **Offset modification**
Leo Wei 1.1 437 )))|(((
Joey 1.6 438 **Pulse extension**
Leo Wei 1.1 439 )))
Joey 1.6 440 |**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
441 |(% rowspan="2" %)DHTOS|Parameter 1|●|●|●|●|●|●|●|●|●|●|●
442 |Parameter 2| |●|●|●|●|●|●|●|●|●|●
Leo Wei 1.1 443
444 **Features**
445
446 Convert the time data stored after the device number specified in (s) into seconds and store the conversion result in the device specified in (d).
447
Joey 1.6 448 (% style="text-align:center" %)
449 [[image:07-5 Basic instructions_html_f4be08508575ea01.png||height="99" width="550"]]
Leo Wei 1.1 450
451 **Example**
452
453 When 35 hours, 10 minutes and 58 seconds are specified in (s)
454
Joey 1.6 455 (% style="text-align:center" %)
456 [[image:07-5 Basic instructions_html_5b9ad230ed5e1fd0.png||height="125" width="550"]]
Leo Wei 1.1 457
458 **Error code**
459
460 |**Error code**|**Content**
461 |4085H|When reading the specified device range exceeds the corresponding device range
462 |4086H|When writing the specified device range exceeds the corresponding device range
463 |4084H|(((
464 When the calculation result is not in the range of 0 to 32767
465
466 When the value specified in (s)+1 and (s)+2 is not in the range of 0 to 59
467 )))
468
469 **Example**
470
Joey 1.6 471 (% style="text-align:center" %)
472 [[image:07-5 Basic instructions_html_ae8ab4379e8bdb91.png||height="45" width="263"]]
Leo Wei 1.1 473
474 D0 time is set to 15:33:24
475
Joey 1.6 476 (% style="text-align:center" %)
477 [[image:07-5 Basic instructions_html_57a15d9e1045e93e.png||height="41" width="313"]]
Leo Wei 1.1 478
479 The second of D10 after the M0 coil is turned on is
480
Joey 1.6 481 (% style="text-align:center" %)
482 [[image:07-5 Basic instructions_html_194e906b1dc12078.png||height="64" width="365"]]
Leo Wei 1.1 483
Joey 1.6 484 **HOUR/Hour measuring 16-bit**
Leo Wei 1.1 485
486 **HOUR(P)**
487
488 The time for the input contact to be ON is measured in units of one hour.C
489
490 -[HOUR (s) (d1) (d2)]
491
492 **Content, range and data type**
493
494 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
495 |(s)|(((
496 The time when the alarm (d2) is turned ON
497
498 (set by one hour)
499 )))|K0 to K32767|Signed BIN 16 bit|ANY16
500 |(d1)|Device that stores the current value of measurement (specified data register for power failure retention)|-|Unsigned BIN 16 bit|(((
501 ANY16_ARRAY
502
503 (Number of elements: 2)
504 )))
505 |(d2)|Device that turns ON when the time limit expires (alarm output)|-|Bit|ANY_BOOL
506
507 **Device used**
508
Joey 1.6 509 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="17" %)**Devices**|(((
510 **Offset modification**
Leo Wei 1.1 511 )))|(((
Joey 1.6 512 **Pulse extension**
Leo Wei 1.1 513 )))
Joey 1.6 514 |**Y**|**M**|**S**|**SM**|**D.b**|**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**K**|**H**|**E**|**[D]**|**XXP**
515 |(% rowspan="3" %)HOUR|Parameter 1| | | | | |●|●|●|●|●|●|●|●|●|●|●| |●|●
516 |Parameter 2| | | | | | | | | | | |●|●|●| | | |●|●
517 |Parameter 3|●|●|●|●|●| | | | | | | | | | | | |●|●
Leo Wei 1.1 518
519 **Features**
520
521 The input contact ON time is measured in units of 1 hour. When the cumulative ON time exceeds the time (BIN 16-bit data) specified in (s), the device specified in (d2) is turned on .
522
523 • In (s), set the time until the alarm (d2) turns ON in units of 1 hour.
524
525 • (d1) stores the current measured value in units of 1 hour.
526
527 • If the median value of (d1) exceeds 32767, it will be modified to 32767.
528
529 • (d1)+1 stores the current measured value (in units of 1 second) that is less than 1 hour.
530
531 • (d2) turns on when the current value (d1) exceeds the time specified in (s).
532
533 • In order to continue to use the current value data even after the power of the CPU module is turned off, specify the data register for power failure retention to (d1). If you use general-purpose data registers, the current value data will be cleared by powering off the CPU module and STOP→RUN operations.
534
535 • After the alarm output specified in (d2) turns ON, measurement will continue.
536
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
Joey 1.7 539 ✎**Note:**
Leo Wei 1.1 540
541 • The device specified in (d1) occupies 2 points. Be careful not to overlap with the device used for machine control.
542
543 • After the instruction stops running, the measurement stops and the output continues to be maintained.
544
545 **Error code**
546
547 |**Error code**|**Content**
548 |4085H|When reading the specified device range exceeds the corresponding device range
549 |4086H|When writing the specified device range exceeds the corresponding device range
550 |4084H|When the value of (s) is negative
551
552 **Example**
553
Joey 1.7 554 (% style="text-align:center" %)
555 [[image:07-5 Basic instructions_html_7570f8c392470a9f.png||height="45" width="320"]]
Leo Wei 1.1 556
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
Joey 1.7 559 == **DHOUR/Hour measuring 32 bits** ==
Leo Wei 1.1 560
561 **DHOUR(P)**
562
563 The time for the input contact to be ON is measured in units of one hour.
564
565 -[DHOUR (s) (d1) (d2)]
566
567 **Content, range and data type**
568
569 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
570 |(s)|(((
Joey 1.7 571 The time when the alarm (d2) is turned ON (set by one hour)
Leo Wei 1.1 572 )))|0 to 2147483647|Signed BIN 32 bit|ANY32
573 |(d1)|Device that stores the current value of measurement (specified data register for power failure retention)|-|Unsigned BIN 32 bit|(((
574 ANY32_ARRAY
575
576 (Number of elements: 2)
577 )))
578 |(d2)|Device that turns ON when the time limit expires (alarm output)|-|Bit|ANY_BOOL
579
580 **Device used**
581
Joey 1.7 582 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="18" %)**Devices**|(((
583 **Offset modification**
Leo Wei 1.1 584 )))|(((
Joey 1.7 585 **Pulse extension**
Leo Wei 1.1 586 )))
Joey 1.7 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|●|●|●|●|●| | | | | | | | | | | | | |●|●
Leo Wei 1.1 591
592 **Features**
593
594 • The input contact ON time is measured in units of 1 hour. When the cumulative ON time exceeds the time (BIN 32-bit data) specified in (s), the device specified in (d2) is set to ON.
595
596 • In (s)+1, (s), set the time until the alarm (d2) turns ON in units of 1 hour.
597
598 • (D1)+1 and (d1) store the current value measured in units of 1 hour. ((d1)+1: high bit, (d1): low bit)
599
600 • If the median of (d1)+1 and (d1) exceeds 2147483647, it will be modified to 2147483647.
601
602 • (D1)+2 stores the current value (in units of 1 second) of the measurement that is less than 1 hour.
603
604 • (D2) turns on when the current value (d1)+1, (d1) exceeds the time specified in (s).
605
606 • In order to continue to use the current value data even after the power of the CPU module is turned off, specify the data register for power failure retention to (d1). If you use general-purpose data registers, the current value data will be cleared by powering off the CPU module and STOP→RUN operations.
607
608 • After the alarm output specified in (d2) turns on, the measurement will continue.
609
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
Joey 1.7 612 ✎**Note:**
Leo Wei 1.1 613
614 • The device specified in (d1) occupies 3 points. Be careful not to overlap with the device used for machine control.
615
616 • After the instruction stops running, the measurement stops and the output continues to be maintained.
617
618 **Error code**
619
620 |**Error code**|**Content**
621 |4085H|When reading the specified device range exceeds the corresponding device range
622 |4086H|When writing the specified device range exceeds the corresponding device range
623 |4084H|When the value of (s) is negative
624
625 **Example**
626
Joey 1.7 627 (% style="text-align:center" %)
628 [[image:07-5 Basic instructions_html_3f1ef5ecc835de30.png||height="43" width="448"]]
Leo Wei 1.1 629
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
Joey 1.7 632 == **STOH/16-bit data conversion of time data (second → hour, minute, second)** ==
Leo Wei 1.1 633
Joey 1.7 634 **STOH(P)**
Leo Wei 1.1 635
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
638 -[STOH (s) (d)]
639
640 **Content, range and data type**
641
642 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
Joey 1.7 643 |(s)|The device start number that stores the clock data before conversion|0 to 32767|Signed BIN 16 bit|ANY16
Leo Wei 1.1 644 |(d)|The device start number that stores the converted clock data|-|Signed BIN 16 bit|(((
Joey 1.7 645 ANY16_ARRAY (number of elements: 3)
Leo Wei 1.1 646 )))
647
648 **Device used**
649
Joey 1.7 650 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|(((
651 **Offset modification**
Leo Wei 1.1 652 )))|(((
Joey 1.7 653 **Pulse extension**
Leo Wei 1.1 654 )))
Joey 1.7 655 |**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
656 |(% rowspan="2" %)STOH|Parameter 1|●|●|●|●|●|●|●|●|●|●|●
657 |Parameter 2| |●|●|●|●|●|●|●|●|●|●
Leo Wei 1.1 658
659 **Features**
660
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
Joey 1.7 663 (% style="text-align:center" %)
664 [[image:07-5 Basic instructions_html_1f5f3f1d80af2a34.png||height="110" width="550"]]
Leo Wei 1.1 665
666 **Example**
667
668 When 29,011 seconds are specified in (s)
669
Joey 1.7 670 (% style="text-align:center" %)
671 [[image:07-5 Basic instructions_html_682516cbf773f515.png||height="163" width="550"]]
Leo Wei 1.1 672
673 **Error code**
674
675 |**Error code**|**Content**
676 |4085H|When reading the specified device range exceeds the corresponding device range
677 |4086H|When writing the specified device range exceeds the corresponding device range
678 |4084H|When the value of (s) exceeds the range
679
680 **Example**
681
Joey 1.7 682 (% style="text-align:center" %)
683 [[image:07-5 Basic instructions_html_e783349d57adf7d2.png||height="47" width="350"]]
Leo Wei 1.1 684
685 Set D0 seconds to 12537
686
687 The hour, minute and second of D10 after the M0 coil is turned on are
688
Joey 1.7 689 (% style="text-align:center" %)
690 [[image:07-5 Basic instructions_html_d3c33949e8684891.png||height="52" width="645"]]
Leo Wei 1.1 691
Joey 1.7 692 == **DSTOH/32-bit data conversion of time data (second → hour, minute, second)** ==
Leo Wei 1.1 693
Joey 1.7 694 **DSTOH(P)**
Leo Wei 1.1 695
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
698 -[DSTOH (s) (d)]
699
700 **Content, range and data type**
701
702 |**Parameter**|**Content**|**Range**|**Data type**|**Data     type (label)**
703 |(s)|The device start number that stores the clock data before conversion|0 to 117964799|Signed BIN 32 bit|ANY32
704 |(d)|The device start number that stores the converted clock data|-|Signed BIN 16 bit|(((
Joey 1.7 705 ANY16_ARRAY (number of elements: 3)
Leo Wei 1.1 706 )))
707
708 **Device used**
709
Joey 1.7 710 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="9" %)**Devices**|(((
711 **Offset modification**
Leo Wei 1.1 712 )))|(((
Joey 1.7 713 **Pulse extension**
Leo Wei 1.1 714 )))
Joey 1.7 715 |**KnX**|**KnY**|**KnM**|**KnS**|**T**|**C**|**D**|**R**|**SD**|**[D]**|**XXP**
716 |(% rowspan="2" %)DSTOH|Parameter 1|●|●|●|●|●|●|●|●|●|●|●
717 |Parameter 2| |●|●|●|●|●|●|●|●|●|●
Leo Wei 1.1 718
719 **Features**
720
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
Joey 1.7 723 (% style="text-align:center" %)
724 [[image:07-5 Basic instructions_html_cbf13fc3d10fbe61.png||height="99" width="600"]]
Leo Wei 1.1 725
726 **Example**
727
728 When 45,325 seconds is specified in (s)
729
Joey 1.7 730 (% style="text-align:center" %)
731 [[image:07-5 Basic instructions_html_d6045506b13275a0.png||height="135" width="600"]]
Leo Wei 1.1 732
733 **Error code**
734
735 |**Error code**|**Content**
736 |4085H|When reading the specified device range exceeds the corresponding device range
737 |4086H|When writing the specified device range exceeds the corresponding device range
738 |4084H|When the value of (s) exceeds the range
739
740 **Example**
741
Joey 1.7 742 (% style="text-align:center" %)
743 [[image:07-5 Basic instructions_html_e7dd49d953db6da4.png||height="39" width="316"]]
Leo Wei 1.1 744
745 Set D0 seconds to 2152537
746
747 The hour, minute and second of D10 after the M0 coil is turned on are
748
Joey 1.7 749 (% style="text-align:center" %)
750 [[image:07-5 Basic instructions_html_10d57bde1ac0a218.png||height="52" width="661"]]
Leo Wei 1.1 751
Joey 1.7 752 == **TCMP/Clock data comparison** ==
Leo Wei 1.1 753
754 **TCMP(P)**
755
756 Compare the comparison time specified in (s1), (s2), (s3) with the time data specified in (s4), and turn the bit device specified in (d) ON/OFF according to their size match.
757
758 -[TCMP (s1) (s2) (s3) (s4) (d)]
759
760 **Content, range and data type**
761
762 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
763 |(s1)|Specify the "hour" of the comparison base time.|0 to 23|Signed BIN 16 bit|ANY16
764 |(s2)|Specify the "minute" of the comparison base time.|0 to 59|Signed BIN 16 bit|ANY16
765 |(s3)|Specify the "second" of the comparison base time.|0 to 59|Signed BIN 16 bit|ANY16
766 |(s4)|Specify the "hour" of the time data (hour, minute, second).|-|Signed BIN 16 bit|ANY16_ARRAY
767 |(d)|The bit device is turned ON/OFF according to the comparison result.|-|Bit|ANYBIT_ARRAY
768
769 **Device used**
770
Joey 1.7 771 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="17" %)**Devices**|(((
772 **Offset modification**
Leo Wei 1.1 773 )))|(((
Joey 1.7 774 **Pulse extension**
Leo Wei 1.1 775 )))
Joey 1.7 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|●|●|●|●|●| | | | | | | | | | | | |●|●
Leo Wei 1.1 782
783 **Features**
784
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
Joey 1.8 787 (% style="text-align:center" %)
788 [[image:07-5 Basic instructions_html_5df7ad3057fada12.png||height="385" width="750"]]
Leo Wei 1.1 789
Joey 1.8 790 ✎**Note:**
Leo Wei 1.1 791
792 The device specified in (s4) and (d) occupies 3 points. Be careful not to overlap with the device used for machine control.
793
794 When using the clock data time (hour, minute, second) of the built-in real-time clock of the CPU module, use the TRD(P) instruction to read the value of the special register and assign the word device to each operand.
795
796 **Error code**
797
798 |**Error code**|**Content**
799 |4085H|When reading the specified device range exceeds the corresponding device range
800 |4086H|When writing the specified device range exceeds the corresponding device range
801 |4084H|(((
802 When the value specified in (s) and (s4) is not in the range of 0 to 23
803
Joey 1.8 804 When the value specified in (s2),(s3) (s4)+1 and (s4)+2 is not in the range of 0 to 59
Leo Wei 1.1 805 )))
806
807 **Example**
808
Joey 1.8 809 (% style="text-align:center" %)
810 [[image:07-5 Basic instructions_html_fcc16317cf7c0700.png||height="68" width="359"]]
Leo Wei 1.1 811
812 Set D10 to 1, D11 to 30, D12 to 0
813
814 When M0 is turned on, the time that D23 will come is 0:31:27
815
Joey 1.8 816 (% style="text-align:center" %)
817 [[image:07-5 Basic instructions_html_de97dd7a612b2323.png||height="50" width="653"]]
Leo Wei 1.1 818
819 M10 is turned ON
820
Joey 1.8 821 (% style="text-align:center" %)
822 [[image:07-5 Basic instructions_html_56e2d606adc09fd.png||height="52" width="239"]]
Leo Wei 1.1 823
Joey 1.8 824 == **TZCP/Clock data bandwidth comparison** ==
Leo Wei 1.1 825
Joey 1.8 826 **TZCP(P)**
Leo Wei 1.1 827
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
830 -[TZCP (s1) (s2) (s3) (d)]
831
832 **Content, range and data type**
833
834 |**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)**
835 |(s1)|Specify the "hour" of the lower limit time (hour, minute, second)|-|Signed BIN 16 bit|(((
Joey 1.8 836 ANY16_ARRAY (number of elements: 3)
Leo Wei 1.1 837 )))
838 |(s2)|Specify the "hour" of the lower limit time (hour, minute, second)|-|Signed BIN 16 bit|(((
Joey 1.8 839 ANY16_ARRAY (number of elements: 3)
Leo Wei 1.1 840 )))
841 |(s3)|Specify "hour" of time data (hour, minute, second)|-|Signed BIN 16 bit|(((
Joey 1.8 842 ANY16_ARRAY (number of elements: 3)
Leo Wei 1.1 843 )))
844 |(d)|The bit device is turned ON/OFF according to the comparison result.|-|Bit|(((
Joey 1.8 845 ANY16_ARRAY (number of elements: 3)
Leo Wei 1.1 846 )))
847
848 **Device used**
849
Joey 1.8 850 |(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="10" %)**Devices**|**Offset modification**|(((
851 **Pulse extension**
Leo Wei 1.1 852 )))
Joey 1.8 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|●|●|●|●|●| | | | | |●|●
Leo Wei 1.1 858
859 **Features**
860
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
Joey 1.8 863 (% style="text-align:center" %)
864 [[image:07-5 Basic instructions_html_844291270080313d.png||height="339" width="750"]]
Leo Wei 1.1 865
Joey 1.8 866 ✎**Note:**
Leo Wei 1.1 867
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
870 • When using the clock data time (hour, minute, second) of the built-in real-time clock of the CPU module, use the TRD(P) instruction to read the value of the special register and assign the word device to each operand.
871
872 • When (s1)> (s2), two of (d), (d)+1, (d)+2 are ON/OFF.
873
874 **Error code**
875
876 |**Error code**|**Content**
877 |4085H|When reading the specified device range exceeds the corresponding device range
878 |4086H|When writing the specified device range exceeds the corresponding device range
879 |4084H|(((
880 When the value specified in (s1), (s2) and (s3) is not in the range of 0 to 23
881
882 When the value specified in (s1)+1, (s2)+1, (s3)+1, (s1)+2, (s2)+2 and (s3)+2 is not in the range of 0 to 59
883 )))
884
885 **Example**
886
Joey 1.8 887 (% style="text-align:center" %)
888 [[image:07-5 Basic instructions_html_30027a2387c26c2e.png||height="46" width="439"]]
Leo Wei 1.1 889
890 Set D0 time to 16:30:00 and D10 time to 4:30:0
891
Joey 1.8 892 (% style="text-align:center" %)
893 [[image:07-5 Basic instructions_html_c64e0faf2af172f8.png||height="49" width="626"]]
Leo Wei 1.1 894
Joey 1.8 895 (% style="text-align:center" %)
896 [[image:07-5 Basic instructions_html_66e3a2eadeb2ecbb.png||height="50" width="625"]]
Leo Wei 1.1 897
898 After the coil is turned on, the reading time to D20 time is 8:30:00
899
Joey 1.8 900 (% style="text-align:center" %)
901 [[image:07-5 Basic instructions_html_75c44dad07eaf80a.png||height="49" width="625"]]
Leo Wei 1.1 902
903 M0/M12 is ON
904
Joey 1.8 905 (% style="text-align:center" %)
906 [[image:07-5 Basic instructions_html_f512f36261705953.png||height="48" width="218"]]
Bob 11.1 907
908
Bob 12.1 909 == **TON/BIN 16-bit Turn-on delay timer** ==
Bob 11.1 910
Bob 12.1 911 **TON(P)**
Bob 11.1 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).
914
915 PLC Editor2 version that supports this instruction: 2.3.1 and above.
916
917 -[TON (s1) (s2) (s3)]
918
919 **Content, scope, data type**
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
925
926 **Device used**
927
928 |(% rowspan="2" %)**instruction**|(% rowspan="2" %)**parameter**|(% colspan="24" %)**Devices**|**Offset modification**|**Pulse extension**
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| | | | | | | | | | | | | | | | | | | | | |●|●| | |
933
934 **Timing Chart**
935
Bob 15.1 936 [[image:企业微信截图_16691725418532.png]]
Bob 11.1 937
Jim 13.1 938 **Features**
939
Bob 11.1 940 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".
941
942 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.
943
944
945 |**S3 time base**|**Actual value**
946 |1|100us
947 |10|1ms
948 |100|10ms
949 |1000|100ms
950 |10000|1s
951
952 **Precautions**
953
954 • 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).
955
956 **Error code**
957
958 |**Error code**|**Content**
959 |4084H|Input data in (s2) (s3) is outside the specified range.
960 |4085H|Device tpye in (s1) (s2) (s3) is outside the specified range.
961 |4086H|Device tpye in (s1) is outside the specified range.
962
Bob 12.1 963 **Example**
Bob 11.1 964
Bob 15.1 965 [[image:企业微信截图_16691729278938.png]]
Bob 11.1 966
967 T1 is used for storing time, setting the expected time as K10 and the time base as K10000.
968
969 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.
970
971 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.