Changes for page 06 Basic instructions
Last modified by Iris on 2025/10/20 11:22
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -4086,6 +4086,9 @@ 4086 4086 4087 4087 4088 4088 4089 + 4090 + 4091 + 4089 4089 **Error code** 4090 4090 4091 4091 |=**Error code**|=**Content** ... ... @@ -6100,9 +6100,9 @@ 6100 6100 6101 6101 Example 1 6102 6102 6103 -= =**External IO instructions** ==6106 += **External IO instructions** = 6104 6104 6105 -== =[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps2.png]]**ARWS/Arrow Switch** ===6108 +== **ARWS/Arrow Switch** == 6106 6106 6107 6107 **ARWS** 6108 6108 ... ... @@ -6139,29 +6139,31 @@ 6139 6139 6140 6140 16-bit operation (ARWS). The 16-bit BIN value from 0 to 9999 is stored in D+1. For the sake of convenience, the following description is displayed in BCD conversion. 6141 6141 6142 -When the instruction input is ON, the ARWS instruction will operate as shown below 6145 +When the instruction input is ON, the ARWS instruction will operate as shown below[[image:1758526599000-920.png]] 6143 6143 6144 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps3.png]][[image:1758526599000-920.png]] 6145 - 6146 6146 Display and operation part of the content 6147 6147 6148 -[[image: file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps4.png]][[image:1758526656501-227.png]]6149 +[[image:1758552469974-996.png]] 6149 6149 6150 -1. The digit specification of n displayed by the 7-segment digital tube with BCD code 6151 6151 6152 +(1) The digit specification of n displayed by the 7-segment digital tube with BCD code 6153 + 6152 6152 A 4-digit (10^^3^^ digit) is used as an example in the following operation description, . 6153 6153 6154 - 1.The action of the digit selection switch (S+2, S+3)6156 +(2) The action of the digit selection switch (S+2, S+3) 6155 6155 6156 -1. The action when input S+2 with reduced digits is ON.Each time the switch is pressed, the number of digits specification is changed according to 10^^3^^ →10^^2^^ →10^^1^^ →10^^0^^ →10^^3.^^ 6157 -1. The action when the input S+3 with increased digits is ON. Each time the switch is pressed, the number of digits specification is changed according to 10^^3 ^^→ 10^^0 ^^→ 10^^1 ^^→ 10^^2 ^^→ 10^^3^^. 6158 + 1)The action when input S+2 with reduced digits is ON.Each time the switch is pressed, the number of digits specification is changed according to 10^^3^^ →10^^2^^ →10^^1^^ →10^^0^^ →10^^3.^^ 6158 6158 6159 -1. The action of the LED for displaying the selected digits (D2+4 to D2+7). The specified number of digits can be displayed by LED by strobe signal D2+4 to D2+7. 6160 -1. The operation of the data change switch in units of digits (S, S+1). The data is changed for the number of digits specified by the "digit selection switch" above. 6160 + 2)The action when the input S+3 with increased digits is ON. Each time the switch is pressed, the number of digits specification is changed according to 10^^3 ^^→ 10^^0 ^^→ 10^^1 ^^→ 10^^2 ^^→ 10^^3^^. 6161 6161 6162 -1. Increase the action when the input is ON. Each time the switch is pressed, the content of D1 changes according to 0→1→2→...→8→9→0→1. 6163 -1. Reduce the action when the input is ON. Each time the switch is pressed, the content of D1 changes according to 0→9→8→7...1→0→9. 6162 +(3) The action of the LED for displaying the selected digits (D2+4 to D2+7). The specified number of digits can be displayed by LED by strobe signal D2+4 to D2+7. 6164 6164 6164 +(4) The operation of the data change switch in units of digits (S, S+1). The data is changed for the number of digits specified by the "digit selection switch" above. 6165 + 6166 + 1) Increase the action when the input is ON. Each time the switch is pressed, the content of D1 changes according to 0→1→2→...→8→9→0→1. 6167 + 6168 + 2) Reduce the action when the input is ON. Each time the switch is pressed, the content of D1 changes according to 0→9→8→7...1→0→9. 6169 + 6165 6165 These contents can be displayed in the 7-segment digital tube display. 6166 6166 6167 6167 As shown above, through a series of operations, you can write the target value into D1 while viewing the 7-segment display. ... ... @@ -6170,7 +6170,7 @@ 6170 6170 6171 6171 * The setting of parameter n 6172 6172 6173 -Please refer to the parameter setting of SEGL (FNC 74) instruction. The setting range is 0 to 3. 6178 +Please refer to the parameter setting of SEGL (FNC 74) instruction. The setting range is 0 to 3. 6174 6174 6175 6175 * The output format of the programmable controller, please use a transistor output type programmable controller. 6176 6176 * About scan time (operation cycle) and display timing ... ... @@ -6195,14 +6195,904 @@ 6195 6195 6196 6196 **Example** 6197 6197 6198 -[[image: file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps5.jpg]]6203 +[[image:1758552725118-406.png]] 6199 6199 6205 + 6200 6200 The corresponding hardware wiring is shown in the figure below, and the PLC should be transistor output type: 6201 6201 6202 -[[image: file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml3320\wps6.jpg]]6208 +[[image:1758552774857-894.png]] 6203 6203 6210 + 6204 6204 (1) The digital tube in the figure shows the value of D0. Press X10 to X13 to modify the value. The value of D0 can only be between 0 and 9999. 6205 6205 6206 6206 (2) When X20 is ON, the cursor position is thousands. Each time the back key (X12) is pressed, the specified position is switched in the order of "thousands → hundred → ten → pieces → thousand"; if the forward key (X13) is pressed, the switching sequence is reversed; the cursor position is determined by the strobe pulse signal (YO04 to YOO7) LED indication of connection. 6207 6207 6208 6208 (3) For the cursor position, each time you press the increment key (X11), the content of the position changes by 0 → 1→ 2→……8→9→0→1, and when you press the decrement key (X10), press 0 →9→8→7→…… 1→0→9 changes, the modified value takes effect immediately. 6216 + 6217 += [[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps1.png]]**DSW/Numeric key input** = 6218 + 6219 +**DSW** 6220 + 6221 +This instruction is to read the state of the matrix type setting switch, with 4 BCD setting switches as a group, and store the setting value in the specified unit after reading it. Up to 2 groups of setting switches can be read. 6222 + 6223 +-[DSW (s) (d1) (d2) (n)] 6224 + 6225 +**Content, range and data type** 6226 + 6227 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6228 +|(s)|The start device (X) number connected to the digital switch (occupies 4 points)|-|Bit|ANY_BOOL 6229 +|(d1)|((( 6230 +The start device (Y) number that strobe signal outputed 6231 + 6232 +(occupies 4 points) 6233 +)))|-|Bit|ANY_BOOL 6234 +|(d2)|The device number that stores the value of the digital switch (occupies n points)|0 to 9999|Signed BIN16|ANY16_S 6235 +|(n)|Number of groups of digital switches (4 digits a group) (n=1 or 2)|1 to 2|Signed BIN16|ANY16_S 6236 + 6237 +**Device used** 6238 + 6239 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6240 +**Index** 6241 + 6242 +**modification** 6243 +)))|((( 6244 +**Pulse** 6245 + 6246 +**extension** 6247 +))) 6248 +|**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** 6249 +|(% rowspan="4" %)DSW|Parameter 1|●| | | | | | | | | | | | | | | | | | | | | | | |●| 6250 +|Parameter 2| |●| | | | | | | | | | | | | | | | | | | | | | |●| 6251 +|Parameter 3| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●| 6252 +|Parameter 4| | | | | | | | | | | | | | | | | | | | | |●|●| | | 6253 + 6254 +**Features** 6255 + 6256 +This instruction is to read the state of the matrix type setting switch, with 4 BCD setting switches as a group, and store the setting value in the specified unit after reading it. Up to 2 groups of setting switches can be read. 6257 + 6258 +(1) About the input value (d1) 6259 + 6260 +4 digits from 0 to 9,999 could be read. 6261 + 6262 +Data is saved in BIN (binary number) value. 6263 + 6264 +The first group is saved in (d2), and the second group is saved in (d2)+1. 6265 + 6266 +(2) Specification of the number of groups n 6267 + 6268 +* When using 4 digits/1 group×1 [n=K1] pass the strobe signal 6269 + 6270 +From (s) to [(s)+3], sequentially read the BCD 4-digit digital switches connected in (d1) to [(d1)+3], and save the value as BIN value in (d2). 6271 + 6272 +* When using 4 digits/1 group×2 [n=K2] pass the strobe signal 6273 + 6274 +From (s) to [(s)+3], sequentially read the BCD 4-digit digital switches connected in (d1) to [(d1)+3], and save the value as BIN value in (d2). 6275 + 6276 +Through the strobe signal (d1) to [(d1)+3], read the BCD 4-digit digital switch connected in (s)+4 to [(s)+7] in turn, and save its value as a BIN value To (d2)+1. 6277 + 6278 +**✎Note: ** 6279 + 6280 +(1) When the instruction contact is OFF 6281 + 6282 +Even if it is OFF, the content of (d2) does not change, but from (d1) to [(d1)+3] all become OFF. 6283 + 6284 +(2) Occupied points of the device 6285 + 6286 + 1) When using 4 digits 2 groups (n=K2), 2 points starting from (d2) are occupied. 6287 + 6288 + 2) When it is 4 digits and 1 group (s), 4 points are occupied, and when it is 4 digits and 2 groups, 8 points are occupied. 6289 + 6290 +(3) When connecting a digital switch with less than 4 digits 6291 + 6292 + For unused digits, the strobe signal <output for specified digits> (d1) does not need to be wired, but even if there are unused digits, its output is already occupied by this instruction, so it cannot be used for other purposes. Be sure to leave unused output empty. 6293 + 6294 +(4) It is recommended to use transistor output type 6295 + 6296 + In order to read the value of the digital switch continuously, be sure to use a transistor output type programmable controller. 6297 + 6298 +(5) About digital switches 6299 + 6300 + Please use a digital switch of BCD output type. 6301 + 6302 +(6) About the read timing of keyboard input 6303 + 6304 + In order to prevent reading omissions caused by the filter delay of keyboard input, please use the “Constant Scan Mode” and “Timer Interrupt” functions flexibly. 6305 + 6306 +(7) The limit number of instructions 6307 + 6308 +A maximum of two can be used at the same time 6309 + 6310 +**Related device** 6311 + 6312 +|**Devices**|**Name**|**Content** 6313 +|SM229|End of instruction execution|After a reading cycle is over, SM229 will be set for a scan cycle 6314 + 6315 +**Error code** 6316 + 6317 +|**Error code**|**Content** 6318 +|4084H|The data input in the application instruction (n) and (d2) exceeds the specified range 6319 +|4085H|The output result of the read application instruction (s) and (d2) exceeds the device range 6320 +|4086H|The output result of the write application instruction (d1) and (d2) exceeds the device range 6321 +|4089H|The number of application instructions exceeds the limit 6322 + 6323 +**Example** 6324 + 6325 +Program 6326 + 6327 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps2.jpg]][[image:1758553361414-300.png]] 6328 + 6329 +Wiring diagram 6330 + 6331 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps3.jpg]][[image:1758553386520-904.png]] 6332 + 6333 +* DSW operates while M1 (digital switch read input) is ON. 6334 + 6335 + DSW will operate until the end of one cycle of operation and the instruction execution end flag (SM229) turns ON. 6336 + 6337 += **HKY/Hexadecimal Numeric Key Input** = 6338 + 6339 +**HKY** 6340 + 6341 +Use the keyboard (16 keys) of 0 to F to input, set the numerical value (0 to 9) and operating conditions (A to F function keys) and other instructions for data input. 6342 + 6343 +When the extended function is ON, the hexadecimal number of the 0 to F keys could be used for keyboard input. 6344 + 6345 +-[HKY (s) (d1) (d2) (d3)] 6346 + 6347 +**Content, range and data type** 6348 + 6349 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6350 +|(s)|The start bit device (X) number that input 16-key (occupies 4 points)|-|Bit|ANY_BOOL 6351 +|(d1)|The start device (Y) number that outputs (occupies 4 points)|-|Bit|ANY_BOOL 6352 +|(d2)|The device number that stores the value input from the 16 keys|0 to 9999|BIN16 bit|ANY16_S 6353 +|(d3)|The start bit device number whose key is ON (occupies 8 points)|-|BIN16 bit|ANY16_S 6354 + 6355 +**Device used** 6356 + 6357 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6358 +**Index** 6359 + 6360 +**modification** 6361 +)))|((( 6362 +**Pulse** 6363 + 6364 +**extension** 6365 +))) 6366 +|**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** 6367 +|(% rowspan="4" %)HKY|Parameter 1|●| | | | | | | | | | | | | | | | | | | | | | | |●| 6368 +|Parameter 2| |●| | | | | | | | | | | | | | | | | | | | | | |●| 6369 +|Parameter 3| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●| 6370 +|Parameter 4| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●| 6371 + 6372 +**Features** 6373 + 6374 +16-bit operation (HKY) 6375 + 6376 +Scan the input [S to S+3] and column output [D1 to D1+3] signals connected with 16 keys (0 to F), press the 0 to 9 keys, the value will be saved in D2, and the keyboard detection will be output to D3 +7 in. 6377 + 6378 +In addition, after pressing the A to F keys, the key information corresponding to the keyboard [D3 to D3+5] is ON, and the keyboard detection is output to D3+6. 6379 + 6380 +1. About using the keys 0 to 9 to input the values D3, D3+7 6381 + 6382 +If it is more than 9,999, overflow from the high digit. The entered value is stored in D2 as BIN (binary number). 6383 + 6384 +When any key from 0 to 9 is pressed, the keyboard detection output D3+7 is ON. 6385 + 6386 +1. Information about A to F keys D3 to D3+6 6387 + 6388 +Corresponding to the A to F keys, the first 6 o'clock of D3 is ON. When any key from A to F is pressed, the keyboard detection output D3+6 is ON. 6389 + 6390 +|**Keyboard**|**Key information** 6391 +|A|D3 6392 +|B|D3+1 6393 +|C|D3+2 6394 +|D|D3+3 6395 +|E|D3+4 6396 +|F|D3+5 6397 + 6398 +**Extensions** 6399 + 6400 +After SM167 is ON and the extended function becomes valid, the data of the hexadecimal keys from 0 to F is saved in BIN mode. 6401 + 6402 +Except for the following, it is the same as the above-mentioned [Function and Operation Description]. 6403 + 6404 +The hexadecimal data input using the 0 to F keys is written into D2 as it is. 6405 + 6406 +1. Regarding the numerical input using the 0 to F keys D2 6407 + 6408 +When it is FFFF or more, overflow from the upper digits. 6409 + 6410 +For example, when inputting 1→2→3→B→F, “23BF" is saved in D2 in BIN mode. When F is input, 1 overflows. 6411 + 6412 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps5.jpg]] 6413 + 6414 +**✎Note** 6415 + 6416 +* Restrictions on the number of uses of instructions 6417 + 6418 +HKY instructions, only one of them can be used in the program. 6419 + 6420 +* When the keyboard is pressed simultaneously 6421 + 6422 +When multiple keys are pressed at the same time, the key pressed first is effective. 6423 + 6424 +* When the instruction contact is OFF 6425 + 6426 +Even if it is OFF, the content of D2 does not change, but D3 to D3 +7 all become OFF. 6427 + 6428 +* Number of occupied points of the device 6429 + 6430 +When 16 keys are connected, 4 points from the start device S of input (X) are occupied. 6431 + 6432 +When 16 keys are connected, 4 points from the start device D1 of output (Y) are occupied. 6433 + 6434 +It occupies 8 points from the start device D3 for key information output. 6435 + 6436 +Please do not to overlap with the devices used in other controls of the machine. 6437 + 6438 +D3 to D3+5: A to F key key information 6439 + 6440 +D3+6: Keyboard detection output of A to F keys 6441 + 6442 +D3+7: 0-9 key keyboard detection output 6443 + 6444 +* About the read timing of keyboard input 6445 + 6446 +HKY instruction is executed synchronously with the operation cycle of the programmable controller. 6447 + 6448 +It takes 8 operation cycles to complete a series of keyboard scans. 6449 + 6450 +In order to prevent reading omissions caused by the filter delay of keyboard input, please use the [Constant Scan Mode] and [Timer Interrupt] functions flexibly. 6451 + 6452 +* 6. Output form 6453 + 6454 +Please use a transistor output type programmable controller. 6455 + 6456 +**Related device** 6457 + 6458 +|**Devices**|**Name**|**Content** 6459 +|SM229|End of instruction execution|((( 6460 +OFF: (d1) to (d1)+3 is being scanned, or the instruction is not executed 6461 + 6462 +ON: (d1) to (d1)+3 cyclic output operation (1 to 4 digit scan) and then turn ON 6463 +))) 6464 + 6465 +**Error code** 6466 + 6467 +|**Error code**|**Content** 6468 +|4085H|The output result of the read application instruction (s) and (d2) exceeds the device range 6469 +|4086H|The output result of the write application instruction (d1), (d2) and (d3) exceeds the device range 6470 + 6471 +**Example** 6472 + 6473 +Program 6474 + 6475 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps6.jpg]] 6476 + 6477 + 6478 +Wiring diagram 6479 + 6480 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps7.jpg]] 6481 + 6482 +When inputting [1]→[2]→[3]→[B]→[F], save "23BF" in D0 in BIN mode. 6483 + 6484 +When [F] is input, [1] overflows. 6485 + 6486 + 6487 +=== **6.7.4 DHKY/32 System Numeric Key Input** === 6488 + 6489 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps8.png]]**DHKY** 6490 + 6491 +Use the keyboard (16 keys) of 0 to F to input, set numerical value (0 to 9) and operating conditions (A to F function keys) and other instructions for data input. 6492 + 6493 +When the extended function is ON, the hexadecimal number of 0 to F key can be used for keyboard input. 6494 + 6495 +-[DHKY (s) (d1) (d2) (d3)] 6496 + 6497 +**Content, range and data type** 6498 + 6499 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6500 +|(s)|The start bit device (X) number that input 16-key (occupies 4 points)|-|Bit|ANY_BOOL 6501 +|(d1)|The start device (Y) number that outputs (occupies 4 points)|-|Bit|ANY_BOOL 6502 +|(d2)|The device number that stores the value input from the 16 keys|0 to 99999999|BIN32 bit|ANY32_S 6503 +|(d3)|The start bit device number whose key is ON (occupies 8 points)|-|BIN16 bit|ANY16_S 6504 + 6505 +**Device used** 6506 + 6507 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6508 +**Index** 6509 + 6510 +**modification** 6511 +)))|((( 6512 +**Pulse** 6513 + 6514 +**extension** 6515 +))) 6516 +|**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** 6517 +|(% rowspan="4" %)DHKY|Parameter 1|●| | | | | | | | | | | | | | | | | | | | | | | |●| 6518 +|Parameter 2| |●| | | | | | | | | | | | | | | | | | | | | | |●| 6519 +|Parameter 3| | | | | | | | | | | | | | |●|●|●|●|●|●|●| | | |●| 6520 +|Parameter 4| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●| 6521 + 6522 +**Features** 6523 + 6524 +32-bit operation (DHKY) 6525 + 6526 +Scan the input [S to S+3] and column output [D1 to D1+3] signals connected with 16 keys (0 to F), press the 0 to 9 keys, and the value will be saved in [D2+1, D2] , The keyboard detection is output to D3+7. 6527 + 6528 +In addition, after pressing the A to F keys, the key information corresponding to the keyboard [D3 to D3+5] is ON, and the keyboard detection is output to D3+6. 6529 + 6530 +1. Regarding the use of keys from 0 to 9 to input values [D2+1, D2], D3+7 6531 + 6532 +If it is 99,999,999 or more, overflow from the high digit. 6533 + 6534 +The entered value is stored in [D2+1, D2] as BIN (binary number). 6535 + 6536 +When any key from 0 to 9 is pressed, the keyboard detection output D3+7 is ON. 6537 + 6538 +1. Button information about A to F keys D3 to D3+6 6539 + 6540 +For keyboard press information, please refer to 16-bit operation (HKY) on the previous page 6541 + 6542 +**extensions** 6543 + 6544 +After SM167 is ON and the extended function becomes valid, the data of the hexadecimal keys from 0 to F is saved in BIN mode. 6545 + 6546 +Except for the following, it is the same as the above-mentioned “Function and Operation Description”. 6547 + 6548 +The hexadecimal data input using the 0 to F keys are written in [D2+1, D2] as they are. 6549 + 6550 +1. Regarding the numerical input using 0 to F keys [D2+1, D2] 6551 + 6552 +-When it is FFFFFFFF or more, overflow from the upper digits. 6553 + 6554 +For example, when inputting [9]→[2]→[3]→[B]→[F]→[A]→[F], save "923BFAF" in [D2+1, D2] in BIN mode. 6555 + 6556 +**✎Note** 6557 + 6558 +* Restrictions on the number of uses of instructions 6559 + 6560 +Only one of the DHKY instructions can be used in the program. 6561 + 6562 +* When the keyboard is pressed simultaneously 6563 + 6564 +When multiple keys are pressed at the same time, the key pressed first is effective. 6565 + 6566 +* When the instruction contact is OFF 6567 + 6568 +Even if it is OFF, the content of D2 does not change, but D3 to D3 +7 all become OFF. 6569 + 6570 +* Number of occupied points of the device 6571 + 6572 +When 16 keys are connected, 4 points from the start device S of input (X) are occupied. 6573 + 6574 +When 16 keys are connected, 4 points from the start device D1 of output (Y) are occupied. 6575 + 6576 +It occupies 8 points from the start device D3 for key information output. 6577 + 6578 +Please be careful not to overlap with the devices used in other controls of the machine. 6579 + 6580 +D3 to D3+5: A to F key key information 6581 + 6582 +D3+6: Keyboard detection output of A to F keys 6583 + 6584 +D3+7: 0-9 key keyboard detection output 6585 + 6586 +* About the read timing of keyboard input 6587 + 6588 +The DHKY instruction is executed synchronously with the operation cycle of the programmable controller. 6589 + 6590 +It takes 8 operation cycles to complete a series of keyboard scans. 6591 + 6592 +In order to prevent reading omissions caused by the filter delay of keyboard input, please use the “Constant Scan Mode” and “Timer Interrupt” functions flexibly. 6593 + 6594 +* Output form 6595 + 6596 +Please use a transistor output type programmable controller. 6597 + 6598 +**Related device** 6599 + 6600 +|**Devices**|**Name**|**Content** 6601 +|SM229|End of instruction execution|((( 6602 +OFF: (d1) to (d1)+3 is being scanned, or the instruction is not executed 6603 + 6604 +ON: (d1) to (d1)+3 cyclic output operation (1 to 4 digit scan) and then turn ON 6605 +))) 6606 + 6607 +**Error code** 6608 + 6609 +|**Error code**|**Content** 6610 +|4085H|The output result of the read application instruction (s) and (d2) exceeds the device range 6611 +|4086H|The output result of the write application instruction (d1), (d2) and (d3) exceeds the device range 6612 + 6613 +**Example** 6614 + 6615 +Program 6616 + 6617 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps9.jpg]] 6618 + 6619 +.Wiring diagram 6620 + 6621 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps10.jpg]] 6622 + 6623 +When inputting 1→2→3→B→F→5→7→6, save "123BF576" in BIN to [D1,D0]. 6624 + 6625 + 6626 +=== [[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps11.png]]**6.7.5 PR/ASCII Code Printing** === 6627 + 6628 +**PR** 6629 + 6630 +This instruction is to output ASCII data in parallel to the output (Y). 6631 + 6632 +-[PR (s) (d)] 6633 + 6634 +**Content, range and data type** 6635 + 6636 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6637 +|(s)|Start number of the device storing ASCII code data| |String (ASCII code only)|ANY_ASC 6638 +|(d)|The start number Y of output ASCII code data|-|Bit|ANY_BOOL 6639 + 6640 +**Device used** 6641 + 6642 +|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6643 +**Index** 6644 + 6645 +**modification** 6646 +)))|((( 6647 +**Pulse** 6648 + 6649 +**extension** 6650 +))) 6651 +|**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** 6652 +|(% rowspan="2" %)PR|Parameter 1| | | | | | | | | | | | | | |●|●|●|●|●| | | | | |●| 6653 +|Parameter 2| |●| | | | | | | | | | | | | | | | | | | | | | |●| 6654 + 6655 +**Features** 6656 + 6657 +The ASCII code stored in the lower 8 bits (1 byte) of (S) to (S)+7 is output to (D) to (D)+7 character by character in a time division manner. 6658 + 6659 +The ASCII code saved in is shown below, and the following timing diagram is based on this example. 6660 + 6661 +The sequence of sending starts from (S) = "A", and ends with (S) + 7 = "H" for this purpose, sending eight bytes. 6662 + 6663 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps12.jpg]] 6664 + 6665 +Timing diagram 6666 + 6667 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps13.png]] 6668 + 6669 +**Related device** 6670 + 6671 +|**Devices**|**Name**|**Content** 6672 +|SM227|PR mode|((( 6673 +OFF: 8 bytes serial output (fixed to 8 characters) 6674 + 6675 +ON: 16 bytes serial output (1 to 16 characters) 6676 +))) 6677 + 6678 +**✎Note** 6679 + 6680 +* instruction input and instruction action 6681 + 6682 +instruction input=ON: Even if the instruction is continuously ON or the pulse instruction is executed, as long as the output of one cycle ends, the execution ends. 6683 + 6684 +SM229 only works when SM227=ON. 6685 + 6686 +instruction input=OFF: all outputs are OFF. 6687 + 6688 +* Relationship with scan time (operation time) 6689 + 6690 +The instruction is executed synchronously with the scan time. 6691 + 6692 +When the scan time is short, you can use the constant scan mode to drive; when the scan time is longer, you can use the timer interrupt drive. 6693 + 6694 +* About the output of the programmable controller 6695 + 6696 +Please use a transistor output type programmable controller. 6697 + 6698 +* When 00H (NUL) exists in the data (when SM227=ON) 6699 + 6700 +After the instruction is executed, the remaining data is not output. 6701 + 6702 +In addition, SM229 maintains an operation cycle ON. 6703 + 6704 +* Restrictions on the number of uses of instructions 6705 + 6706 +Only one PR instruction can be used in the program. 6707 + 6708 +**Error code** 6709 + 6710 +|**Error code**|**Content** 6711 +|4085H|The output result of the read application instruction (s) exceeds the device range 6712 +|4086H|The output result of the write application instruction (d) exceeds the device range 6713 + 6714 +**Example** 6715 + 6716 +Program 6717 + 6718 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps14.jpg]] 6719 + 6720 +If the ASCII code in D200 to D203 is "Stopped", the corresponding output port signal and its timing are as follows: 6721 + 6722 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps15.png]] 6723 + 6724 + 6725 + 6726 +=== [[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps16.png]]**6.7.6 SEGD/Numeric Key Input** === 6727 + 6728 +**SEGD(P)** 6729 + 6730 +instruction to light up the 7-segment digital tube (1 digit). 6731 + 6732 +-[SEGD (s) (d)] 6733 + 6734 +**Content, range and data type** 6735 + 6736 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6737 +|(s)|Decoded start word device|-32767 to 32767|Bit|ANY_BOOL 6738 +|(d)|Word device number for storing 7-segment display data|-32767 to 32767|Bit|ANY_BOOL 6739 + 6740 +**Device used** 6741 + 6742 +|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6743 +**Index** 6744 + 6745 +**modification** 6746 +)))|((( 6747 +**Pulse** 6748 + 6749 +**extension** 6750 +))) 6751 +|**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** 6752 +|(% rowspan="2" %)SEGD|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●|● 6753 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●|● 6754 + 6755 +**Features** 6756 + 6757 +Decode the low 4-digit (1 digit) of 0 to F (hexadecimal number) of (S) into 7-segment display data and save it in the low 8-digit of (d). 6758 + 6759 +1.7-segment code decode table 6760 + 6761 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps17.jpg]] 6762 + 6763 +**✎Note** 6764 + 6765 +Number of occupied points of the device: The low 8 bits of the output of the device (S) are occupied, and the high 8 bits do not change. 6766 + 6767 +**Error code** 6768 + 6769 +|**Error code**|**Content** 6770 +|4085H|The output result of the read application instruction (s) and (d) exceeds the device range 6771 +|4086H|The output result of the write application instruction (d) exceeds the device range 6772 + 6773 +**Example** 6774 + 6775 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps18.jpg]] 6776 + 6777 +When M0 is set, the lower 4 bits of the data in D0 are decoded and output to the Y10 to Y17 ports. The corresponding table for translation is shown in the above table (7-segment code decoding table). The table does not need to be prepared by the user, and the comparison table is already available in the PLC system. 6778 + 6779 + 6780 +=== [[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps19.png]]**6.7.7 SEGL/7SEG Vode Hour and Minute Display** === 6781 + 6782 +**SEGL** 6783 + 6784 +Control 1 or 2 groups of 4-digit 7-segment digital tube display instructions with latch. 6785 + 6786 +-[SEGL (s) (d) (n)] 6787 + 6788 +**Content, range and data type** 6789 + 6790 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6791 +|(s)|Start word device for BCD conversion|0 to 9999|BIN16 bit|ANY16 6792 +|(d)|The starting Y number to be output|-|Bit|ANY_BOOL 6793 +|(n)|Parameter number [Setting range: K0(H0) to K7(H7)]|0 to 7|BIN16/32 bit|ANY16_U 6794 + 6795 +**Device used** 6796 + 6797 +|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6798 +**Index** 6799 + 6800 +**modification** 6801 +)))|((( 6802 +**Pulse** 6803 + 6804 +**extension** 6805 +))) 6806 +|**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** 6807 +|(% rowspan="3" %)SEGL|Parameter 1| | | | | | | | | | |●|●|●|●|●|●|●|●|●| | |●|●| |●| 6808 +|Parameter 2| |●| | | | | | | | | | | | | | | | | | | | | | |●| 6809 +|Parameter 3| | | | | | | | | | | | | | | | | | | | | |●|●| | | 6810 + 6811 +**Features** 6812 + 6813 +Convert the 4-bit value of (s) into BCD data, and use the time-division method to sequentially output each 1 digit to a 7-segment digital tube with BCD decoding. (s) is valid when BIN data in the range of 0 to 9999. 6814 + 6815 +The parameter (n) should be set as follows based on the positive and negative logic on the programmable controller side and the positive and negative logic on the 7-segment side. 6816 + 6817 +|(% rowspan="2" %)**Programmable controller output logic**|(% rowspan="2" %)**Data input**|(% rowspan="2" %)**Strobe signal**|(% colspan="2" %)**Parameter n** 6818 +|((( 6819 +**4 digits** 6820 + 6821 +**in 1 group** 6822 +)))|((( 6823 +**4 digits** 6824 + 6825 +**in 2 groups** 6826 +))) 6827 +|(% rowspan="4" %)Negative logic|(% rowspan="2" %)Negative logic (consistent)|Negative logic (consistent)|0|4 6828 +|Positive logic (inconsistent)|1|5 6829 +|(% rowspan="2" %)Positive logic (inconsistent)|Negative logic (consistent)|2|6 6830 +|Positive logic (inconsistent)|3|7 6831 +|(% rowspan="4" %)Positive logic|(% rowspan="2" %)Positive logic (consistent)|Negative logic (consistent)|0|4 6832 +|Positive logic (inconsistent)|1|5 6833 +|(% rowspan="2" %)Negative logic (inconsistent)|Negative logic (consistent)|2|6 6834 +|Positive logic (inconsistent)|3|7 6835 + 6836 +1. When using 4 digits in 1 group (n=K0 to 3) 6837 + 6838 +After converting the 4-digit value of (s) from BIN→BCD, use the time division method to output each digit in turn from (d) to (d)+3. In addition, the strobe signal output (d)+4 to (d)+7 is also output in a time-division manner, locked to the 7-terminal display of the first group of 4 digits 6839 + 6840 +1. When using 4 digits in 2 groups (n=K4 to 7) 6841 + 6842 +1. 4-digit group 1 6843 + 6844 +After converting the 4-digit value of (s) from BIN→BCD, use the time division method to output each digit in turn from (d) to (d)+3. The strobe signal output (d)+4 to (d)+7 is output in time-division manner in turn, locked to the 7-segment display of the first group of 4 digits. 6845 + 6846 +1. 4-digit group 2 6847 + 6848 +After converting the 4-digit value of (s)+1 from BIN+BCD, use the time division method to output each digit in turn from (d)+10 to (d)+13. The strobe signal output (d)+4 to (d)+7 is output in a time-division manner in turn, locked to the 7-segment display of the second group of digits. 6849 + 6850 +**✎Note** 6851 + 6852 +* About the time required to update the 7-segment 4-digit display 6853 + 6854 +The time required to update the 4-digit display (1 group or 2 groups) is 12 times the scan time (operation time). 6855 + 6856 +* Action when instruction input is OFF 6857 + 6858 +When the instruction input is ON, the action is repeated. However, if the instruction contact turns off during an action, the action will be interrupted. When it is ON again, it will start from the original action. 6859 + 6860 +* Occupied points of the device 6861 + 6862 +When using 4 digits in 1 group: 1 point from the start device specified in S is occupied. 6863 + 6864 +Occupy 8 points from the start device specified in D. Even when the number of bits is small, the occupied points cannot be used for other purposes. 6865 + 6866 +When using 4 digits 2 groups: 2 points from the start device specified in S are occupied. 6867 + 6868 +Occupy 12 points from the start device specified in D. Even when the number of bits is small, the occupied points cannot be used for other purposes. 6869 + 6870 +* About scan time (operation cycle) and display timing 6871 + 6872 +The SEGL instruction is executed synchronously with the scan time (operation cycle) of the programmable controller. 6873 + 6874 +In order to perform a series of displays, the scan time of the programmable controller needs to exceed 10ms. 6875 + 6876 +When it is less than 10ms, please use the constant scan mode and run with a scan time longer than 10ms. 6877 + 6878 +* Regarding the output format of the programmable controller 6879 + 6880 +Please use a transistor output type programmable controller. 6881 + 6882 +* Limit number of instructions 6883 + 6884 +At most 2 instructions can be used at the same time. 6885 + 6886 +Related device 6887 + 6888 +|**Devices**|**Name**|**Content** 6889 +|SM229|End of instruction execution|After the processing is completed, SM229 is ON for one scan cycle 6890 + 6891 +Error code 6892 + 6893 +|**Error code**|**Content** 6894 +|4084H|The data input in the application instruction (n) exceeds the specified range 6895 +|4085H|The output result of the read application instruction (s) exceeds the device range 6896 +|4086H|The output result of the write application instruction (d) exceeds the device range 6897 +|4089H|The number of application instructions exceeds the limit 6898 + 6899 +**Example** 6900 + 6901 +Program 6902 + 6903 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps20.jpg]] 6904 + 6905 +The corresponding hardware wiring is shown in the following figure. The content of D0 is displayed on the first group of digital tubes, and the content of D1 is displayed on the second group of digital tubes. If the reading of D0 or D1 exceeds 9999, the program will run into an error: 6906 + 6907 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps21.png]] 6908 + 6909 +The digital tube used in the wiring diagram has its own display data latch, 7-segment decoding and driving, and 7-segment digital of negative logic type (when the input port is low, it means that the input data is 1, or is strobed) Show tube. During display processing, PLC's Y4 to Y7 ports will scan automatically, and only one port is ON each time as a bit strobe signal. At this time, the data on Y0 to Y3 ports is the BCD code data sent to the corresponding bit. When the bit strobe signal turns from ON→OFF, it is latched into the latch in the digital tube. After internal decoding and driving, the digital tube displays the number. The PLC system cyclically processes Y4 to Y7 in turn, until all 4 bits are processed. In the same way, Y10 to Y13 are the data output ports of the second group of 4-digit digital tubes, which share the bit strobe lines of Y4 to Y7. The processing methods are the same, and the display processing of the two groups is performed at the same time. In the example, if D0=K2468 and D1=K9753, the first group will display 2 4 6 8 and the second group will display 9 7 5 3. 6910 + 6911 +It takes 12 scan cycles to complete a display refresh. After the processing is completed: According to the positive and negative logic of the programmable controller, the positive and negative logic of the seven-segment code, etc., select according to the following principles: 6912 + 6913 +For a group of 4 digits, n=0 to 3. When two groups of 4 digits, n= 4 to 7. 6914 + 6915 +|**Display group number**|(% colspan="4" %)**Group 1**|(% colspan="4" %)**Group 2** 6916 +|Y data output polarity|(% colspan="2" %)PNP|(% colspan="2" %)NPN|(% colspan="2" %)PNP|(% colspan="2" %)NPN 6917 +|Strobe and data polarity|Identical|Opposite|Identical|Opposite|Identical|Opposite|Identical|Opposite 6918 +|the value of n|0|1|2|3|4|5|6|7 6919 + 6920 +=== 6921 +**6.7.8 TKY/Numeric Key Input** === 6922 + 6923 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps22.png]]**TKY** 6924 + 6925 +Use the keyboard (number keys) of 0 to 9 to input instructions for setting data such as timers and counters. 6926 + 6927 +-[TKY (s) (d1) (d2)] 6928 + 6929 +**Content, range and data type** 6930 + 6931 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 6932 +|(s)|The start bit device that input the numeric key (occupies 10 points)|-|Bit|ANY_BOOL 6933 +|(d1)|Word device number for storing data|0 to 9999|Signed BIN16|ANY16_S 6934 +|(d2)|The start bit device number whose key start bit device is ON (occupies 11 points)|-|Bit|ANY_BOOL 6935 + 6936 +**Device used** 6937 + 6938 +|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|((( 6939 +**Index** 6940 + 6941 +**modification** 6942 +)))|((( 6943 +**Pulse** 6944 + 6945 +**extension** 6946 +))) 6947 +|**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** 6948 +|(% rowspan="3" %)TKY|Parameter 1|●|●|●|●|●| | | | |●| | | | | | | | | | | | | | |●| 6949 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●| | | | | |●| 6950 +|Parameter 3| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●| 6951 + 6952 +**Features** 6953 + 6954 +Input [(s) to +9] to the connected number keys and press the keyboard, save the input value in (d1), and output in (d2) to +10 6955 + 6956 +Keyboard input information and detected keyboard output. 6957 + 6958 +1. About the input value (d1) 6959 + 6960 +If it is more than 9,999, overflow from the high digit. 6961 + 6962 +The entered value is saved in BIN (binary number). 6963 + 6964 +After pressing the number keys in the order of ①, ②, ③, ④, it is stored as 2130 in (d1). 6965 + 6966 +1. About (d2) to 10 of key information 6967 + 6968 +(d2) to 9 key information, according to the pressed key ON/OFF. 6969 + 6970 +When any key from 0 to 9 is pressed, the keyboard detection output of (d2) +10 is ON. 6971 + 6972 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps23.png]] 6973 + 6974 +**✎Note** 6975 + 6976 +* When the keyboard is pressed simultaneously 6977 + 6978 +When multiple keys are pressed at the same time, only the key pressed first is effective. 6979 + 6980 +* When the instruction contact is OFF 6981 + 6982 +Even if it is OFF, the content of (d2) will not change, but (d2) to (d2)+10 will be OFF. 6983 + 6984 +* Occupied points of the device 6985 + 6986 +**✎ **Connect the input of the number keys, occupying 10 points from (s). 6987 + 6988 +Even when the number key is not connected (not used), since (d2) is already occupied, it cannot be used for other purposes. 6989 + 6990 +**✎ **It occupies 11 points from the start device (d2) for key information output. 6991 + 6992 +Please be careful not to overlap with the devices used in other controls of the machine. 6993 + 6994 +(D2) to (d2)+9: Turn ON according to the input of number keys 0 to 9. 6995 + 6996 +(D2)+10: It is ON when any key between 0 to 9 is pressed. (Keyboard detection output) 6997 + 6998 +* Restrictions on the number of uses of instructions 6999 + 7000 +Only one of the TKY instruction or DTKY instruction can be used in the program. 7001 + 7002 +**Error code** 7003 + 7004 +|**Error code**|**Content** 7005 +|4085H|The output result of the read application instruction (s) exceeds the device range 7006 +|4086H|The output result of the write application instruction (d) exceeds the device range 7007 + 7008 +**Example** 7009 + 7010 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps24.jpg]] 7011 + 7012 +To input the number "2013", press the keys 2, 0, 1, 3 (X2, X0, X1, X3) in order. The operation of the PLC internal variables is shown in the figure below. 7013 + 7014 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps25.png]][[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps26.jpg]] 7015 + 7016 + 7017 + 7018 +=== **6.7.9 DTKY/Numeric Key Input** === 7019 + 7020 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps27.png]]**DTKY** 7021 + 7022 +Use the 4 points starting from the device specified in (d) to perform 4 types of timer output. 7023 + 7024 +-[STMR (s1) (s2) (d)] 7025 + 7026 +**Content, range and data type** 7027 + 7028 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 7029 +|(s)|The start bit device that input the numeric key (occupies 10 points)|-|Bit|ANY_BOOL 7030 +|(d1)|Word device number for storing data|0 to 99999999|Signed BIN32|ANY32_S 7031 +|(d2)|The start bit device number whose key start bit device is ON [occupies 11 points]|-|Bit|ANY_BOOL 7032 + 7033 +**Device used** 7034 + 7035 +|(% rowspan="2" %)**instruction**|(% rowspan="2" %)**Parameter**|(% colspan="24" %)**Devices**|**Index modification**|((( 7036 +**Pulse** 7037 + 7038 +**extension** 7039 +))) 7040 +|**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** 7041 +|(% rowspan="3" %)DTKY|Parameter 1|●|●|●|●|●| | | | |●| | | | | | | | | | | | | | |●| 7042 +|Parameter 2| | | | | | | | | | | |●|●|●|●|●|●|●|●|●|●| | | |●| 7043 +|Parameter 3| |●|●|●|●| | | | |●| | | | | | | | | | | | | | |●| 7044 + 7045 +**Features** 7046 + 7047 +Input [(s) to +9] to the connected number keys and press the keyboard, save the input value in (d1), and output in (d2) to +10 7048 + 7049 +Keyboard input information and detected keyboard output. 7050 + 7051 +1. About the input value (d1) 7052 + 7053 +If it is more than 9,999, overflow from the high digit. 7054 + 7055 +The entered value is saved in BIN (binary number). 7056 + 7057 +1. (d2) to 10 of key information 7058 + 7059 +(d2) to +9 key information, according to the pressed key ON/OFF. 7060 + 7061 +When any key from 0 to 9 is pressed, the keyboard detection output of (d2) +10 is ON. 7062 + 7063 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps28.png]] 7064 + 7065 +**✎Note** 7066 + 7067 +* When the keyboard is pressed simultaneously 7068 +* When multiple keys are pressed at the same time, only the key pressed first is effective. 7069 +* When the instruction contact is OFF 7070 + 7071 +Even if it is OFF, the content of (d2) will not change, but (d2) to (d2)+10 will be OFF. 7072 + 7073 +* Occupied points of the device 7074 + 7075 +**✎** Connect the input of the number keys, occupying 10 points from (s). 7076 + 7077 +Even when the number key is not connected (not used), since (d2) is already occupied, it cannot be used for other purposes. 7078 + 7079 +**✎** It occupies 11 points from the start device (d2) for key information output. 7080 + 7081 +Please be careful not to overlap with the devices used in other controls of the machine. 7082 + 7083 +(D2) to (d2)+9: Turn ON according to the input of number keys 0 to 9. 7084 + 7085 +(D2)+10: It is ON when any key between 0 to 9 is pressed. (Keyboard detection output) 7086 + 7087 +* Restrictions on the number of uses of instructions 7088 + 7089 +Only one of the TKY instruction or DTKY instruction can be used in the program. 7090 + 7091 +**Error code** 7092 + 7093 +|**Error code**|**Content** 7094 +|4085H|The output result of the read application instruction (s) and (d1) exceeds the device range 7095 +|4086H|The output result of the write application instruction (d1) and (d2) exceeds the device range 7096 + 7097 +**Example** 7098 + 7099 +[[image:file:///C:\Users\z\AppData\Local\Temp\ksohtml6496\wps29.jpg]] 7100 + 7101 +When X20 is on, if you want to input the number "20205689", press 2, 0, 2, 0, 5, 6, 8, 9 (X2, X0, X2, X0, X5, X6, X10, X11) in sequence , Then (the value in (D1,D0) is 20205689) 7102 + 7103 +
- 1758552469974-996.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +141.8 KB - Content
- 1758552725118-406.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +10.6 KB - Content
- 1758552774857-894.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +61.4 KB - Content
- 1758553361414-300.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +30.0 KB - Content
- 1758553386520-904.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +83.6 KB - Content