Changes for page 6.08 Data Conversion instruction
Last modified by Iris on 2025/10/23 15:37
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 44 added, 0 removed)
- 1760515828495-204.png
- 1760515993069-622.png
- 1760516200225-646.png
- 1760516268370-140.png
- 1760516329466-296.png
- 1760516369609-652.png
- 1760516454645-987.png
- 1760516560154-107.png
- 1760516760461-209.png
- 1760516821297-118.png
- 1760516859697-895.png
- 1760517173347-405.png
- 1760517259004-868.png
- 1760517298248-607.png
- 1760517373906-417.png
- 1760517421103-521.png
- 1760517499439-697.png
- 1760517525868-463.png
- 1760517594117-892.png
- 1760517675391-831.png
- 1760517745942-979.png
- 1760517809643-353.png
- 1760517879658-305.png
- 1760518002883-747.png
- 1760518024863-940.png
- 1760518067695-791.png
- 1760518128297-536.png
- 1760518162828-183.png
- 1760518190168-651.png
- 1760518243532-544.png
- 1760518318672-792.png
- 1760518359500-132.png
- 1760518380601-932.png
- 1760518408811-430.png
- 1760518549836-396.png
- 1760518595510-661.png
- 1760518650396-504.png
- 1760518681791-265.png
- 1760518721394-977.png
- 1760518798409-907.png
- 1760518822792-557.png
- 1760518892993-298.png
- 1760518916894-252.png
- 1760518963231-603.png
Details
- Page properties
-
- Content
-
... ... @@ -1,4 +1,4 @@ 1 -=== [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps117.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps118.png]]**6.8.1BCD/BIN → BCD** ===1 +=== **BCD/BIN → BCD** === 2 2 3 3 **BCD(P)** 4 4 ... ... @@ -37,13 +37,15 @@ 37 37 38 38 When the data specified in (s) or (d) is digit specification, the conditions are as shown in the table below. 39 39 40 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps119.png]] [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps120.jpg]] 40 +(% style="text-align:center" %) 41 +[[image:1760515828495-204.png]] 41 41 42 42 The data specified in (s) can be converted in the range of K0 to K9999 by BCD (decimal number). 43 43 44 44 When the data specified in (s) or (d) is digit specification, the conditions are as shown in the table below. 45 45 46 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps121.jpg]] 47 +(% style="text-align:center" %) 48 +[[image:1760515993069-622.png||height="194" width="491"]] 47 47 48 48 |**(d)**|**Digits**|**Data range** 49 49 |K1Y0|1-bit|0 to 9 ... ... @@ -51,14 +51,6 @@ 51 51 |K3Y0|3-bit|000 to 999 52 52 |K4Y0|4-bit|0000 to 9999 53 53 54 - 55 - 56 - 57 - 58 - 59 - 60 - 61 - 62 62 **✎Note** 63 63 64 64 The four arithmetic operations (+-×÷), increment, decrement instructions and other operations in the CPU module are all performed by BIN (binary number). Therefore, when sending BCD (decimal) digital switch information to the CPU module, please use the BIN(P) instruction (BCD→BIN conversion transfer instruction). In addition, when outputting to the 7-segment display of BCD (decimal number), please use the BCD(P) instruction (BIN→BCD conversion transmission). ... ... @@ -72,13 +72,14 @@ 72 72 73 73 **Example** 74 74 75 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps122.jpg]] 69 +(% style="text-align:center" %) 70 +[[image:1760516200225-646.png]] 76 76 72 + 77 77 When M0 is set, the BIN value of D200 is converted into BCD and stored in K1Y0. 78 78 75 +=== **BIN/4-bit BCD → BIN** === 79 79 80 -=== [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps123.png]]**6.8.2 BIN/4-bit BCD → BIN** === 81 - 82 82 **BIN(P)** 83 83 84 84 Convert the BCD data of the device specified in (s) to BIN and store it in the device specified in (d). ... ... @@ -112,13 +112,16 @@ 112 112 113 113 BCD 4-bit data (0 to 9999) of the device specified in (s) is converted into BIN 16-bit data and stored in the device specified in (d). 114 114 115 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps124.png]] [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps125.jpg]] 116 116 111 +(% style="text-align:center" %) 112 +[[image:1760516268370-140.png]] 113 + 117 117 The data specified in (s) can be converted within the range of 0 to 9999 (BCD). 118 118 119 119 When the data specified in (s) or (d) is digit specification, the conditions are as shown in the table below. 120 120 121 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps126.jpg]] 118 +(% style="text-align:center" %) 119 +[[image:1760516329466-296.png]] 122 122 123 123 |**(d)**|**Digits**|**Data range** 124 124 |K1X0|1-bit|0 to 9 ... ... @@ -126,13 +126,6 @@ 126 126 |K3X0|3-bit|000 to 999 127 127 |K4X0|4-bit|0000 to 9999 128 128 129 - 130 - 131 - 132 - 133 - 134 - 135 - 136 136 **✎Note** 137 137 138 138 The calculations in the CPU module such as the four arithmetic operations (+-×÷), increment and decrement instructions are all performed by BIN (binary number). Therefore, when sending BCD (decimal) digital switch information to the CPU module, please use the BIN(P) instruction (BCD→BIN conversion transfer instruction). In addition, when outputting to the 7-segment display of BCD (decimal number), please use the BCD(P) instruction (BIN→BCD conversion transmission). ... ... @@ -146,18 +146,13 @@ 146 146 147 147 **Example** 148 148 149 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps127.jpg]] 140 +(% style="text-align:center" %) 141 +[[image:1760516369609-652.png||height="94" width="379"]] 150 150 151 151 When M0 is set, the BCD value of K1Y0 is converted into BIN and stored in D200. 152 152 145 +=== **DBIN/8-bit BCD → BIN** === 153 153 154 - 155 - 156 - 157 - 158 - 159 -=== [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps128.png]]**6.8.3 DBIN/8-bit BCD → BIN** === 160 - 161 161 **DBIN(P)** 162 162 163 163 Convert the BCD data of the device specified in (s) to BIN and store it in the device specified in (d). ... ... @@ -187,13 +187,15 @@ 187 187 188 188 BCD 8-bit data (0 to 99999999) of the device specified in (s) is converted to BIN 32-bit data and stored in the device specified in (d). 189 189 190 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps129.png]] [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps130.jpg]] 176 +(% style="text-align:center" %) 177 +[[image:1760516454645-987.png]] 191 191 192 192 The data specified in (s) can be converted within the range of 0 to 99999999 (BCD). 193 193 194 194 When the data specified in (s) or (d) is digit specification, the conditions are as shown in the table below. 195 195 196 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps131.jpg]] 183 +(% style="text-align:center" %) 184 +[[image:1760516560154-107.png]] 197 197 198 198 |**(d)**|**Bit**|**Data range** 199 199 |K1X0|1-bit|0 to 9 ... ... @@ -205,8 +205,6 @@ 205 205 |K7X0|7-bit|0000000 to 9999999 206 206 |K8X0|8-bit|00000000 to 99999999 207 207 208 - 209 - 210 210 **✎Note** 211 211 212 212 The calculations in the CPU module such as the four arithmetic operations (+-×÷), increment and decrement instructions are all performed by BIN (binary number). Therefore, when sending BCD (decimal) digital switch information to the CPU module, please use the BIN(P) instruction (BCD→BIN conversion transfer instruction). In addition, when outputting to the 7-segment display of BCD (decimal number), please use the BCD(P) instruction (BIN→BCD conversion transmission). ... ... @@ -218,18 +218,15 @@ 218 218 |4085H|The output result of the read application instruction (s) exceeds the device range 219 219 |4086H|The output result of the write application instruction (d) exceeds the device range 220 220 221 - 222 - 223 223 **Example** 224 224 225 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps132.jpg]] 209 +(% style="text-align:center" %) 210 +[[image:1760516760461-209.png||height="90" width="363"]] 226 226 227 227 When M0 is set, the BCD value of K8Y0 is converted into BIN and stored in D200. 228 228 214 +=== **FLT/BIN Integer → Binary Floating Point Number** === 229 229 230 - 231 -=== **6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps133.png]]**4 FLT/BIN Integer → Binary Floating Point Number** === 232 - 233 233 **FLT(P)** 234 234 235 235 An instruction to convert a BIN 16-bit integer value into a binary floating point number (real number). ... ... @@ -261,9 +261,9 @@ 261 261 262 262 The signed 16-bit data specified in (s) is converted into a binary floating point data and stored in (d)+1, (d). 263 263 264 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps134.jpg]] 247 +(% style="text-align:center" %) 248 +[[image:1760516821297-118.png]] 265 265 266 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps135.jpg]] 267 267 268 268 **✎Note** 269 269 ... ... @@ -283,20 +283,16 @@ 283 283 284 284 (1) Calculation example 285 285 286 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps136.png]] 269 +(% style="text-align:center" %) 270 +[[image:1760516859697-895.png]] 287 287 288 288 (2) Sequence control program 289 289 290 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps137.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps138.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps139.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps140.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps141.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps142.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps143.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps144.png]] [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps145.jpg]] 274 +(% style="text-align:center" %) 275 +[[image:1760517173347-405.png]] 291 291 277 +=== **DFLT/BIN Integer → Binary Floating Point Number** === 292 292 293 - 294 - 295 - 296 - 297 -=== 298 -**6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps146.png]]**5 DFLT/BIN Integer → Binary Floating Point Number** === 299 - 300 300 **DFLT(P)** 301 301 302 302 An instruction to convert a BIN 32-bit integer value into a binary floating point number (real number). ... ... @@ -328,10 +328,11 @@ 328 328 329 329 Convert the signed BIN 32-bit data specified in (s) to binary floating point data and store them in (d)+1, (d). 330 330 331 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps147.jpg]] 310 +(% style="text-align:center" %) 311 +[[image:1760517259004-868.png]] 332 332 333 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps148.jpg]] 334 334 314 + 335 335 **✎Note** 336 336 337 337 In each binary floating-point number (real number) operation instruction, the specified K and H values are automatically converted into a binary floating-point number (real number), so there is no need to use the DFLT instruction for conversion. ... ... @@ -346,13 +346,13 @@ 346 346 347 347 **Example** 348 348 349 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps149.jpg]] 329 +(% style="text-align:center" %) 330 +[[image:1760517298248-607.png]] 350 350 351 351 When M2=ON, convert the BIN 32-bit integer -7963590 in [D1, D0] into a single-precision floating point number -7963590.0 and store it in the [D101, D100] device. 352 352 334 +=== **VAL/ String → BIN 16-bit Data Conversion** === 353 353 354 -=== **6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps150.png]]**6 VAL/ String → BIN 16-bit Data Conversion** === 355 - 356 356 **VAL(P)** 357 357 358 358 After converting the character string stored in the device number specified in (s) and later into BIN 16-bit data, store the number of digits in (d1) and store the BIN data in (d2). ... ... @@ -388,7 +388,8 @@ 388 388 389 389 The total number of digits stored in (d1) stores the number of all characters (including signs and decimal points) representing the value. The number of decimal places stored in (d1)+1 stores the number of characters representing the decimal part after 2EH(.). For the BIN 16-bit data stored in (d2), the character string ignoring the decimal point is converted into a BIN value and stored. 390 390 391 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps151.jpg]] 371 +(% style="text-align:center" %) 372 +[[image:1760517373906-417.png]] 392 392 393 393 **Error code** 394 394 ... ... @@ -411,8 +411,10 @@ 411 411 412 412 **Example** 413 413 414 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps152.jpg]] 395 +(% style="text-align:center" %) 396 +[[image:1760517421103-521.png]] 415 415 398 + 416 416 The result obtained above: 417 417 418 418 D0 corresponds to str length is 7. ... ... @@ -419,14 +419,17 @@ 419 419 420 420 D1 corresponds to a decimal point length of 3. 421 421 422 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps153.jpg]] 405 +(% style="text-align:center" %) 406 +[[image:1760517499439-697.png]] 423 423 408 + 424 424 D10 corresponds to -12356 ignoring the decimal point. 425 425 426 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps154.jpg]] 427 427 412 +(% style="text-align:center" %) 413 +[[image:1760517525868-463.png]] 428 428 429 -=== ** 6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps155.png]]**7 DVAL/String → BIN32-bit Data Conversion** ===415 +=== **DVAL/String → BIN32-bit Data Conversion** === 430 430 431 431 **DVAL(P)** 432 432 ... ... @@ -463,8 +463,10 @@ 463 463 464 464 The total number of digits stored in (d1) stores the number of all characters (including signs and decimal points) representing the value. The number of decimal places stored in (d1)+1 stores the number of characters representing the decimal part after 2EH(.). For the BIN 32-bit data stored in (d2), the character string ignoring the decimal point is converted into a BIN value and stored. 465 465 466 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps156.jpg]] 452 +(% style="text-align:center" %) 453 +[[image:1760517594117-892.png]] 467 467 455 + 468 468 **Error code** 469 469 470 470 |**Error code**|**Content** ... ... @@ -471,7 +471,7 @@ 471 471 |4082H|((( 472 472 The character string specified by (s) could not be converted into a numeric value. 473 473 474 -For example:The first character is not a negative sign or a space, space appears in the middle of the number, decimal point appears twice. Except for the first character that appears non-characters and decimal points, the number in the symbolic string with the decimal point is removed and the range between -2147483648 and 2147483647 is exceeded 462 +For example: The first character is not a negative sign or a space, space appears in the middle of the number, decimal point appears twice. Except for the first character that appears non-characters and decimal points, the number in the symbolic string with the decimal point is removed and the range between -2147483648 and 2147483647 is exceeded 475 475 476 476 Except for the first character, there are non-character and decimal Signs 477 477 ... ... @@ -484,8 +484,10 @@ 484 484 485 485 **Example** 486 486 487 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps157.jpg]] 475 +(% style="text-align:center" %) 476 +[[image:1760517675391-831.png]] 488 488 478 + 489 489 The result obtained above 490 490 491 491 D0 corresponds to str length is 7. ... ... @@ -492,14 +492,16 @@ 492 492 493 493 D1 corresponds to a decimal point length of 3. 494 494 495 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps158.jpg]] 485 +(% style="text-align:center" %) 486 +[[image:1760517745942-979.png]] 496 496 497 497 D10 corresponds to -12356 ignoring the decimal point 498 498 499 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps159.jpg]] 500 500 491 +(% style="text-align:center" %) 492 +[[image:1760517809643-353.png]] 501 501 502 -=== ** 6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps160.png]]**8 ASCI/HEX Code Data →ASCII Conversion** ===494 +=== **ASCI/HEX Code Data →ASCII Conversion** === 503 503 504 504 **ASCI(P)** 505 505 ... ... @@ -538,12 +538,14 @@ 538 538 539 539 **(1) 16-bit conversion mode (when SM8161=OFF)** 540 540 541 -Convert the digits of the HEX code after the device specified in (s) into ASCII, and transfer to the upper and lower 8 bits (bytes) of the device specified in (d). When using in 16-bit conversion mode, SM161 should always be turned OFF. 533 +Convert the digits of the HEX code after the device specified in (s) into ASCII, and transfer to the upper and lower 8 bits (bytes) of the device specified in (d). When using in 16-bit conversion mode, SM161 should always be turned OFF. 542 542 543 543 In the case of the following program, perform the conversion as shown below. 544 544 545 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps161.png]] 537 +(% style="text-align:center" %) 538 +[[image:1760517879658-305.png||height="201" width="654"]] 546 546 540 + 547 547 **Specify the number of bits (characters) and the conversion result** 548 548 549 549 |**(n)**|(% rowspan="2" %)**K1**|(% rowspan="2" %)**K2**|(% rowspan="2" %)**K3**|(% rowspan="2" %)**K4**|(% rowspan="2" %)**K5**|(% rowspan="2" %)**K6**|(% rowspan="2" %)**K7**|(% rowspan="2" %)**K8**|(% rowspan="2" %)**K9** ... ... @@ -558,10 +558,12 @@ 558 558 |D203 on| | | | | | | |C|B 559 559 |Under D204| | | | | | | | |C 560 560 561 -**Bit structure in the case of (n)=K4 ¢**555 +**Bit structure in the case of (n)=K4** 562 562 563 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps162.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps163.jpg]] 557 +(% style="text-align:center" %) 558 +[[image:1760518002883-747.png]] 564 564 560 + 565 565 **(2) 8-bit conversion mode (when SM161=ON)** 566 566 567 567 Convert the digits of the HEX code after the device specified in (s) into ASCII, and transfer to the lower 8 bits (bytes) of the device specified in (d). When using in 8-bit conversion mode, SM161 should always be set to ON for use. ... ... @@ -568,14 +568,18 @@ 568 568 569 569 In the case of the following program, perform the conversion as shown below. 570 570 571 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps164.png]] 567 +(% style="text-align:center" %) 568 +[[image:1760518024863-940.png||height="154" width="494"]] 572 572 570 + 573 573 If SM161 is set to ON, it will become 8-bit mode, 574 574 575 575 Perform conversion processing as shown below. 576 576 577 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps165.png]] 575 +(% style="text-align:center" %) 576 +[[image:1760518128297-536.png]] 578 578 578 + 579 579 |**(n)**|(% rowspan="2" %)**K1**|(% rowspan="2" %)**K2**|(% rowspan="2" %)**K3**|(% rowspan="2" %)**K4**|(% rowspan="2" %)**K5**|(% rowspan="2" %)**K6**|(% rowspan="2" %)**K7**|(% rowspan="2" %)**K8**|(% rowspan="2" %)**K9** 580 580 |**(d)** 581 581 |D200|C|B|C|0|4|3|2|1|8 ... ... @@ -588,9 +588,10 @@ 588 588 |D207| | | | | | | |C|B 589 589 |D208| | | | | | | | |C 590 590 591 -Bit structure in the case of (n)=K2 ¢591 +Bit structure in the case of (n)=K2 592 592 593 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps166.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps167.jpg]] 593 +(% style="text-align:center" %) 594 +[[image:1760518162828-183.png]] 594 594 595 595 **Error code** 596 596 ... ... @@ -599,19 +599,18 @@ 599 599 |4086H|When the specified device range is written to exceed the corresponding device range 600 600 |4084H|When the value specified in (n) exceeds the range of 1 to 256 601 601 602 - 603 - 604 604 **Example** 605 605 606 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps168.jpg]] 605 +(% style="text-align:center" %) 606 +[[image:1760518190168-651.png]] 607 607 608 + 608 608 • 16-bit conversion mode (when SM161=OFF) 609 609 610 610 Convert the digits of the HEX code after the device specified in d100 into ASCII, and transfer to the upper and lower 8 bits (bytes) of the device specified in d200. When using in 16-bit conversion mode, SM161 should always be turned OFF. 611 611 613 +=== **HEX/ASCII → HEX Code Data Conversion** === 612 612 613 -=== **6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps169.png]]**9 HEX/ASCII → HEX Code Data Conversion** === 614 - 615 615 **HEX(P)** 616 616 617 617 After the device number specified in (s), the ASCII data stored in the number of characters specified in (n) is converted to HEX code, and then stored in the device number specified in (d) or later. ... ... @@ -657,8 +657,10 @@ 657 657 658 658 In the following program, the conversion will be performed in the following manner. 659 659 660 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps170.png]] 660 +(% style="text-align:center" %) 661 +[[image:1760518243532-544.png||height="136" width="579"]] 661 661 663 + 662 662 Transform the source data 663 663 664 664 |**(s)**|**ASCII data**|**HEX conversion** ... ... @@ -674,7 +674,8 @@ 674 674 675 675 Bit structure in the case of (n)=K4 676 676 677 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps171.jpg]] 679 +(% style="text-align:center" %) 680 +[[image:1760518318672-792.png]] 678 678 679 679 The number of characters specified and the conversion result becomes 0. 680 680 ... ... @@ -695,7 +695,8 @@ 695 695 696 696 In the following program, the conversion will be performed in the following manner. 697 697 698 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps172.jpg]] 701 +(% style="text-align:center" %) 702 +[[image:1760518359500-132.png]] 699 699 700 700 Transform the source data 701 701 ... ... @@ -712,7 +712,8 @@ 712 712 713 713 Bit structure in the case of (n)=K2 714 714 715 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps173.jpg]] 719 +(% style="text-align:center" %) 720 +[[image:1760518380601-932.png]] 716 716 717 717 The number of characters specified and the conversion result becomes 0. 718 718 ... ... @@ -731,15 +731,16 @@ 731 731 732 732 **Example** 733 733 734 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps174.jpg]] 739 +(% style="text-align:center" %) 740 +[[image:1760518408811-430.png||height="113" width="463"]] 735 735 742 + 736 736 After converting the ASCII data stored in the upper and lower 8 digits (bytes) of the device specified in (s) into HEX code, it transmits every 4 digits to the device specified in (d). The number of characters to be converted is specified in (n). 737 737 738 738 SM161 is shared with ASC, ASCI, BCC, CCD and CRC instructions. When using in 16-bit conversion mode, please always set SM161 to OFF. 739 739 747 +=== **CCD/Check Code** === 740 740 741 -=== **6.8**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps175.png]]**.10 CCD/Check Code** === 742 - 743 743 **CCD(P)** 744 744 745 745 Calculate the horizontal parity value and the sum check value of the error checking method used in communication and the like. In addition to these error checking methods, there are CRC (Cyclic ... ... @@ -787,11 +787,12 @@ 787 787 788 788 In the case of the following program, perform the conversion as shown below. 789 789 790 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps176.png]] [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps177.jpg]] 796 +(% style="text-align:center" %) 797 +[[image:1760518549836-396.png]] 791 791 792 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps178.jpg]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps179.png]] 793 793 794 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps180.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps181.jpg]] 800 +(% style="text-align:center" %) 801 +[[image:1760518595510-661.png]] 795 795 796 796 **(2) 8-bit conversion mode (when SM161=ON)** 797 797 ... ... @@ -803,12 +803,12 @@ 803 803 804 804 In the case of the following program, perform the conversion as shown below. 805 805 806 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps182.jpg]] 813 +(% style="text-align:center" %) 814 +[[image:1760518650396-504.png]] 807 807 808 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps183.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps184.jpg]] 816 +(% style="text-align:center" %) 817 +[[image:1760518681791-265.png]] 809 809 810 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps185.png]][[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps186.jpg]] 811 - 812 812 **Error code** 813 813 814 814 |**Error code**|**Content** ... ... @@ -818,15 +818,16 @@ 818 818 819 819 **Example** 820 820 821 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps187.jpg]] 828 +(% style="text-align:center" %) 829 +[[image:1760518721394-977.png]] 822 822 823 -Regarding D10 as the initial 10-point data, the addition data and horizontal parity data of the high and low 8-bit data are stored in the Devicess of D0 and D0+1. 824 824 832 +Regarding D10 as the initial 10-point data, the addition data and horizontal parity data of the high and low 8-bit data are stored in the Devices of D0 and D0+1. 833 + 825 825 SM161 is shared with ASC, ASCI, BCC, CCD and CRC instructions. When using in 16 bits, always set to OFF for use. 826 826 836 +=== **GBIN/Gray code → BIN 16-bit Data Conversion** === 827 827 828 -=== **6.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps188.png]]**8.11 GBIN/Gray code → BIN 16-bit Data Conversion** === 829 - 830 830 **GBIN(P)** 831 831 832 832 Convert the BIN 16-bit Gray code data stored in the device specified in (s) into BIN 16-bit data, and store it in the device specified in (d). ... ... @@ -858,7 +858,8 @@ 858 858 859 859 Convert the BIN 16-bit Gray code data stored in the device specified in (s) into BIN 16-bit data, and store it in the device specified in (d). 860 860 861 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps189.jpg]] 869 +(% style="text-align:center" %) 870 +[[image:1760518798409-907.png]] 862 862 863 863 GRY→BIN Mathematical Algorithm: Starting from the second bit from the left, XOR each bit with the decoded value of the left bit as the decoded value of the bit (the leftmost bit remains unchanged). 864 864 ... ... @@ -871,17 +871,16 @@ 871 871 872 872 **Example** 873 873 874 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps190.jpg]] 883 +(% style="text-align:center" %) 884 +[[image:1760518822792-557.png]] 875 875 876 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps191.jpg]] 877 877 878 878 It could be used when the encoder of Gray code method is used to detect the absolute position. 879 879 880 880 For S, the numerical are valid in the range of 0 to 32767. 881 881 891 +=== **DGBIN/Gray Code → BIN32-bit Data Conversion** === 882 882 883 -=== **6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps192.png]]**12 DGBIN/Gray Code → BIN32-bit Data Conversion** === 884 - 885 885 **DGBIN(P)** 886 886 887 887 Convert the BIN32-bit Gray code data stored in the device specified in (s) to BIN 32-bit data and store it in the device specified in (d). ... ... @@ -911,7 +911,8 @@ 911 911 912 912 Convert the BIN32-bit Gray code data stored in the device specified in (s) into BIN 32-bit data, and store it in the device specified in (d). 913 913 914 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps193.jpg]] 922 +(% style="text-align:center" %) 923 +[[image:1760518892993-298.png]] 915 915 916 916 (s)+1: high 16 bits 917 917 ... ... @@ -928,13 +928,11 @@ 928 928 929 929 **Example** 930 930 931 -[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps194.jpg]] 940 +(% style="text-align:center" %) 941 +[[image:1760518916894-252.png]] 932 932 933 - [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps195.jpg]]943 +=== **GRY/BIN 16-bit Data → Gray Code Conversion** === 934 934 935 - 936 -=== **6.8.**[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps196.png]]**13 GRY/BIN 16-bit Data → Gray Code Conversion** === 937 - 938 938 **GRY(P)** 939 939 940 940 After converting the BIN 16-bit data of the device specified in (s) to BIN 16-bit Gray code data, it is stored in the device specified in (d). ... ... @@ -966,7 +966,7 @@ 966 966 967 967 Convert the BIN 16-bit data specified in (s) into BIN 16-bit Gray code, and store it in the device specified in (d). 968 968 969 -[[image: file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml13456\wps197.jpg]]976 +[[image:1760518963231-603.png]] 970 970 971 971 BIN→GRY Mathematical Algorithm: Starting from the rightmost bit, XOR each bit with the left bit as the value corresponding to the GRY bit, and the leftmost bit remains unchanged (equivalent to 0 on the left) . 972 972
- 1760515828495-204.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +32.6 KB - Content
- 1760515993069-622.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +39.0 KB - Content
- 1760516200225-646.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +9.3 KB - Content
- 1760516268370-140.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +40.6 KB - Content
- 1760516329466-296.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +33.8 KB - Content
- 1760516369609-652.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.3 KB - Content
- 1760516454645-987.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +94.5 KB - Content
- 1760516560154-107.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +52.4 KB - Content
- 1760516760461-209.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +18.3 KB - Content
- 1760516821297-118.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.1 KB - Content
- 1760516859697-895.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +34.7 KB - Content
- 1760517173347-405.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +62.5 KB - Content
- 1760517259004-868.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +34.1 KB - Content
- 1760517298248-607.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.7 KB - Content
- 1760517373906-417.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +95.0 KB - Content
- 1760517421103-521.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +11.6 KB - Content
- 1760517499439-697.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +13.5 KB - Content
- 1760517525868-463.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +25.9 KB - Content
- 1760517594117-892.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +138.8 KB - Content
- 1760517675391-831.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +13.0 KB - Content
- 1760517745942-979.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.2 KB - Content
- 1760517809643-353.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.5 KB - Content
- 1760517879658-305.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +39.7 KB - Content
- 1760518002883-747.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +38.0 KB - Content
- 1760518024863-940.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +19.0 KB - Content
- 1760518067695-791.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +4.8 KB - Content
- 1760518128297-536.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +4.9 KB - Content
- 1760518162828-183.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +30.1 KB - Content
- 1760518190168-651.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +9.9 KB - Content
- 1760518243532-544.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +17.2 KB - Content
- 1760518318672-792.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.5 KB - Content
- 1760518359500-132.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.9 KB - Content
- 1760518380601-932.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +29.7 KB - Content
- 1760518408811-430.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +19.6 KB - Content
- 1760518549836-396.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.1 KB - Content
- 1760518595510-661.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +85.8 KB - Content
- 1760518650396-504.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +24.1 KB - Content
- 1760518681791-265.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +78.4 KB - Content
- 1760518721394-977.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.7 KB - Content
- 1760518798409-907.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +17.9 KB - Content
- 1760518822792-557.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +38.8 KB - Content
- 1760518892993-298.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +42.5 KB - Content
- 1760518916894-252.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +38.5 KB - Content
- 1760518963231-603.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Iris - Size
-
... ... @@ -1,0 +1,1 @@ 1 +28.8 KB - Content