欢迎图片

Changes for page 06 Basic instructions

Last modified by Iris on 2025/10/20 11:22

From version 2.2
edited by Iris
on 2025/09/22 15:38
Change comment: There is no comment for this version
To version 6.1
edited by Jiahao Lai
on 2025/09/23 17:31
Change comment: There is no comment for this version

Summary

Details

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