userplc.txt 76.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\flash\obj\userplc.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\userplc.d --cpu=Cortex-M4.fp --apcs=interwork -O1 --diag_suppress=9931,870 -I..\..\Libraries\CMSIS\Include -I..\..\Libraries\CMSIS\Device\ST\STM32F4xx\Include -I..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\uCOS-III\uC-CPU -I..\..\uCOS-III\uC-LIB -I..\..\uCOS-III\uCOS-III\Ports -I..\..\uCOS-III\uCOS-III\Source -I..\..\uCOS-III\uC-CPU\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uC-LIB\Ports\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uCOS-III\Ports\ARM-Cortex-M4\Generic\RealView -I..\..\User -I..\..\User\bsp -I..\..\User\bsp\inc -I..\..\User\libapp -I..\..\RL-ARM\Config -I..\..\RL-ARM\Driver -I..\..\RL-ARM\RL-RTX\inc -I..\..\User\bsp\BSP -I..\..\RL-ARM\RL-CAN -I..\..\Libraries\DSP_LIB\Include -I..\..\MODBUS\modbus\rtu -I..\..\MODBUS\BARE\port -I..\..\MODBUS\modbus\include -I..\..\User\bsp\BSP -I..\..\PLC -I..\..\Avoid -I..\..\User\parameter -I..\..\User\LaserMotionCtr -I..\..\User\W5100S -I..\..\User\bsp -I.\RTE\_Flash -IC:\Users\软件部\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\软件部\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -D__UVISION_VERSION=527 -D_RTE_ -DSTM32F407xx -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -D__RTX -D__FPU_USED=1 --omf_browse=.\flash\obj\userplc.crf ..\..\User\parameter\userPLC.c]
                          THUMB

                          AREA ||i.BreakShortToTwoByte||, CODE, READONLY, ALIGN=1

                  BreakShortToTwoByte PROC
;;;91     
;;;92     void BreakShortToTwoByte(u16 *ShortBuffer, u16 Length, char *ByteBuffer)
000000  b570              PUSH     {r4-r6,lr}
;;;93     {
;;;94     	u16 i = 0, ii = 0;
000002  2300              MOVS     r3,#0
000004  2400              MOVS     r4,#0
000006  e00d              B        |L1.36|
                  |L1.8|
;;;95     	while (i < Length)
;;;96     	{
;;;97     		ByteBuffer[ii++] = ShortBuffer[i] >> 8;   
000008  f8305013          LDRH     r5,[r0,r3,LSL #1]
00000c  0a2e              LSRS     r6,r5,#8
00000e  1c65              ADDS     r5,r4,#1
000010  b2ad              UXTH     r5,r5
000012  5516              STRB     r6,[r2,r4]
;;;98     		ByteBuffer[ii++] = ShortBuffer[i++] & 0xff;  
000014  461c              MOV      r4,r3
000016  1c5b              ADDS     r3,r3,#1
000018  f8106014          LDRB     r6,[r0,r4,LSL #1]
00001c  1c6c              ADDS     r4,r5,#1
00001e  b29b              UXTH     r3,r3
000020  b2a4              UXTH     r4,r4
000022  5556              STRB     r6,[r2,r5]
                  |L1.36|
000024  428b              CMP      r3,r1                 ;95
000026  d3ef              BCC      |L1.8|
;;;99     	}
;;;100    }
000028  bd70              POP      {r4-r6,pc}
;;;101    
                          ENDP


                          AREA ||i.CombineTwoByteToOneShort||, CODE, READONLY, ALIGN=1

                  CombineTwoByteToOneShort PROC
;;;81     
;;;82     void CombineTwoByteToOneShort(u16 *ShortBuffer, u16 Length, char *ByteBuffer)
000000  b570              PUSH     {r4-r6,lr}
;;;83     {
;;;84     	u16 i = 0, ii = 0;
000002  2300              MOVS     r3,#0
000004  2400              MOVS     r4,#0
000006  e00b              B        |L2.32|
                  |L2.8|
;;;85     	while (i < Length)
;;;86     	{
;;;87     		ShortBuffer[i++] = ByteBuffer[ii] << 8 | ByteBuffer[ii + 1];
000008  1915              ADDS     r5,r2,r4
00000a  5d16              LDRB     r6,[r2,r4]
00000c  786d              LDRB     r5,[r5,#1]
00000e  ea452606          ORR      r6,r5,r6,LSL #8
000012  461d              MOV      r5,r3
000014  1c5b              ADDS     r3,r3,#1
000016  b29b              UXTH     r3,r3
000018  f8206015          STRH     r6,[r0,r5,LSL #1]
;;;88     		ii += 2;
00001c  1ca4              ADDS     r4,r4,#2
00001e  b2a4              UXTH     r4,r4
                  |L2.32|
000020  428b              CMP      r3,r1                 ;85
000022  d3f1              BCC      |L2.8|
;;;89     	}
;;;90     }
000024  bd70              POP      {r4-r6,pc}
;;;91     
                          ENDP


                          AREA ||i.FindTable||, CODE, READONLY, ALIGN=2

                  FindTable PROC
;;;35     
;;;36     short FindTable(u8 Num)
000000  b510              PUSH     {r4,lr}
;;;37     {
000002  b088              SUB      sp,sp,#0x20
000004  4604              MOV      r4,r0
;;;38     	short Table[16] =
000006  2220              MOVS     r2,#0x20
000008  4904              LDR      r1,|L3.28|
00000a  4668              MOV      r0,sp
00000c  f7fffffe          BL       __aeabi_memcpy4
;;;39     	{
;;;40     		0x1,	0x3,	0x7,	0xF,
;;;41     		0x1F,	0x3F,	0x7F,	0xFF,
;;;42     		0x1FF,	0x3FF,	0x7FF,	0xFFF,
;;;43     		0x1FFF,	0x3FFF,	0x7FFF,	0xFFFF
;;;44     	};
;;;45     	return 	Table[Num-1];
000010  1e64              SUBS     r4,r4,#1
000012  f93d0014          LDRSH    r0,[sp,r4,LSL #1]
;;;46     }
000016  b008              ADD      sp,sp,#0x20
000018  bd10              POP      {r4,pc}
;;;47     
                          ENDP

00001a  0000              DCW      0x0000
                  |L3.28|
                          DCD      ||.constdata||

                          AREA ||i.GetShortBit||, CODE, READONLY, ALIGN=1

                  GetShortBit PROC
;;;49     /*获取一个u16的任意bit位*/
;;;50     u8 GetShortBit(u16 src,u8 bit)
000000  290f              CMP      r1,#0xf
;;;51     {
000002  d901              BLS      |L4.8|
;;;52     	if(bit > 15)
;;;53     	{
;;;54     		return 2;          //代表错误
000004  2002              MOVS     r0,#2
;;;55     	}
;;;56         if((src & (1<< bit))> 0)
;;;57         {
;;;58             return 1;
;;;59         }
;;;60         else
;;;61         {
;;;62             return 0;
;;;63         }
;;;64     }
000006  4770              BX       lr
                  |L4.8|
000008  2201              MOVS     r2,#1                 ;56
00000a  408a              LSLS     r2,r2,r1              ;56
00000c  4202              TST      r2,r0                 ;56
00000e  d001              BEQ      |L4.20|
000010  2001              MOVS     r0,#1                 ;58
000012  4770              BX       lr
                  |L4.20|
000014  2000              MOVS     r0,#0                 ;62
000016  4770              BX       lr
;;;65     
                          ENDP


                          AREA ||i.GetshortAtWillBit||, CODE, READONLY, ALIGN=1

                  GetshortAtWillBit PROC
;;;66     /*获取一个short任意的bit位和任意长度*/
;;;67     short GetshortAtWillBit(u16 Src, u8 StartBit, u8 Length)
000000  b570              PUSH     {r4-r6,lr}
;;;68     {
000002  4605              MOV      r5,r0
000004  460c              MOV      r4,r1
000006  4610              MOV      r0,r2
;;;69     	short Value = 0;
;;;70     	if(StartBit > 16 - Length)
000008  f1c00110          RSB      r1,r0,#0x10
00000c  42a1              CMP      r1,r4
00000e  da02              BGE      |L5.22|
;;;71     	{
;;;72     		return -1;          //代表错误
000010  f04f30ff          MOV      r0,#0xffffffff
;;;73     	}
;;;74     	/*获取表中位与值*/
;;;75     	Value = FindTable(Length);
;;;76     	/*将Value值左移Startbit位*/
;;;77     	Value = Value << StartBit;
;;;78     	//然后与我们的目标传进来的位与,得到结果右移StartBit位
;;;79     	return (Src & Value) >>StartBit;
;;;80     }
000014  bd70              POP      {r4-r6,pc}
                  |L5.22|
000016  f7fffffe          BL       FindTable
00001a  40a0              LSLS     r0,r0,r4              ;77
00001c  b200              SXTH     r0,r0                 ;77
00001e  4005              ANDS     r5,r5,r0              ;79
000020  40e5              LSRS     r5,r5,r4              ;79
000022  b228              SXTH     r0,r5                 ;79
000024  bd70              POP      {r4-r6,pc}
;;;81     
                          ENDP


                          AREA ||i.ResetDataFromHolding||, CODE, READONLY, ALIGN=1

                  ResetDataFromHolding PROC
;;;101    
;;;102    void ResetDataFromHolding(agvHandlePlcData *HandlePlcData)
000000  4770              BX       lr
;;;103    {
;;;104    
;;;105    }
;;;106    
                          ENDP


                          AREA ||i.ScreenSaveFunction||, CODE, READONLY, ALIGN=2

                  ScreenSaveFunction PROC
;;;459    //屏幕保存
;;;460    void ScreenSaveFunction()
000000  b510              PUSH     {r4,lr}
;;;461    {
;;;462    	static unsigned char flagSave = 1,CurScreen = 0,LastScreen = 0;
;;;463    	
;;;464    	CurScreen = HandlePlcData.RecvPlcData.ScreenSaveSignal;
000002  4810              LDR      r0,|L7.68|
000004  4c10              LDR      r4,|L7.72|
000006  f8900054          LDRB     r0,[r0,#0x54]  ; HandlePlcData
00000a  7060              STRB     r0,[r4,#1]
;;;465    	
;;;466    	
;;;467    	if((CurScreen == 1) && (LastScreen == 0))
00000c  2801              CMP      r0,#1
00000e  d103              BNE      |L7.24|
000010  78a1              LDRB     r1,[r4,#2]  ; LastScreen
000012  b909              CBNZ     r1,|L7.24|
;;;468    	{
;;;469    		flagSave = 1;
000014  2101              MOVS     r1,#1
000016  7021              STRB     r1,[r4,#0]
                  |L7.24|
;;;470    	}
;;;471    	LastScreen = CurScreen;
000018  70a0              STRB     r0,[r4,#2]
;;;472    	
;;;473    	
;;;474    	if((HandlePlcData.RecvPlcData.ScreenSaveSignal) && flagSave)
00001a  2800              CMP      r0,#0
00001c  d010              BEQ      |L7.64|
00001e  7820              LDRB     r0,[r4,#0]  ; flagSave
000020  2800              CMP      r0,#0
000022  d00d              BEQ      |L7.64|
;;;475    	{
;;;476    		PowerOff_ClearFlash();			
000024  f7fffffe          BL       PowerOff_ClearFlash
;;;477    		Uart_Printf(COM1,"CLEAR----FLASH\r\n");
000028  a108              ADR      r1,|L7.76|
00002a  2001              MOVS     r0,#1
00002c  f7fffffe          BL       Uart_Printf
;;;478    		PowerOff_WriteFlash();
000030  f7fffffe          BL       PowerOff_WriteFlash
;;;479    		Uart_Printf(COM1,"WRITE----FLASH\r\n");		
000034  a10a              ADR      r1,|L7.96|
000036  2001              MOVS     r0,#1
000038  f7fffffe          BL       Uart_Printf
;;;480    //		PowerOn_ReadFlash();
;;;481    //		Uart_Printf(COM1,"READ----FLASH\r\n");
;;;482    //		HandlePlcData.SendPlcData.ScreenSaveAck = 1;
;;;483    		flagSave = 0;	
00003c  2000              MOVS     r0,#0
00003e  7020              STRB     r0,[r4,#0]
                  |L7.64|
;;;484    	}
;;;485    //	else if(HandlePlcData.RecvPlcData.ScreenSaveSignal == 0)HandlePlcData.SendPlcData.ScreenSaveAck = 0;
;;;486    }
000040  bd10              POP      {r4,pc}
;;;487    
                          ENDP

000042  0000              DCW      0x0000
                  |L7.68|
                          DCD      ||.bss||+0x4b0
                  |L7.72|
                          DCD      ||.data||
                  |L7.76|
00004c  434c4541          DCB      "CLEAR----FLASH\r\n",0
000050  522d2d2d
000054  2d464c41
000058  53480d0a
00005c  00      
00005d  00                DCB      0
00005e  00                DCB      0
00005f  00                DCB      0
                  |L7.96|
000060  57524954          DCB      "WRITE----FLASH\r\n",0
000064  452d2d2d
000068  2d464c41
00006c  53480d0a
000070  00      
000071  00                DCB      0
000072  00                DCB      0
000073  00                DCB      0

                          AREA ||i.SpiW5100sInit||, CODE, READONLY, ALIGN=2

                  SpiW5100sInit PROC
;;;15     
;;;16     void SpiW5100sInit()
000000  b510              PUSH     {r4,lr}
;;;17     {
;;;18     	reset_w5100s();                       // W5100S硬件复位 
000002  f7fffffe          BL       reset_w5100s
;;;19     
;;;20     	PHY_check();                          // 网线检测程序  检测PHYSR是否连接上 若未连接 则等待直到连接上
000006  f7fffffe          BL       PHY_check
;;;21     
;;;22     	set_w5100s_mac();                     // 设置W5100SMAC地址
00000a  f7fffffe          BL       set_w5100s_mac
;;;23     
;;;24     	set_w5100s_netinfo();                 // 设置W5100S网络参数
00000e  f7fffffe          BL       set_w5100s_netinfo
;;;25     
;;;26     	wizchip_init(txsize,rxsize);          // 初始化4个Socket的发送接收缓存大小 将设定值写入发送和接收缓存寄存器
000012  e8bd4010          POP      {r4,lr}
000016  4902              LDR      r1,|L8.32|
000018  4802              LDR      r0,|L8.36|
00001a  f7ffbffe          B.W      wizchip_init
;;;27     //	Uart_Printf(COM1,"\r\nW5100S为TCP 服务器,建立侦听。等待PC作为 TCP Client 建立连接。\r\n");
;;;28     //	Uart_Printf(COM1,"服务器IP:%d.%d.%d.%d。\r\n",local_ip[0],local_ip[1],local_ip[2],local_ip[3]);
;;;29     //	Uart_Printf(COM1,"监听端口:%d。\r\n",local_port);
;;;30     //	Uart_Printf(COM1,"正常现象:连接成功,TCP Client 发送数据给W5100S,W5100S将返回对应数据。\r\n");
;;;31     
;;;32     }
;;;33     
                          ENDP

00001e  0000              DCW      0x0000
                  |L8.32|
                          DCD      rxsize
                  |L8.36|
                          DCD      txsize

                          AREA ||i.UpdateDataFromHolding||, CODE, READONLY, ALIGN=2

                  UpdateDataFromHolding PROC
;;;107    extern int PinYI_X,PinYI_Y;
;;;108    void UpdateDataFromHolding(agvHandlePlcData *HandlePlcData)
000000  b570              PUSH     {r4-r6,lr}
;;;109    {
000002  4604              MOV      r4,r0
;;;110    	HandlePlcData->RecvPlcData.FirstWheelSetSpeed 				= (short)DataFromPLC[0];
000004  4dc2              LDR      r5,|L9.784|
000006  341c              ADDS     r4,r4,#0x1c
000008  8828              LDRH     r0,[r5,#0]  ; DataFromPLC
00000a  f8240c1c          STRH     r0,[r4,#-0x1c]
;;;111    	HandlePlcData->RecvPlcData.SecondWheelSetSpeed 				= (short)DataFromPLC[1];
00000e  8868              LDRH     r0,[r5,#2]  ; DataFromPLC
000010  f8240c1a          STRH     r0,[r4,#-0x1a]
;;;112    	
;;;113    	//Uart_Printf(COM1,"速度=%d\r\n",HandlePlcData->RecvPlcData.FirstWheelSetSpeed);
;;;114    	HandlePlcData->RecvPlcData.ThirdWheelSetSpeed 				= (short)DataFromPLC[2];
000014  88a8              LDRH     r0,[r5,#4]  ; DataFromPLC
000016  f8240c18          STRH     r0,[r4,#-0x18]
;;;115    	HandlePlcData->RecvPlcData.FourthWheelSetSpeed				= (short)DataFromPLC[3];
00001a  88e8              LDRH     r0,[r5,#6]  ; DataFromPLC
00001c  f8240c16          STRH     r0,[r4,#-0x16]
;;;116    	
;;;117    	HandlePlcData->RecvPlcData.FirstWheelTarAngle 				= (float)DataFromPLC[4] / 100.0f;
000020  8928              LDRH     r0,[r5,#8]  ; DataFromPLC
000022  ee000a10          VMOV     s0,r0
000026  eef80a40          VCVT.F32.U32 s1,s0
00002a  ed9f0aba          VLDR     s0,|L9.788|
00002e  ee801a80          VDIV.F32 s2,s1,s0
000032  ed041a05          VSTR     s2,[r4,#-0x14]
;;;118    	HandlePlcData->RecvPlcData.SecondWheelTarAngle 				= (float)DataFromPLC[5] / 100.0f;
000036  8968              LDRH     r0,[r5,#0xa]  ; DataFromPLC
000038  ee000a90          VMOV     s1,r0
00003c  eef80a60          VCVT.F32.U32 s1,s1
000040  ee801a80          VDIV.F32 s2,s1,s0
000044  ed041a04          VSTR     s2,[r4,#-0x10]
;;;119    	HandlePlcData->RecvPlcData.ThirdWheelTarAngle 				= (float)DataFromPLC[6] / 100.0f;
000048  89a8              LDRH     r0,[r5,#0xc]  ; DataFromPLC
00004a  ee000a90          VMOV     s1,r0
00004e  eef80a60          VCVT.F32.U32 s1,s1
000052  ee801a80          VDIV.F32 s2,s1,s0
000056  ed041a03          VSTR     s2,[r4,#-0xc]
;;;120    	HandlePlcData->RecvPlcData.FourthWheelTarAngle				= (float)DataFromPLC[7] / 100.0f;
00005a  89e8              LDRH     r0,[r5,#0xe]  ; DataFromPLC
00005c  ee000a90          VMOV     s1,r0
000060  eef80a60          VCVT.F32.U32 s1,s1
000064  ee801a80          VDIV.F32 s2,s1,s0
000068  ed041a02          VSTR     s2,[r4,#-8]
;;;121    
;;;122    //	Uart_Printf(COM1,"%d	%d	%f	%f\r\n",
;;;123    //	HandlePlcData->RecvPlcData.FirstWheelSetSpeed,HandlePlcData->RecvPlcData.SecondWheelSetSpeed,
;;;124    //	HandlePlcData->RecvPlcData.FirstWheelTarAngle,HandlePlcData->RecvPlcData.SecondWheelTarAngle);
;;;125    
;;;126    	HandlePlcData->RecvPlcData.FirstLiftSetSpeed 				= (short)DataFromPLC[8];
00006c  8a28              LDRH     r0,[r5,#0x10]  ; DataFromPLC
00006e  f8240c04          STRH     r0,[r4,#-4]
;;;127    	HandlePlcData->RecvPlcData.SecondLiftSetSpeed 				= (short)DataFromPLC[9];
000072  8a68              LDRH     r0,[r5,#0x12]  ; DataFromPLC
000074  f8240c02          STRH     r0,[r4,#-2]
;;;128    //	Uart_Printf(COM1,"举升速度=%d	%d\r\n",HandlePlcData->RecvPlcData.FirstLiftSetSpeed,HandlePlcData->RecvPlcData.SecondLiftSetSpeed);
;;;129    
;;;130    	HandlePlcData->RecvPlcData.ThirdLiftSetSpeed 				= (short)DataFromPLC[10];
000078  8aa8              LDRH     r0,[r5,#0x14]  ; DataFromPLC
00007a  8020              STRH     r0,[r4,#0]
;;;131    	HandlePlcData->RecvPlcData.FourthLiftSetSpeed				= (short)DataFromPLC[11];
00007c  8ae8              LDRH     r0,[r5,#0x16]  ; DataFromPLC
00007e  8060              STRH     r0,[r4,#2]
;;;132    
;;;133    	HandlePlcData->RecvPlcData.FrontWheelAcDis					= (DataFromPLC[12]&0XFFFF) | ((DataFromPLC[13] << 16)&0XFFFF0000);
000080  8b28              LDRH     r0,[r5,#0x18]  ; DataFromPLC
000082  8b69              LDRH     r1,[r5,#0x1a]  ; DataFromPLC
000084  eac04001          PKHBT    r0,r0,r1,LSL #16
000088  6060              STR      r0,[r4,#4]
;;;134    	HandlePlcData->RecvPlcData.BackWheelAcDis 					= (DataFromPLC[14]&0XFFFF) | ((DataFromPLC[15] << 16)&0XFFFF0000);		
00008a  8ba8              LDRH     r0,[r5,#0x1c]  ; DataFromPLC
00008c  8be9              LDRH     r1,[r5,#0x1e]  ; DataFromPLC
00008e  eac04001          PKHBT    r0,r0,r1,LSL #16
000092  60a0              STR      r0,[r4,#8]
;;;135    	
;;;136    	HandlePlcData->RecvPlcData.AgvSetSpeed						= (short)DataFromPLC[16];
000094  8c28              LDRH     r0,[r5,#0x20]  ; DataFromPLC
000096  81a0              STRH     r0,[r4,#0xc]
;;;137    	HandlePlcData->RecvPlcData.TurnningSetAngle					= (float)DataFromPLC[17] / 100.0f;
000098  8c68              LDRH     r0,[r5,#0x22]  ; DataFromPLC
00009a  ee000a90          VMOV     s1,r0
00009e  eef80a60          VCVT.F32.U32 s1,s1
0000a2  ee801a80          VDIV.F32 s2,s1,s0
0000a6  ed841a04          VSTR     s2,[r4,#0x10]
;;;138    	HandlePlcData->RecvPlcData.TurnningSetRadius				= (short)DataFromPLC[18];
0000aa  8ca8              LDRH     r0,[r5,#0x24]  ; DataFromPLC
0000ac  82a0              STRH     r0,[r4,#0x14]
;;;139    	
;;;140    	HandlePlcData->RecvPlcData.Heartbeat						= GetShortBit(DataFromPLC[19],0);		
0000ae  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000b0  2100              MOVS     r1,#0
0000b2  f7fffffe          BL       GetShortBit
0000b6  75a0              STRB     r0,[r4,#0x16]
;;;141    	HandlePlcData->SendPlcData.Heartbeat = HandlePlcData->RecvPlcData.Heartbeat;
0000b8  f88400dd          STRB     r0,[r4,#0xdd]
;;;142    	
;;;143    	//Uart_Printf(COM1,"heartbeat=%d	%d\r\n",HandlePlcData->RecvPlcData.Heartbeat,HandlePlcData->SendPlcData.Heartbeat);
;;;144    	HandlePlcData->RecvPlcData.agvMoveMode						= GetshortAtWillBit(DataFromPLC[19],1,3);
0000bc  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000be  2203              MOVS     r2,#3
0000c0  2101              MOVS     r1,#1
0000c2  f7fffffe          BL       GetshortAtWillBit
0000c6  75e0              STRB     r0,[r4,#0x17]
;;;145    	HandlePlcData->RecvPlcData.FrontForkedRoadSelect			= GetShortBit(DataFromPLC[19],4);	
0000c8  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000ca  2104              MOVS     r1,#4
0000cc  f7fffffe          BL       GetShortBit
0000d0  7620              STRB     r0,[r4,#0x18]
;;;146    	HandlePlcData->RecvPlcData.BackForkedRoadSelect				= GetShortBit(DataFromPLC[19],5);	
0000d2  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000d4  2105              MOVS     r1,#5
0000d6  f7fffffe          BL       GetShortBit
0000da  7660              STRB     r0,[r4,#0x19]
;;;147    	HandlePlcData->RecvPlcData.FreeMode							= GetshortAtWillBit(DataFromPLC[19],6,4);
0000dc  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000de  2204              MOVS     r2,#4
0000e0  2106              MOVS     r1,#6
0000e2  f7fffffe          BL       GetshortAtWillBit
0000e6  76a0              STRB     r0,[r4,#0x1a]
;;;148    	HandlePlcData->RecvPlcData.QuiteStopSignal					= GetShortBit(DataFromPLC[19],10);	
0000e8  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000ea  210a              MOVS     r1,#0xa
0000ec  f7fffffe          BL       GetShortBit
0000f0  76e0              STRB     r0,[r4,#0x1b]
;;;149    	HandlePlcData->RecvPlcData.LiftFirstClearSigna				= GetShortBit(DataFromPLC[19],11);	
0000f2  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000f4  210b              MOVS     r1,#0xb
0000f6  f7fffffe          BL       GetShortBit
0000fa  7720              STRB     r0,[r4,#0x1c]
;;;150    	HandlePlcData->RecvPlcData.LiftSecondClearSignal			= GetShortBit(DataFromPLC[19],12);	
0000fc  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
0000fe  210c              MOVS     r1,#0xc
000100  f7fffffe          BL       GetShortBit
000104  7760              STRB     r0,[r4,#0x1d]
;;;151    	HandlePlcData->RecvPlcData.LiftThirdClearSignal				= GetShortBit(DataFromPLC[19],13);	
000106  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
000108  210d              MOVS     r1,#0xd
00010a  f7fffffe          BL       GetShortBit
00010e  77a0              STRB     r0,[r4,#0x1e]
;;;152    	HandlePlcData->RecvPlcData.LiftFourthClearSignal			= GetShortBit(DataFromPLC[19],14);	
000110  8ce8              LDRH     r0,[r5,#0x26]  ; DataFromPLC
000112  210e              MOVS     r1,#0xe
000114  f7fffffe          BL       GetShortBit
000118  77e0              STRB     r0,[r4,#0x1f]
;;;153    
;;;154     	HandlePlcData->RecvPlcData.ManualAutomaticSignal			= GetShortBit(DataFromPLC[20],0);
00011a  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
00011c  2100              MOVS     r1,#0
00011e  f7fffffe          BL       GetShortBit
000122  f8840030          STRB     r0,[r4,#0x30]
;;;155    	HandlePlcData->RecvPlcData.agvstart						    = GetShortBit(DataFromPLC[20],1);
000126  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
000128  2101              MOVS     r1,#1
00012a  f7fffffe          BL       GetShortBit
00012e  f8840031          STRB     r0,[r4,#0x31]
;;;156    //	HandlePlcData->RecvPlcData.ScreenSaveSignal					= GetShortBit(DataFromPLC[20],2);
;;;157    	HandlePlcData->RecvPlcData.ClearSiteAction					= GetShortBit(DataFromPLC[20],2);
000132  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
000134  2102              MOVS     r1,#2
000136  f7fffffe          BL       GetShortBit
00013a  f8840039          STRB     r0,[r4,#0x39]
;;;158    	
;;;159    //	Uart_Printf(COM1,"clear=%d\r\n",HandlePlcData->RecvPlcData.ClearSiteAction);
;;;160    	HandlePlcData->RecvPlcData.NavcitionMode					= GetshortAtWillBit(DataFromPLC[20],3,2);
00013e  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
000140  2202              MOVS     r2,#2
000142  2103              MOVS     r1,#3
000144  f7fffffe          BL       GetshortAtWillBit
000148  f8840032          STRB     r0,[r4,#0x32]
;;;161    	HandlePlcData->RecvPlcData.StraightLineSwitchTranslation	= GetShortBit(DataFromPLC[20],7);
00014c  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
00014e  2107              MOVS     r1,#7
000150  f7fffffe          BL       GetShortBit
000154  f884003b          STRB     r0,[r4,#0x3b]
;;;162    	HandlePlcData->RecvPlcData.LastSiteSignal					= GetShortBit(DataFromPLC[20],9);
000158  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
00015a  2109              MOVS     r1,#9
00015c  f7fffffe          BL       GetShortBit
000160  f884003a          STRB     r0,[r4,#0x3a]
;;;163    	HandlePlcData->RecvPlcData.agvChargeSignal					= GetShortBit(DataFromPLC[20],10);
000164  8d28              LDRH     r0,[r5,#0x28]  ; DataFromPLC
000166  210a              MOVS     r1,#0xa
000168  f7fffffe          BL       GetShortBit
00016c  f8840020          STRB     r0,[r4,#0x20]
;;;164    
;;;165    	HandlePlcData->RecvPlcData.Direction						= DataFromPLC[21];
000170  f895002a          LDRB     r0,[r5,#0x2a]  ; DataFromPLC
000174  f8840061          STRB     r0,[r4,#0x61]
;;;166    	HandlePlcData->RecvPlcData.ChangeMap						= DataFromPLC[22];
000178  8da8              LDRH     r0,[r5,#0x2c]  ; DataFromPLC
00017a  6360              STR      r0,[r4,#0x34]
;;;167    	
;;;168    	
;;;169    	HandlePlcData->RecvPlcData.RadarSignal					= GetshortAtWillBit(DataFromPLC[24],0,2);
00017c  8e28              LDRH     r0,[r5,#0x30]  ; DataFromPLC
00017e  2202              MOVS     r2,#2
000180  2100              MOVS     r1,#0
000182  f7fffffe          BL       GetshortAtWillBit
000186  f884003c          STRB     r0,[r4,#0x3c]
;;;170    	HandlePlcData->RecvPlcData.RadarDecSpeed				= (short)DataFromPLC[25];
00018a  8e68              LDRH     r0,[r5,#0x32]  ; DataFromPLC
00018c  87e0              STRH     r0,[r4,#0x3e]
;;;171    	//PLC下发保存的举升高度22
;;;172    	//屏幕 //可变参数
;;;173    	HandlePlcData->RecvPlcData.P				= (float)DataFromPLC[41] / 1000.0f;
00018e  f8350f52          LDRH     r0,[r5,#0x52]!  ; DataFromPLC
000192  ee000a10          VMOV     s0,r0
000196  eeb81a40          VCVT.F32.U32 s2,s0
00019a  ed9f0a5f          VLDR     s0,|L9.792|
00019e  eec10a00          VDIV.F32 s1,s2,s0
0001a2  edc40a15          VSTR     s1,[r4,#0x54]
;;;174    	HandlePlcData->RecvPlcData.I				= (float)DataFromPLC[42];
0001a6  8868              LDRH     r0,[r5,#2]  ; DataFromPLC
0001a8  ee000a10          VMOV     s0,r0
0001ac  eeb80a40          VCVT.F32.U32 s0,s0
0001b0  ed840a16          VSTR     s0,[r4,#0x58]
;;;175    	HandlePlcData->RecvPlcData.D				= (float)DataFromPLC[43];
0001b4  88a8              LDRH     r0,[r5,#4]  ; DataFromPLC
0001b6  ee000a10          VMOV     s0,r0
0001ba  eeb80a40          VCVT.F32.U32 s0,s0
0001be  ed840a17          VSTR     s0,[r4,#0x5c]
;;;176    	
;;;177    	HandlePlcData->RecvPlcData.agv_X_offset		= (float)DataFromPLC[55] - 5000.0f;
0001c2  8ba8              LDRH     r0,[r5,#0x1c]  ; DataFromPLC
0001c4  ee000a10          VMOV     s0,r0
0001c8  eeb80a40          VCVT.F32.U32 s0,s0
0001cc  eddf0a53          VLDR     s1,|L9.796|
0001d0  ee300a60          VSUB.F32 s0,s0,s1
0001d4  ed840a09          VSTR     s0,[r4,#0x24]
0001d8  3c1c              SUBS     r4,r4,#0x1c
;;;178    	if(DataFromPLC[55] == 0)HandlePlcData->RecvPlcData.agv_X_offset = 0;
0001da  8ba8              LDRH     r0,[r5,#0x1c]  ; DataFromPLC
0001dc  3d52              SUBS     r5,r5,#0x52
0001de  ed9f0a50          VLDR     s0,|L9.800|
0001e2  b908              CBNZ     r0,|L9.488|
0001e4  ed840a10          VSTR     s0,[r4,#0x40]
                  |L9.488|
;;;179    
;;;180    	HandlePlcData->RecvPlcData.agv_Y_offset		= (float)DataFromPLC[56] - 5000.0f;
0001e8  f8b50070          LDRH     r0,[r5,#0x70]  ; DataFromPLC
0001ec  ee010a10          VMOV     s2,r0
0001f0  eeb81a41          VCVT.F32.U32 s2,s2
0001f4  ee311a60          VSUB.F32 s2,s2,s1
0001f8  ed841a11          VSTR     s2,[r4,#0x44]
;;;181    	if(DataFromPLC[56] == 0)HandlePlcData->RecvPlcData.agv_Y_offset = 0;
0001fc  f8b50070          LDRH     r0,[r5,#0x70]  ; DataFromPLC
000200  b908              CBNZ     r0,|L9.518|
000202  ed840a11          VSTR     s0,[r4,#0x44]
                  |L9.518|
;;;182    	
;;;183    	HandlePlcData->RecvPlcData.agv_W_offset		= ((float)DataFromPLC[57] - 5000.0f);
000206  f8b50072          LDRH     r0,[r5,#0x72]  ; DataFromPLC
00020a  ee010a10          VMOV     s2,r0
00020e  eeb81a41          VCVT.F32.U32 s2,s2
000212  ee710a60          VSUB.F32 s1,s2,s1
000216  edc40a12          VSTR     s1,[r4,#0x48]
;;;184    	if(DataFromPLC[57] == 0)HandlePlcData->RecvPlcData.agv_W_offset = 0;
00021a  f8b50072          LDRH     r0,[r5,#0x72]  ; DataFromPLC
00021e  b908              CBNZ     r0,|L9.548|
000220  ed840a12          VSTR     s0,[r4,#0x48]
                  |L9.548|
;;;185    
;;;186    	//调度
;;;187    	HandlePlcData->RecvPlcData.FirstSerialNumber				= DataFromPLC[164];
000224  f9b50148          LDRSH    r0,[r5,#0x148]  ; DataFromPLC
000228  f8a40084          STRH     r0,[r4,#0x84]
;;;188    	
;;;189    	//Uart_Printf(COM1,"HandlePlcData->RecvPlcData.FirstSerialNumber=%d	%d\r\n",HandlePlcData->RecvPlcData.FirstSerialNumber,HandlePlcData->RecvPlcData.SecondSerialNumber);
;;;190    	if(HandlePlcData->RecvPlcData.FirstSerialNumber == 0)
00022c  2600              MOVS     r6,#0
00022e  b3e8              CBZ      r0,|L9.684|
;;;191    	{
;;;192    		HandlePlcData->RecvPlcData.CurSite							= 0;//DataFromPLC[165];
;;;193    		HandlePlcData->RecvPlcData.CurDirection						= 0;//GetshortAtWillBit(DataFromPLC[166],0,4);
;;;194    		HandlePlcData->RecvPlcData.CurAgvSpeed						= 0;//GetshortAtWillBit(DataFromPLC[166],4,12);
;;;195    		HandlePlcData->RecvPlcData.X1								= 0;//DataFromPLC[167] & 0XFFFF) | ((DataFromPLC[168] << 16) & 0XFFFF0000);
;;;196    		HandlePlcData->RecvPlcData.Y1								= 0;//(DataFromPLC[169] & 0XFFFF) | ((DataFromPLC[170] << 16) & 0XFFFF0000);
;;;197    		HandlePlcData->RecvPlcData.NextSite							= 0;//DataFromPLC[171];
;;;198    		HandlePlcData->RecvPlcData.X2								= 0;//(DataFromPLC[172] & 0XFFFF) | ((DataFromPLC[173] << 16) & 0XFFFF0000);
;;;199    		HandlePlcData->RecvPlcData.Y2								= 0;//(DataFromPLC[174] & 0XFFFF) | ((DataFromPLC[175] << 16) & 0XFFFF0000);
;;;200    		HandlePlcData->RecvPlcData.X3								= 0;//(DataFromPLC[176] & 0XFFFF) | ((DataFromPLC[177] << 16) & 0XFFFF0000);
;;;201    		HandlePlcData->RecvPlcData.Y3								= 0;//(DataFromPLC[178] & 0XFFFF) | ((DataFromPLC[179] << 16) & 0XFFFF0000);
;;;202    		HandlePlcData->RecvPlcData.SecondSerialNumber				= 0;//GetshortAtWillBit(DataFromPLC[180],0,8);
;;;203    		HandlePlcData->RecvPlcData.ThirdSerialNumber				= 0;//GetshortAtWillBit(DataFromPLC[180],8,8);	
;;;204    		HandlePlcData->RecvPlcData.NextDirection					= 0;
;;;205    		HandlePlcData->RecvPlcData.OperationMode					= 0;//DataFromPLC[182];
;;;206    	}
;;;207    	else
;;;208    	{
;;;209    		HandlePlcData->RecvPlcData.CurSite							= DataFromPLC[165];
000230  f50575a5          ADD      r5,r5,#0x14a
000234  8828              LDRH     r0,[r5,#0]  ; DataFromPLC
000236  f8240f80          STRH     r0,[r4,#0x80]!
;;;210    		HandlePlcData->RecvPlcData.CurDirection						= GetshortAtWillBit(DataFromPLC[166],0,4);
00023a  8868              LDRH     r0,[r5,#2]  ; DataFromPLC
00023c  2204              MOVS     r2,#4
00023e  2100              MOVS     r1,#0
000240  f7fffffe          BL       GetshortAtWillBit
000244  81a0              STRH     r0,[r4,#0xc]
;;;211    		HandlePlcData->RecvPlcData.CurAgvSpeed						= GetshortAtWillBit(DataFromPLC[166],4,12);
000246  8868              LDRH     r0,[r5,#2]  ; DataFromPLC
000248  220c              MOVS     r2,#0xc
00024a  2104              MOVS     r1,#4
00024c  f7fffffe          BL       GetshortAtWillBit
000250  8160              STRH     r0,[r4,#0xa]
;;;212    		HandlePlcData->RecvPlcData.X1								= (DataFromPLC[167] & 0XFFFF) | ((DataFromPLC[168] << 16) & 0XFFFF0000);
000252  88a8              LDRH     r0,[r5,#4]  ; DataFromPLC
000254  88e9              LDRH     r1,[r5,#6]  ; DataFromPLC
000256  eac04001          PKHBT    r0,r0,r1,LSL #16
00025a  6120              STR      r0,[r4,#0x10]
;;;213    		HandlePlcData->RecvPlcData.Y1								= (DataFromPLC[169] & 0XFFFF) | ((DataFromPLC[170] << 16) & 0XFFFF0000);
00025c  8928              LDRH     r0,[r5,#8]  ; DataFromPLC
00025e  8969              LDRH     r1,[r5,#0xa]  ; DataFromPLC
000260  eac04001          PKHBT    r0,r0,r1,LSL #16
000264  6160              STR      r0,[r4,#0x14]
;;;214    		HandlePlcData->RecvPlcData.NextSite							= DataFromPLC[171];
000266  89a8              LDRH     r0,[r5,#0xc]  ; DataFromPLC
000268  f5a575a5          SUB      r5,r5,#0x14a
00026c  8060              STRH     r0,[r4,#2]
;;;215    		HandlePlcData->RecvPlcData.X2								= (DataFromPLC[172] & 0XFFFF) | ((DataFromPLC[173] << 16) & 0XFFFF0000);
00026e  f50575ac          ADD      r5,r5,#0x158
000272  8828              LDRH     r0,[r5,#0]  ; DataFromPLC
000274  8869              LDRH     r1,[r5,#2]  ; DataFromPLC
000276  eac04001          PKHBT    r0,r0,r1,LSL #16
00027a  61a0              STR      r0,[r4,#0x18]
;;;216    		HandlePlcData->RecvPlcData.Y2								= (DataFromPLC[174] & 0XFFFF) | ((DataFromPLC[175] << 16) & 0XFFFF0000);
00027c  88a8              LDRH     r0,[r5,#4]  ; DataFromPLC
00027e  88e9              LDRH     r1,[r5,#6]  ; DataFromPLC
000280  eac04001          PKHBT    r0,r0,r1,LSL #16
000284  61e0              STR      r0,[r4,#0x1c]
;;;217    		HandlePlcData->RecvPlcData.X3								= (DataFromPLC[176] & 0XFFFF) | ((DataFromPLC[177] << 16) & 0XFFFF0000);
000286  8928              LDRH     r0,[r5,#8]  ; DataFromPLC
000288  8969              LDRH     r1,[r5,#0xa]  ; DataFromPLC
00028a  eac04001          PKHBT    r0,r0,r1,LSL #16
00028e  6220              STR      r0,[r4,#0x20]
;;;218    		HandlePlcData->RecvPlcData.Y3								= (DataFromPLC[178] & 0XFFFF) | ((DataFromPLC[179] << 16) & 0XFFFF0000);
000290  89a8              LDRH     r0,[r5,#0xc]  ; DataFromPLC
000292  89e9              LDRH     r1,[r5,#0xe]  ; DataFromPLC
000294  eac04001          PKHBT    r0,r0,r1,LSL #16
000298  6260              STR      r0,[r4,#0x24]
;;;219    		HandlePlcData->RecvPlcData.SecondSerialNumber				= GetshortAtWillBit(DataFromPLC[180],0,8);
00029a  8a28              LDRH     r0,[r5,#0x10]  ; DataFromPLC
00029c  2208              MOVS     r2,#8
00029e  2100              MOVS     r1,#0
0002a0  f7fffffe          BL       GetshortAtWillBit
0002a4  80e0              STRH     r0,[r4,#6]
;;;220    		HandlePlcData->RecvPlcData.ThirdSerialNumber				= GetshortAtWillBit(DataFromPLC[180],8,8);
0002a6  8a28              LDRH     r0,[r5,#0x10]  ; DataFromPLC
0002a8  2208              MOVS     r2,#8
0002aa  e000              B        |L9.686|
                  |L9.684|
0002ac  e013              B        |L9.726|
                  |L9.686|
0002ae  4611              MOV      r1,r2
0002b0  f7fffffe          BL       GetshortAtWillBit
0002b4  8120              STRH     r0,[r4,#8]
;;;221    		HandlePlcData->RecvPlcData.NextDirection					= DataFromPLC[181];
0002b6  8a68              LDRH     r0,[r5,#0x12]  ; DataFromPLC
0002b8  81e0              STRH     r0,[r4,#0xe]
;;;222    		HandlePlcData->RecvPlcData.OperationMode					= DataFromPLC[182];
0002ba  7d28              LDRB     r0,[r5,#0x14]  ; DataFromPLC
0002bc  f5a575ac          SUB      r5,r5,#0x158
0002c0  f8040c02          STRB     r0,[r4,#-2]
                  |L9.708|
;;;223    	}	
;;;224    	
;;;225    	PinYI_X = DataFromPLC[199] - 5000;
0002c4  f8b5018e          LDRH     r0,[r5,#0x18e]  ; DataFromPLC
0002c8  4916              LDR      r1,|L9.804|
0002ca  f5a05298          SUB      r2,r0,#0x1300
0002ce  3a88              SUBS     r2,r2,#0x88
0002d0  600a              STR      r2,[r1,#0]  ; PinYI_X
;;;226    	if(DataFromPLC[199] == 0)PinYI_X = 0;
0002d2  b188              CBZ      r0,|L9.760|
0002d4  e011              B        |L9.762|
                  |L9.726|
0002d6  f8246f80          STRH     r6,[r4,#0x80]!        ;192
0002da  81a6              STRH     r6,[r4,#0xc]          ;193
0002dc  8166              STRH     r6,[r4,#0xa]          ;194
0002de  6126              STR      r6,[r4,#0x10]         ;195
0002e0  6166              STR      r6,[r4,#0x14]         ;196
0002e2  8066              STRH     r6,[r4,#2]            ;197
0002e4  61a6              STR      r6,[r4,#0x18]         ;198
0002e6  61e6              STR      r6,[r4,#0x1c]         ;199
0002e8  6226              STR      r6,[r4,#0x20]         ;200
0002ea  6266              STR      r6,[r4,#0x24]         ;201
0002ec  80e6              STRH     r6,[r4,#6]            ;202
0002ee  8126              STRH     r6,[r4,#8]            ;203
0002f0  81e6              STRH     r6,[r4,#0xe]          ;204
0002f2  f8046c02          STRB     r6,[r4,#-2]           ;205
0002f6  e7e5              B        |L9.708|
                  |L9.760|
0002f8  600e              STR      r6,[r1,#0]  ; PinYI_X
                  |L9.762|
;;;227    	PinYI_Y = DataFromPLC[200] - 5000;
0002fa  f8b50190          LDRH     r0,[r5,#0x190]  ; DataFromPLC
0002fe  490a              LDR      r1,|L9.808|
000300  f5a05298          SUB      r2,r0,#0x1300
000304  3a88              SUBS     r2,r2,#0x88
000306  600a              STR      r2,[r1,#0]  ; PinYI_Y
;;;228    	if(DataFromPLC[200] == 0)PinYI_Y = 0;
000308  2800              CMP      r0,#0
00030a  d100              BNE      |L9.782|
00030c  600e              STR      r6,[r1,#0]  ; PinYI_Y
                  |L9.782|
;;;229    	
;;;230    	
;;;231    //	Uart_Printf(COM1,"清除站点动作=%d	序列号1=%d	序列号2=%d	序列号3=%d\r\n",
;;;232    //	HandlePlcData->RecvPlcData.ClearSiteAction,HandlePlcData->RecvPlcData.FirstSerialNumber,
;;;233    //	HandlePlcData->RecvPlcData.SecondSerialNumber,HandlePlcData->RecvPlcData.ThirdSerialNumber);
;;;234    }
00030e  bd70              POP      {r4-r6,pc}
;;;235    
                          ENDP

                  |L9.784|
                          DCD      ||.bss||
                  |L9.788|
000314  42c80000          DCFS     0x42c80000 ; 100
                  |L9.792|
000318  447a0000          DCFS     0x447a0000 ; 1000
                  |L9.796|
00031c  459c4000          DCFS     0x459c4000 ; 5000
                  |L9.800|
000320  00000000          DCFS     0x00000000 ; 0
                  |L9.804|
                          DCD      PinYI_X
                  |L9.808|
                          DCD      PinYI_Y

                          AREA ||i.UpdateDataToHolding||, CODE, READONLY, ALIGN=2

                  UpdateDataToHolding PROC
;;;236    //将控制器收到的外部数据更新到要发送给PLC的数组中去
;;;237    void UpdateDataToHolding(agvHandlePlcData *HandlePlcData)
000000  b530              PUSH     {r4,r5,lr}
;;;238    {
;;;239    	DataToPLC[0]		=  HandlePlcData->SendPlcData.FirstWheelAcSpeed;
000002  49d9              LDR      r1,|L10.872|
000004  f8302fa8          LDRH     r2,[r0,#0xa8]!
000008  800a              STRH     r2,[r1,#0]
;;;240    	
;;;241    	DataToPLC[1]		=  HandlePlcData->SendPlcData.SecondWheelAcSpeed;
00000a  8842              LDRH     r2,[r0,#2]
00000c  804a              STRH     r2,[r1,#2]
;;;242    	DataToPLC[2]		=  HandlePlcData->SendPlcData.ThirdWheelAcSpeed;
00000e  8882              LDRH     r2,[r0,#4]
000010  808a              STRH     r2,[r1,#4]
;;;243    	DataToPLC[3]		=  HandlePlcData->SendPlcData.FourthWheelAcSpeed;
000012  88c2              LDRH     r2,[r0,#6]
000014  80ca              STRH     r2,[r1,#6]
;;;244    	
;;;245    	DataToPLC[4]		=  HandlePlcData->SendPlcData.FrontWheelAcDis & 0xFFFF;
000016  8902              LDRH     r2,[r0,#8]
000018  810a              STRH     r2,[r1,#8]
;;;246    	DataToPLC[5]		=  (HandlePlcData->SendPlcData.FrontWheelAcDis >> 16) & 0XFFFF;
00001a  6882              LDR      r2,[r0,#8]
00001c  0c12              LSRS     r2,r2,#16
00001e  814a              STRH     r2,[r1,#0xa]
;;;247    	DataToPLC[6]		=  HandlePlcData->SendPlcData.BackWheelAcDis & 0XFFFF;
000020  8982              LDRH     r2,[r0,#0xc]
000022  818a              STRH     r2,[r1,#0xc]
;;;248    	DataToPLC[7]		=  (HandlePlcData->SendPlcData.BackWheelAcDis >> 16) & 0XFFFF;
000024  68c2              LDR      r2,[r0,#0xc]
000026  0c12              LSRS     r2,r2,#16
000028  81ca              STRH     r2,[r1,#0xe]
;;;249    	
;;;250    	DataToPLC[8]		=  HandlePlcData->SendPlcData.FirstMagneticGuidanceDataL;
00002a  8a02              LDRH     r2,[r0,#0x10]
00002c  820a              STRH     r2,[r1,#0x10]
;;;251    	DataToPLC[9]		=  HandlePlcData->SendPlcData.SecondMagneticGuidanceDataL;		
00002e  8a42              LDRH     r2,[r0,#0x12]
000030  824a              STRH     r2,[r1,#0x12]
;;;252    	DataToPLC[10]		=  HandlePlcData->SendPlcData.ThirdMagneticGuidanceDataL;
000032  8a82              LDRH     r2,[r0,#0x14]
000034  828a              STRH     r2,[r1,#0x14]
;;;253    	DataToPLC[11]		=  HandlePlcData->SendPlcData.FourthMagneticGuidanceDataL;
000036  8ac2              LDRH     r2,[r0,#0x16]
000038  82ca              STRH     r2,[r1,#0x16]
;;;254    	
;;;255    	DataToPLC[12]		=  HandlePlcData->SendPlcData.FirstLiftAcDis;
00003a  8c02              LDRH     r2,[r0,#0x20]
00003c  830a              STRH     r2,[r1,#0x18]
;;;256    	DataToPLC[13]		=  HandlePlcData->SendPlcData.SecondLiftAcDis;
00003e  8c42              LDRH     r2,[r0,#0x22]
000040  834a              STRH     r2,[r1,#0x1a]
;;;257    	DataToPLC[14]		=  HandlePlcData->SendPlcData.ThirdLiftAcDis;
000042  8c82              LDRH     r2,[r0,#0x24]
000044  838a              STRH     r2,[r1,#0x1c]
;;;258    	DataToPLC[15]		=  HandlePlcData->SendPlcData.FoutthLiftAcDis;
000046  8cc2              LDRH     r2,[r0,#0x26]
000048  83ca              STRH     r2,[r1,#0x1e]
;;;259    	
;;;260    	DataToPLC[16]		=  HandlePlcData->SendPlcData.FirstWheelAcAngle * 100;
00004a  edd00a0a          VLDR     s1,[r0,#0x28]
00004e  ed9f0ac7          VLDR     s0,|L10.876|
000052  ee600a80          VMUL.F32 s1,s1,s0
000056  eefc0ae0          VCVT.U32.F32 s1,s1
00005a  ee102a90          VMOV     r2,s1
00005e  840a              STRH     r2,[r1,#0x20]
;;;261    	DataToPLC[17]		=  HandlePlcData->SendPlcData.SecondWheelAcAngle * 100;
000060  edd00a0b          VLDR     s1,[r0,#0x2c]
000064  ee600a80          VMUL.F32 s1,s1,s0
000068  eefc0ae0          VCVT.U32.F32 s1,s1
00006c  ee102a90          VMOV     r2,s1
000070  844a              STRH     r2,[r1,#0x22]
;;;262    	DataToPLC[18]		=  HandlePlcData->SendPlcData.ThirdWheelAcAngle * 100;
000072  edd00a0c          VLDR     s1,[r0,#0x30]
000076  ee600a80          VMUL.F32 s1,s1,s0
00007a  eefc0ae0          VCVT.U32.F32 s1,s1
00007e  ee102a90          VMOV     r2,s1
000082  848a              STRH     r2,[r1,#0x24]
;;;263    	DataToPLC[19]		=  HandlePlcData->SendPlcData.FourthWheelAcAngle * 100;
000084  edd00a0d          VLDR     s1,[r0,#0x34]
000088  ee600a80          VMUL.F32 s1,s1,s0
00008c  eefc0ae0          VCVT.U32.F32 s1,s1
000090  ee102a90          VMOV     r2,s1
000094  84ca              STRH     r2,[r1,#0x26]
;;;264    	
;;;265    	DataToPLC[20]		=  (short)HandlePlcData->SendPlcData.FirstWheelTarAngle * 100;
000096  edd00a0e          VLDR     s1,[r0,#0x38]
00009a  eefd0ae0          VCVT.S32.F32 s1,s1
00009e  ee102a90          VMOV     r2,s1
0000a2  eb0203c2          ADD      r3,r2,r2,LSL #3
0000a6  eb031202          ADD      r2,r3,r2,LSL #4
0000aa  f64f73ff          MOV      r3,#0xffff
0000ae  ea030282          AND      r2,r3,r2,LSL #2
0000b2  850a              STRH     r2,[r1,#0x28]
;;;266    	DataToPLC[21]		=  (short)HandlePlcData->SendPlcData.SecondWheelTarAngle * 100;
0000b4  edd00a0f          VLDR     s1,[r0,#0x3c]
0000b8  eefd0ae0          VCVT.S32.F32 s1,s1
0000bc  ee102a90          VMOV     r2,s1
0000c0  eb0204c2          ADD      r4,r2,r2,LSL #3
0000c4  eb041202          ADD      r2,r4,r2,LSL #4
0000c8  ea030282          AND      r2,r3,r2,LSL #2
0000cc  854a              STRH     r2,[r1,#0x2a]
;;;267    	DataToPLC[22]		=  HandlePlcData->SendPlcData.ThirdWheelTarAngle * 100;
0000ce  edd00a10          VLDR     s1,[r0,#0x40]
0000d2  ee600a80          VMUL.F32 s1,s1,s0
0000d6  eefc0ae0          VCVT.U32.F32 s1,s1
0000da  ee102a90          VMOV     r2,s1
0000de  858a              STRH     r2,[r1,#0x2c]
;;;268    	DataToPLC[23]		=  HandlePlcData->SendPlcData.FourthWheelTarAngle * 100;
0000e0  edd00a11          VLDR     s1,[r0,#0x44]
0000e4  ee600a80          VMUL.F32 s1,s1,s0
0000e8  eefc0ae0          VCVT.U32.F32 s1,s1
0000ec  ee102a90          VMOV     r2,s1
0000f0  85ca              STRH     r2,[r1,#0x2e]
;;;269    
;;;270    	DataToPLC[24]		=  HandlePlcData->SendPlcData.CurrentLandMark;
0000f2  f8b0204a          LDRH     r2,[r0,#0x4a]
0000f6  860a              STRH     r2,[r1,#0x30]
;;;271    	DataToPLC[25]		=  (HandlePlcData->SendPlcData.PosModeCompletionSignal) | (HandlePlcData->SendPlcData.TurnningCompletionSignal << 1) | (HandlePlcData->SendPlcData.ReadCodeSignal << 2) | (HandlePlcData->SendPlcData.Heartbeat << 4
0000f8  304e              ADDS     r0,r0,#0x4e
0000fa  7842              LDRB     r2,[r0,#1]
0000fc  7884              LDRB     r4,[r0,#2]
0000fe  0052              LSLS     r2,r2,#1
000100  ea420284          ORR      r2,r2,r4,LSL #2
000104  7804              LDRB     r4,[r0,#0]
000106  7905              LDRB     r5,[r0,#4]
000108  4322              ORRS     r2,r2,r4
00010a  78c4              LDRB     r4,[r0,#3]
00010c  0124              LSLS     r4,r4,#4
00010e  ea441445          ORR      r4,r4,r5,LSL #5
000112  7945              LDRB     r5,[r0,#5]
000114  384e              SUBS     r0,r0,#0x4e
000116  ea441485          ORR      r4,r4,r5,LSL #6
00011a  4322              ORRS     r2,r2,r4
00011c  864a              STRH     r2,[r1,#0x32]
;;;272    											| (HandlePlcData->SendPlcData.SlamOnlineStatus << 5) | (HandlePlcData->SendPlcData.ClearSiteAck << 6));
;;;273    
;;;274    	DataToPLC[26]		=  HandlePlcData->SendPlcData.QR_X & 0XFFFF;
00011e  3018              ADDS     r0,r0,#0x18
000120  f8b02044          LDRH     r2,[r0,#0x44]
000124  f8212f34          STRH     r2,[r1,#0x34]!
;;;275    	DataToPLC[27]		=  (HandlePlcData->SendPlcData.QR_X >> 16) & 0XFFFF;
000128  6c42              LDR      r2,[r0,#0x44]
00012a  0c12              LSRS     r2,r2,#16
00012c  804a              STRH     r2,[r1,#2]
;;;276    	DataToPLC[28]		=  HandlePlcData->SendPlcData.QR_Y & 0XFFFF;
00012e  f8b02048          LDRH     r2,[r0,#0x48]
000132  808a              STRH     r2,[r1,#4]
;;;277    	DataToPLC[29]		=  (HandlePlcData->SendPlcData.QR_Y >> 16) & 0XFFFF;	
000134  6c82              LDR      r2,[r0,#0x48]
000136  0c12              LSRS     r2,r2,#16
000138  80ca              STRH     r2,[r1,#6]
;;;278    	
;;;279    	DataToPLC[30]		=  HandlePlcData->SendPlcData.QR_W * 100;;
00013a  f8b0204c          LDRH     r2,[r0,#0x4c]
00013e  eb0204c2          ADD      r4,r2,r2,LSL #3
000142  eb041202          ADD      r2,r4,r2,LSL #4
000146  ea030282          AND      r2,r3,r2,LSL #2
00014a  810a              STRH     r2,[r1,#8]
;;;280    	
;;;281    	//31激光id
;;;282    	DataToPLC[31]		= HandlePlcData->SendPlcData.CurrentID;
00014c  8e82              LDRH     r2,[r0,#0x34]
00014e  814a              STRH     r2,[r1,#0xa]
;;;283    		//电池信息
;;;284    	DataToPLC[32] = BMSmsg.msg1 | (BMSmsg.msg2 << 8);
000150  4a87              LDR      r2,|L10.880|
000152  8814              LDRH     r4,[r2,#0]  ; BMSmsg
000154  7895              LDRB     r5,[r2,#2]  ; BMSmsg
000156  ea442405          ORR      r4,r4,r5,LSL #8
00015a  818c              STRH     r4,[r1,#0xc]
;;;285    	DataToPLC[33] = BMSmsg.msg3 | (BMSmsg.msg4 << 8);
00015c  8894              LDRH     r4,[r2,#4]  ; BMSmsg
00015e  7995              LDRB     r5,[r2,#6]  ; BMSmsg
000160  ea442405          ORR      r4,r4,r5,LSL #8
000164  81cc              STRH     r4,[r1,#0xe]
;;;286    	DataToPLC[34] = BMSmsg.msg5 | (BMSmsg.msg6 << 8);
000166  8914              LDRH     r4,[r2,#8]  ; BMSmsg
000168  7a95              LDRB     r5,[r2,#0xa]  ; BMSmsg
00016a  ea442405          ORR      r4,r4,r5,LSL #8
00016e  820c              STRH     r4,[r1,#0x10]
;;;287    	DataToPLC[35] = BMSmsg.msg7 | (BMSmsg.msg8 << 8);
000170  8994              LDRH     r4,[r2,#0xc]  ; BMSmsg
000172  7b95              LDRB     r5,[r2,#0xe]  ; BMSmsg
000174  ea442405          ORR      r4,r4,r5,LSL #8
000178  824c              STRH     r4,[r1,#0x12]
;;;288    	
;;;289    	DataToPLC[36] = BMSmsg.msg9 | (BMSmsg.msg10 << 8);
00017a  8a14              LDRH     r4,[r2,#0x10]  ; BMSmsg
00017c  7c95              LDRB     r5,[r2,#0x12]  ; BMSmsg
00017e  ea442405          ORR      r4,r4,r5,LSL #8
000182  828c              STRH     r4,[r1,#0x14]
;;;290    	DataToPLC[37] = BMSmsg.msg11 | (BMSmsg.msg12 << 8);
000184  8a94              LDRH     r4,[r2,#0x14]  ; BMSmsg
000186  7d95              LDRB     r5,[r2,#0x16]  ; BMSmsg
000188  ea442405          ORR      r4,r4,r5,LSL #8
00018c  82cc              STRH     r4,[r1,#0x16]
;;;291    	DataToPLC[38] = BMSmsg.msg13 | (BMSmsg.msg14 << 8);
00018e  8b14              LDRH     r4,[r2,#0x18]  ; BMSmsg
000190  7e95              LDRB     r5,[r2,#0x1a]  ; BMSmsg
000192  ea442405          ORR      r4,r4,r5,LSL #8
000196  830c              STRH     r4,[r1,#0x18]
;;;292    	DataToPLC[39] = BMSmsg.msg15 | (BMSmsg.msg16 << 8);
000198  8b94              LDRH     r4,[r2,#0x1c]  ; BMSmsg
00019a  7f95              LDRB     r5,[r2,#0x1e]  ; BMSmsg
00019c  ea442405          ORR      r4,r4,r5,LSL #8
0001a0  834c              STRH     r4,[r1,#0x1a]
;;;293    	
;;;294    	DataToPLC[40] = BMSmsg.msg17 | (BMSmsg.msg18 << 8);
0001a2  8c14              LDRH     r4,[r2,#0x20]  ; BMSmsg
0001a4  f8925022          LDRB     r5,[r2,#0x22]  ; BMSmsg
0001a8  ea442405          ORR      r4,r4,r5,LSL #8
0001ac  838c              STRH     r4,[r1,#0x1c]
;;;295    	DataToPLC[41] = BMSmsg.msg19 | (BMSmsg.msg20 << 8);
0001ae  8c94              LDRH     r4,[r2,#0x24]  ; BMSmsg
0001b0  f8925026          LDRB     r5,[r2,#0x26]  ; BMSmsg
0001b4  ea442405          ORR      r4,r4,r5,LSL #8
0001b8  83cc              STRH     r4,[r1,#0x1e]
;;;296    	DataToPLC[42] = BMSmsg.msg21 | (BMSmsg.msg22 << 8);
0001ba  8d14              LDRH     r4,[r2,#0x28]  ; BMSmsg
0001bc  f892502a          LDRB     r5,[r2,#0x2a]  ; BMSmsg
0001c0  ea442405          ORR      r4,r4,r5,LSL #8
0001c4  840c              STRH     r4,[r1,#0x20]
;;;297    	DataToPLC[43] = BMSmsg.msg23 | (BMSmsg.msg24 << 8);
0001c6  8d94              LDRH     r4,[r2,#0x2c]  ; BMSmsg
0001c8  f892502e          LDRB     r5,[r2,#0x2e]  ; BMSmsg
0001cc  ea442405          ORR      r4,r4,r5,LSL #8
0001d0  844c              STRH     r4,[r1,#0x22]
;;;298    
;;;299    	//绝缘1信息
;;;300    	DataToPLC[44] = BMSmsg.msg25 | (BMSmsg.msg26 << 8);
0001d2  8e14              LDRH     r4,[r2,#0x30]  ; BMSmsg
0001d4  f8925032          LDRB     r5,[r2,#0x32]  ; BMSmsg
0001d8  ea442405          ORR      r4,r4,r5,LSL #8
0001dc  848c              STRH     r4,[r1,#0x24]
;;;301    	DataToPLC[45] = BMSmsg.msg27 | (BMSmsg.msg28 << 8);
0001de  8e94              LDRH     r4,[r2,#0x34]  ; BMSmsg
0001e0  f8925036          LDRB     r5,[r2,#0x36]  ; BMSmsg
0001e4  ea442405          ORR      r4,r4,r5,LSL #8
0001e8  84cc              STRH     r4,[r1,#0x26]
;;;302    	DataToPLC[46] = BMSmsg.msg29 | (BMSmsg.msg30 << 8);
0001ea  8f14              LDRH     r4,[r2,#0x38]  ; BMSmsg
0001ec  f892503a          LDRB     r5,[r2,#0x3a]  ; BMSmsg
0001f0  ea442405          ORR      r4,r4,r5,LSL #8
0001f4  850c              STRH     r4,[r1,#0x28]
;;;303    	DataToPLC[47] = BMSmsg.msg31 | (BMSmsg.msg32 << 8);
0001f6  8f94              LDRH     r4,[r2,#0x3c]  ; BMSmsg
0001f8  f892503e          LDRB     r5,[r2,#0x3e]  ; BMSmsg
0001fc  ea442405          ORR      r4,r4,r5,LSL #8
000200  854c              STRH     r4,[r1,#0x2a]
;;;304    
;;;305    //	DataToPLC[44] = (LElecHDFeeddback.Current) | (LElecHDFeeddback.FeedbakcStatus.sbuff << 8);
;;;306    //	DataToPLC[45] = (RElecHDFeeddback.Current) | (RElecHDFeeddback.FeedbakcStatus.sbuff << 8);
;;;307    	DataToPLC[49] =	(SySAlarmStatus.Off_linestatus << 10);
000202  4c5c              LDR      r4,|L10.884|
000204  7865              LDRB     r5,[r4,#1]  ; SySAlarmStatus
000206  ea032385          AND      r3,r3,r5,LSL #10
00020a  85cb              STRH     r3,[r1,#0x2e]
;;;308    	DataToPLC[50] =	SySAlarmStatus.OutOffDistanceStatus | (SySAlarmStatus.SLAMComInter << 1);
00020c  78a3              LDRB     r3,[r4,#2]  ; SySAlarmStatus
00020e  7964              LDRB     r4,[r4,#5]  ; SySAlarmStatus
000210  ea430344          ORR      r3,r3,r4,LSL #1
000214  860b              STRH     r3,[r1,#0x30]
;;;309    	
;;;310    	DataToPLC[51]		=  (short)(HandlePlcData->SendPlcData.AgvOffset * 10);
000216  edd00a14          VLDR     s1,[r0,#0x50]
00021a  eeb21a04          VMOV.F32 s2,#10.00000000
00021e  ee600a81          VMUL.F32 s1,s1,s2
000222  eefd0ae0          VCVT.S32.F32 s1,s1
000226  ee103a90          VMOV     r3,s1
00022a  864b              STRH     r3,[r1,#0x32]
;;;311    	
;;;312    //	Uart_Printf(COM1,"DataToPLC[51]=%d	%f\r\n",DataToPLC[51],HandlePlcData->SendPlcData.AgvOffset);
;;;313    	DataToPLC[52]		=  (short)(HandlePlcData->SendPlcData.AgvAngleOffset * 100);
00022c  edd00a15          VLDR     s1,[r0,#0x54]
000230  ee200a80          VMUL.F32 s0,s1,s0
000234  eebd0ac0          VCVT.S32.F32 s0,s0
000238  ee103a10          VMOV     r3,s0
00023c  868b              STRH     r3,[r1,#0x34]
;;;314    	
;;;315    	DataToPLC[53] = HandlePlcData->SendPlcData.SLAMerror;
00023e  8f83              LDRH     r3,[r0,#0x3c]
000240  86cb              STRH     r3,[r1,#0x36]
;;;316    
;;;317    	DataToPLC[54] = (short)(HandlePlcData->SendPlcData.AgvRequstAngle * 10);
000242  ed900a10          VLDR     s0,[r0,#0x40]
000246  ee200a01          VMUL.F32 s0,s0,s2
00024a  eebd0ac0          VCVT.S32.F32 s0,s0
00024e  ee103a10          VMOV     r3,s0
000252  870b              STRH     r3,[r1,#0x38]
;;;318    
;;;319    	DataToPLC[55]		=  HandlePlcData->SendPlcData.FirstMagneticGuidanceDataR;
000254  8803              LDRH     r3,[r0,#0]
000256  874b              STRH     r3,[r1,#0x3a]
;;;320    	DataToPLC[56]		=  HandlePlcData->SendPlcData.SecondMagneticGuidanceDataR;		
000258  8843              LDRH     r3,[r0,#2]
00025a  878b              STRH     r3,[r1,#0x3c]
;;;321    	DataToPLC[57]		=  HandlePlcData->SendPlcData.ThirdMagneticGuidanceDataR;
00025c  8883              LDRH     r3,[r0,#4]
00025e  87cb              STRH     r3,[r1,#0x3e]
;;;322    	DataToPLC[58]		=  HandlePlcData->SendPlcData.FourthMagneticGuidanceDataR;
000260  88c0              LDRH     r0,[r0,#6]
000262  f8a10040          STRH     r0,[r1,#0x40]
;;;323    	
;;;324    	
;;;325    		//电池信息
;;;326    			//电池2信息
;;;327    	DataToPLC[160] = BMSmsg.msg33 | (BMSmsg.msg34 << 8);
000266  f8b20040          LDRH     r0,[r2,#0x40]  ; BMSmsg
00026a  f8923042          LDRB     r3,[r2,#0x42]  ; BMSmsg
00026e  ea402003          ORR      r0,r0,r3,LSL #8
000272  f8a1010c          STRH     r0,[r1,#0x10c]
;;;328    	DataToPLC[161] = BMSmsg.msg35 | (BMSmsg.msg36 << 8);
000276  f8b20044          LDRH     r0,[r2,#0x44]  ; BMSmsg
00027a  f8923046          LDRB     r3,[r2,#0x46]  ; BMSmsg
00027e  ea402003          ORR      r0,r0,r3,LSL #8
000282  f8a1010e          STRH     r0,[r1,#0x10e]
;;;329    	DataToPLC[162] = BMSmsg.msg37 | (BMSmsg.msg38 << 8);
000286  f8b20048          LDRH     r0,[r2,#0x48]  ; BMSmsg
00028a  f892304a          LDRB     r3,[r2,#0x4a]  ; BMSmsg
00028e  ea402003          ORR      r0,r0,r3,LSL #8
000292  f8a10110          STRH     r0,[r1,#0x110]
;;;330    	DataToPLC[163] = BMSmsg.msg39 | (BMSmsg.msg40 << 8);
000296  f8b2004c          LDRH     r0,[r2,#0x4c]  ; BMSmsg
00029a  f892304e          LDRB     r3,[r2,#0x4e]  ; BMSmsg
00029e  ea402003          ORR      r0,r0,r3,LSL #8
0002a2  f8a10112          STRH     r0,[r1,#0x112]
;;;331    	
;;;332    	DataToPLC[164] = BMSmsg.msg41 | (BMSmsg.msg42 << 8);
0002a6  f8b20050          LDRH     r0,[r2,#0x50]  ; BMSmsg
0002aa  f8923052          LDRB     r3,[r2,#0x52]  ; BMSmsg
0002ae  ea402003          ORR      r0,r0,r3,LSL #8
0002b2  f8a10114          STRH     r0,[r1,#0x114]
;;;333    	DataToPLC[165] = BMSmsg.msg43 | (BMSmsg.msg44 << 8);
0002b6  f8b20054          LDRH     r0,[r2,#0x54]  ; BMSmsg
0002ba  f8923056          LDRB     r3,[r2,#0x56]  ; BMSmsg
0002be  ea402003          ORR      r0,r0,r3,LSL #8
0002c2  f8a10116          STRH     r0,[r1,#0x116]
;;;334    	DataToPLC[166] = BMSmsg.msg45 | (BMSmsg.msg46 << 8);
0002c6  f8b20058          LDRH     r0,[r2,#0x58]  ; BMSmsg
0002ca  f892305a          LDRB     r3,[r2,#0x5a]  ; BMSmsg
0002ce  ea402003          ORR      r0,r0,r3,LSL #8
0002d2  f8a10118          STRH     r0,[r1,#0x118]
;;;335    	DataToPLC[167] = BMSmsg.msg47 | (BMSmsg.msg48 << 8);
0002d6  f8b2005c          LDRH     r0,[r2,#0x5c]  ; BMSmsg
0002da  f892305e          LDRB     r3,[r2,#0x5e]  ; BMSmsg
0002de  ea402003          ORR      r0,r0,r3,LSL #8
0002e2  f8a1011a          STRH     r0,[r1,#0x11a]
;;;336    	
;;;337    	DataToPLC[168] = BMSmsg.msg49 | (BMSmsg.msg50 << 8);
0002e6  f8b20060          LDRH     r0,[r2,#0x60]  ; BMSmsg
0002ea  f8923062          LDRB     r3,[r2,#0x62]  ; BMSmsg
0002ee  ea402003          ORR      r0,r0,r3,LSL #8
0002f2  f8a1011c          STRH     r0,[r1,#0x11c]
;;;338    	DataToPLC[169] = BMSmsg.msg51 | (BMSmsg.msg52 << 8);
0002f6  f8b20064          LDRH     r0,[r2,#0x64]  ; BMSmsg
0002fa  f8923066          LDRB     r3,[r2,#0x66]  ; BMSmsg
0002fe  ea402003          ORR      r0,r0,r3,LSL #8
000302  f8a1011e          STRH     r0,[r1,#0x11e]
;;;339    	DataToPLC[170] = BMSmsg.msg53 | (BMSmsg.msg54 << 8);
000306  f8b20068          LDRH     r0,[r2,#0x68]  ; BMSmsg
00030a  f892306a          LDRB     r3,[r2,#0x6a]  ; BMSmsg
00030e  ea402003          ORR      r0,r0,r3,LSL #8
000312  f8a10120          STRH     r0,[r1,#0x120]
;;;340    	DataToPLC[171] = BMSmsg.msg55 | (BMSmsg.msg56 << 8);
000316  f8b2006c          LDRH     r0,[r2,#0x6c]  ; BMSmsg
00031a  f892306e          LDRB     r3,[r2,#0x6e]  ; BMSmsg
00031e  ea402003          ORR      r0,r0,r3,LSL #8
000322  f8a10122          STRH     r0,[r1,#0x122]
;;;341    	//绝缘2信息
;;;342    	DataToPLC[172] = BMSmsg.msg57 | (BMSmsg.msg58 << 8);
000326  f8b20070          LDRH     r0,[r2,#0x70]  ; BMSmsg
00032a  f8923072          LDRB     r3,[r2,#0x72]  ; BMSmsg
00032e  ea402003          ORR      r0,r0,r3,LSL #8
000332  f8a10124          STRH     r0,[r1,#0x124]
;;;343    	DataToPLC[173] = BMSmsg.msg59 | (BMSmsg.msg60 << 8);
000336  f8b20074          LDRH     r0,[r2,#0x74]  ; BMSmsg
00033a  f8923076          LDRB     r3,[r2,#0x76]  ; BMSmsg
00033e  ea402003          ORR      r0,r0,r3,LSL #8
000342  f8a10126          STRH     r0,[r1,#0x126]
;;;344    	DataToPLC[174] = BMSmsg.msg61 | (BMSmsg.msg62 << 8);
000346  f8b20078          LDRH     r0,[r2,#0x78]  ; BMSmsg
00034a  f892307a          LDRB     r3,[r2,#0x7a]  ; BMSmsg
00034e  ea402003          ORR      r0,r0,r3,LSL #8
000352  f8a10128          STRH     r0,[r1,#0x128]
;;;345    	DataToPLC[175] = BMSmsg.msg63 | (BMSmsg.msg64 << 8);	
000356  f8b2007c          LDRH     r0,[r2,#0x7c]  ; BMSmsg
00035a  f892207e          LDRB     r2,[r2,#0x7e]  ; BMSmsg
00035e  ea402002          ORR      r0,r0,r2,LSL #8
000362  f8a1012a          STRH     r0,[r1,#0x12a]
;;;346    }
000366  bd30              POP      {r4,r5,pc}
;;;347    
                          ENDP

                  |L10.872|
                          DCD      ||.bss||+0x258
                  |L10.876|
00036c  42c80000          DCFS     0x42c80000 ; 100
                  |L10.880|
                          DCD      BMSmsg
                  |L10.884|
                          DCD      SySAlarmStatus

                          AREA ||i.agvClearDispatchData||, CODE, READONLY, ALIGN=2

                  agvClearDispatchData PROC
;;;350    //清空调度数据
;;;351    void agvClearDispatchData()
000000  4808              LDR      r0,|L11.36|
;;;352    {
;;;353    	DispatchData.OfflineSignal = 0;
000002  2100              MOVS     r1,#0
000004  7001              STRB     r1,[r0,#0]
;;;354    	DispatchData.CurSite = 0;
000006  8041              STRH     r1,[r0,#2]
;;;355    	DispatchData.NextSite = 0;
000008  8081              STRH     r1,[r0,#4]
;;;356    	DispatchData.CurAgvSpeed = 0;
00000a  8181              STRH     r1,[r0,#0xc]
;;;357    	DispatchData.CurDirection = 0;
00000c  81c1              STRH     r1,[r0,#0xe]
;;;358    	DispatchData.FirstSerialNumber = 0;
00000e  80c1              STRH     r1,[r0,#6]
;;;359    	DispatchData.SecondSerialNumber = 0;
000010  8101              STRH     r1,[r0,#8]
;;;360    	DispatchData.ThirdSerialNumber = 0;
000012  8141              STRH     r1,[r0,#0xa]
;;;361    	DispatchData.X0 = 0;
000014  6141              STR      r1,[r0,#0x14]  ; DispatchData
;;;362    	DispatchData.X1 = 0;
000016  61c1              STR      r1,[r0,#0x1c]  ; DispatchData
;;;363    	DispatchData.X2 = 0;
000018  6241              STR      r1,[r0,#0x24]  ; DispatchData
;;;364    	DispatchData.X3 = 0;
00001a  62c1              STR      r1,[r0,#0x2c]  ; DispatchData
;;;365    	DispatchData.Y1 = 0;
00001c  6201              STR      r1,[r0,#0x20]  ; DispatchData
;;;366    	DispatchData.Y2 = 0;
00001e  6281              STR      r1,[r0,#0x28]  ; DispatchData
;;;367    	DispatchData.Y3 = 0;
000020  6301              STR      r1,[r0,#0x30]  ; DispatchData
;;;368    }
000022  4770              BX       lr
;;;369    
                          ENDP

                  |L11.36|
                          DCD      ||.bss||+0x634

                          AREA ||i.agvFirstUpdataSiteID||, CODE, READONLY, ALIGN=2

                  agvFirstUpdataSiteID PROC
;;;370    //上线第一次更新站点号
;;;371    u8 agvFirstUpdataSiteID()
000000  e92d4ff0          PUSH     {r4-r11,lr}
;;;372    {
000004  b08b              SUB      sp,sp,#0x2c
;;;373    	if(HandlePlcData.RecvPlcData.FirstSerialNumber && HandlePlcData.RecvPlcData.SecondSerialNumber)//初始化剩余站点数为3
000006  4827              LDR      r0,|L12.164|
000008  f9b03084          LDRSH    r3,[r0,#0x84]  ; HandlePlcData
00000c  2b00              CMP      r3,#0
00000e  d046              BEQ      |L12.158|
000010  f8b01086          LDRH     r1,[r0,#0x86]  ; HandlePlcData
000014  2900              CMP      r1,#0
000016  d042              BEQ      |L12.158|
;;;374    	{
;;;375    		DispatchData.CurSite			= HandlePlcData.RecvPlcData.CurSite;
000018  4c23              LDR      r4,|L12.168|
00001a  f9307f80          LDRSH    r7,[r0,#0x80]!  ; HandlePlcData
00001e  8067              STRH     r7,[r4,#2]
;;;376    		DispatchData.OperationMode		= HandlePlcData.RecvPlcData.OperationMode;
000020  f8102c02          LDRB     r2,[r0,#-2]  ; HandlePlcData
000024  7062              STRB     r2,[r4,#1]
;;;377    		//HandlePlcData.SendPlcData.CurrentID = DispatchData.CurSite;
;;;378    		
;;;379    		DispatchData.NextSite			= HandlePlcData.RecvPlcData.NextSite;
000026  f9b0c002          LDRSH    r12,[r0,#2]  ; HandlePlcData
00002a  f8a4c004          STRH     r12,[r4,#4]
;;;380    		DispatchData.CurAgvSpeed		= HandlePlcData.RecvPlcData.CurAgvSpeed;
00002e  f9b0800a          LDRSH    r8,[r0,#0xa]  ; HandlePlcData
000032  f8a4800c          STRH     r8,[r4,#0xc]
;;;381    		DispatchData.CurDirection		= HandlePlcData.RecvPlcData.CurDirection;
000036  f9b0900c          LDRSH    r9,[r0,#0xc]  ; HandlePlcData
00003a  f8a4900e          STRH     r9,[r4,#0xe]
;;;382    		DispatchData.NextDirection		= HandlePlcData.RecvPlcData.NextDirection;
00003e  f9b0a00e          LDRSH    r10,[r0,#0xe]  ; HandlePlcData
000042  f8a4a010          STRH     r10,[r4,#0x10]
;;;383    
;;;384    		DispatchData.FirstSerialNumber	= HandlePlcData.RecvPlcData.FirstSerialNumber;
000046  80e3              STRH     r3,[r4,#6]
;;;385    		DispatchData.X1					= HandlePlcData.RecvPlcData.X1;
000048  f8d0b010          LDR      r11,[r0,#0x10]  ; HandlePlcData
00004c  f8c4b01c          STR      r11,[r4,#0x1c]  ; DispatchData
;;;386    		DispatchData.Y1					= HandlePlcData.RecvPlcData.Y1;
000050  f8d0e014          LDR      lr,[r0,#0x14]  ; HandlePlcData
000054  f8c4e020          STR      lr,[r4,#0x20]  ; DispatchData
;;;387    		DispatchData.X2					= HandlePlcData.RecvPlcData.X2;
000058  6981              LDR      r1,[r0,#0x18]  ; HandlePlcData
00005a  6261              STR      r1,[r4,#0x24]  ; DispatchData
;;;388    		DispatchData.Y2					= HandlePlcData.RecvPlcData.Y2;
00005c  69c5              LDR      r5,[r0,#0x1c]  ; HandlePlcData
00005e  62a5              STR      r5,[r4,#0x28]  ; DispatchData
;;;389    		DispatchData.X3					= HandlePlcData.RecvPlcData.X3;
000060  6a06              LDR      r6,[r0,#0x20]  ; HandlePlcData
000062  62e6              STR      r6,[r4,#0x2c]  ; DispatchData
;;;390    		DispatchData.Y3					= HandlePlcData.RecvPlcData.Y3;	
000064  6a40              LDR      r0,[r0,#0x24]  ; HandlePlcData
000066  6320              STR      r0,[r4,#0x30]  ; DispatchData
;;;391    
;;;392    		Uart_Printf(COM1,"mode=%d	序列号=%d	dir=%d	nextdir=%d	speed=%d	站点1=%d	站点2=%d	x1=%d	y1=%d	x2=%d	y2=%d	x3=%d	y3=%d\r\n",
000068  e9cdbe05          STRD     r11,lr,[sp,#0x14]
00006c  e9cd7c03          STRD     r7,r12,[sp,#0xc]
000070  e9cd9a00          STRD     r9,r10,[sp,#0]
000074  af07              ADD      r7,sp,#0x1c
000076  f8cd8008          STR      r8,[sp,#8]
00007a  c762              STM      r7!,{r1,r5,r6}
00007c  900a              STR      r0,[sp,#0x28]
00007e  490b              LDR      r1,|L12.172|
000080  2001              MOVS     r0,#1
000082  f7fffffe          BL       Uart_Printf
;;;393    		DispatchData.OperationMode,
;;;394    		DispatchData.FirstSerialNumber,DispatchData.CurDirection,DispatchData.NextDirection,
;;;395    		DispatchData.CurAgvSpeed,
;;;396    		DispatchData.CurSite,DispatchData.NextSite,DispatchData.X1,DispatchData.Y1,DispatchData.X2,DispatchData.Y2,DispatchData.X3,DispatchData.Y3);
;;;397    		
;;;398    		Uart_Printf(COM1,"Walking process ID %d --------------------------> %d\r\n", 
000086  f9b43004          LDRSH    r3,[r4,#4]  ; DispatchData
00008a  f9b42002          LDRSH    r2,[r4,#2]  ; DispatchData
00008e  a108              ADR      r1,|L12.176|
000090  2001              MOVS     r0,#1
000092  f7fffffe          BL       Uart_Printf
;;;399    		DispatchData.CurSite,DispatchData.NextSite);	
;;;400    		return 1;
000096  2001              MOVS     r0,#1
                  |L12.152|
;;;401    	}
;;;402    	return 0;
;;;403    }
000098  b00b              ADD      sp,sp,#0x2c
00009a  e8bd8ff0          POP      {r4-r11,pc}
                  |L12.158|
00009e  2000              MOVS     r0,#0                 ;402
0000a0  e7fa              B        |L12.152|
;;;404    
                          ENDP

0000a2  0000              DCW      0x0000
                  |L12.164|
                          DCD      ||.bss||+0x4b0
                  |L12.168|
                          DCD      ||.bss||+0x634
                  |L12.172|
                          DCD      ||.conststring||
                  |L12.176|
0000b0  57616c6b          DCB      "Walking process ID %d --------------------------> %d\r\n"
0000b4  696e6720
0000b8  70726f63
0000bc  65737320
0000c0  49442025
0000c4  64202d2d
0000c8  2d2d2d2d
0000cc  2d2d2d2d
0000d0  2d2d2d2d
0000d4  2d2d2d2d
0000d8  2d2d2d2d
0000dc  2d2d2d2d
0000e0  3e202564
0000e4  0d0a    
0000e6  00                DCB      0
0000e7  00                DCB      0

                          AREA ||i.agvSwitchUpdataSiteID||, CODE, READONLY, ALIGN=2

                  agvSwitchUpdataSiteID PROC
;;;405    //当前站点到达更新
;;;406    u8 agvSwitchUpdataSiteID()
000000  e92d47f0          PUSH     {r4-r10,lr}
;;;407    {
000004  b08e              SUB      sp,sp,#0x38
;;;408    	OS_ERR  err;
;;;409    	static int ii = 20;
;;;410    	int i = 0;
000006  f04f0800          MOV      r8,#0
;;;411    	u16 CurSerialNum = 0,LastSerialNum = 0;
00000a  2700              MOVS     r7,#0
;;;412    	
;;;413    	DispatchData.CurSite = HandlePlcData.RecvPlcData.NextSite;
00000c  4d34              LDR      r5,|L13.224|
00000e  f50574c2          ADD      r4,r5,#0x184
000012  f8b50082          LDRH     r0,[r5,#0x82]  ; HandlePlcData
000016  8060              STRH     r0,[r4,#2]
;;;414    	HandlePlcData.SendPlcData.CurrentID = DispatchData.CurSite;
000018  f8a500f4          STRH     r0,[r5,#0xf4]
;;;415    	
;;;416    	DispatchData.FirstSerialNumber = HandlePlcData.RecvPlcData.FirstSerialNumber;
00001c  f8b50084          LDRH     r0,[r5,#0x84]  ; HandlePlcData
000020  80e0              STRH     r0,[r4,#6]
;;;417    	
;;;418    	DispatchData.X0 				= DispatchData.X1;		 
000022  69e0              LDR      r0,[r4,#0x1c]  ; DispatchData
000024  6160              STR      r0,[r4,#0x14]  ; DispatchData
;;;419    	DispatchData.Y0 				= DispatchData.Y1;
000026  6a20              LDR      r0,[r4,#0x20]  ; DispatchData
000028  61a0              STR      r0,[r4,#0x18]  ; DispatchData
                  |L13.42|
;;;420    	
;;;421    	while(1)
;;;422    	{			
;;;423    		CurSerialNum = DispatchData.FirstSerialNumber;
00002a  88e6              LDRH     r6,[r4,#6]  ; DispatchData
;;;424    		if(CurSerialNum && LastSerialNum && (CurSerialNum == (LastSerialNum + 1)) )
00002c  b3f6              CBZ      r6,|L13.172|
00002e  b3ef              CBZ      r7,|L13.172|
000030  1c7f              ADDS     r7,r7,#1
000032  42be              CMP      r6,r7
000034  d13f              BNE      |L13.182|
;;;425    		{
;;;426    			DispatchData.NextSite			= HandlePlcData.RecvPlcData.NextSite;	
000036  3580              ADDS     r5,r5,#0x80
000038  f9b57002          LDRSH    r7,[r5,#2]  ; HandlePlcData
00003c  80a7              STRH     r7,[r4,#4]
;;;427    			DispatchData.OperationMode		= HandlePlcData.RecvPlcData.OperationMode;
00003e  f8152c02          LDRB     r2,[r5,#-2]  ; HandlePlcData
000042  7062              STRB     r2,[r4,#1]
;;;428    			DispatchData.X1					= HandlePlcData.RecvPlcData.X1;
000044  f8d5c010          LDR      r12,[r5,#0x10]  ; HandlePlcData
000048  f8c4c01c          STR      r12,[r4,#0x1c]  ; DispatchData
;;;429    			DispatchData.Y1					= HandlePlcData.RecvPlcData.Y1;
00004c  f8d58014          LDR      r8,[r5,#0x14]  ; HandlePlcData
000050  f8c48020          STR      r8,[r4,#0x20]  ; DispatchData
;;;430    			DispatchData.X2					= HandlePlcData.RecvPlcData.X2;
000054  69a8              LDR      r0,[r5,#0x18]  ; HandlePlcData
000056  6260              STR      r0,[r4,#0x24]  ; DispatchData
;;;431    			DispatchData.Y2					= HandlePlcData.RecvPlcData.Y2;
000058  69e9              LDR      r1,[r5,#0x1c]  ; HandlePlcData
00005a  62a1              STR      r1,[r4,#0x28]  ; DispatchData
;;;432    			DispatchData.X3					= HandlePlcData.RecvPlcData.X3;
00005c  6a2e              LDR      r6,[r5,#0x20]  ; HandlePlcData
00005e  62e6              STR      r6,[r4,#0x2c]  ; DispatchData
;;;433    			DispatchData.Y3					= HandlePlcData.RecvPlcData.Y3;		
000060  f8d5a024          LDR      r10,[r5,#0x24]  ; HandlePlcData
000064  f8c4a030          STR      r10,[r4,#0x30]  ; DispatchData
;;;434    			
;;;435    			DispatchData.CurAgvSpeed		= HandlePlcData.RecvPlcData.CurAgvSpeed;
000068  f9b5900a          LDRSH    r9,[r5,#0xa]  ; HandlePlcData
00006c  f8a4900c          STRH     r9,[r4,#0xc]
;;;436    			DispatchData.CurDirection		= HandlePlcData.RecvPlcData.CurDirection;
000070  f9b5300c          LDRSH    r3,[r5,#0xc]  ; HandlePlcData
000074  81e3              STRH     r3,[r4,#0xe]
;;;437    			DispatchData.NextDirection		= HandlePlcData.RecvPlcData.NextDirection;
000076  f9b5500e          LDRSH    r5,[r5,#0xe]  ; HandlePlcData
00007a  8225              STRH     r5,[r4,#0x10]
;;;438    
;;;439    			Uart_Printf(COM1,"更新站点Mode=%d	---方向=%d	nextDir=%d	速度=%d	序列号=%d	站点1=%d	站点2=%d	x0=%d	y0=%d	x1=%d	y1=%d	x2=%d	y2=%d	x3=%d	y3=%d\r\n",
00007c  e9cd6a0b          STRD     r6,r10,[sp,#0x2c]
000080  e9cd0109          STRD     r0,r1,[sp,#0x24]
000084  e9d40105          LDRD     r0,r1,[r4,#0x14]
000088  e9cdc807          STRD     r12,r8,[sp,#0x1c]
00008c  e9cd0105          STRD     r0,r1,[sp,#0x14]
000090  f9b40002          LDRSH    r0,[r4,#2]  ; DispatchData
000094  f9b41006          LDRSH    r1,[r4,#6]  ; DispatchData
000098  e9cd5900          STRD     r5,r9,[sp,#0]
00009c  e9cd0703          STRD     r0,r7,[sp,#0xc]
0000a0  9102              STR      r1,[sp,#8]
0000a2  4910              LDR      r1,|L13.228|
0000a4  2001              MOVS     r0,#1
0000a6  f7fffffe          BL       Uart_Printf
;;;440    			DispatchData.OperationMode,
;;;441    			DispatchData.CurDirection,DispatchData.NextDirection,
;;;442    			DispatchData.CurAgvSpeed,DispatchData.FirstSerialNumber,DispatchData.CurSite,DispatchData.NextSite,
;;;443    			DispatchData.X0,DispatchData.Y0,DispatchData.X1,DispatchData.Y1,DispatchData.X2,DispatchData.Y2,DispatchData.X3,DispatchData.Y3);
;;;444    			return 1;			
0000aa  e000              B        |L13.174|
                  |L13.172|
0000ac  e003              B        |L13.182|
                  |L13.174|
0000ae  2001              MOVS     r0,#1
                  |L13.176|
;;;445    		}
;;;446    		LastSerialNum = CurSerialNum;
;;;447    		
;;;448    		if(i++ > 100)
;;;449    		{
;;;450    			Uart_Printf(COM1,"PLC没有更新站点信息\r\n");
;;;451    			return 0;
;;;452    		}
;;;453    		DispatchData.FirstSerialNumber = HandlePlcData.RecvPlcData.FirstSerialNumber;	
;;;454    		
;;;455    		OSTimeDly(30, OS_OPT_TIME_PERIODIC, &err);		
;;;456    	}	
;;;457    }
0000b0  b00e              ADD      sp,sp,#0x38
0000b2  e8bd87f0          POP      {r4-r10,pc}
                  |L13.182|
0000b6  4637              MOV      r7,r6                 ;446
0000b8  4640              MOV      r0,r8                 ;448
0000ba  f1080801          ADD      r8,r8,#1              ;448
0000be  2864              CMP      r0,#0x64              ;448
0000c0  dd05              BLE      |L13.206|
0000c2  a109              ADR      r1,|L13.232|
0000c4  2001              MOVS     r0,#1                 ;450
0000c6  f7fffffe          BL       Uart_Printf
0000ca  2000              MOVS     r0,#0                 ;451
0000cc  e7f0              B        |L13.176|
                  |L13.206|
0000ce  f8b50084          LDRH     r0,[r5,#0x84]         ;453  ; HandlePlcData
0000d2  80e0              STRH     r0,[r4,#6]            ;453
0000d4  aa0d              ADD      r2,sp,#0x34           ;455
0000d6  2108              MOVS     r1,#8                 ;455
0000d8  201e              MOVS     r0,#0x1e              ;455
0000da  f7fffffe          BL       OSTimeDly
0000de  e7a4              B        |L13.42|
;;;458    
                          ENDP

                  |L13.224|
                          DCD      ||.bss||+0x4b0
                  |L13.228|
                          DCD      ||.conststring||+0x68
                  |L13.232|
0000e8  504c43c3          DCB      "PLC",195,187,211,208,184,252,208,194,213,190,181,227,208
0000ec  bbd3d0b8
0000f0  fcd0c2d5
0000f4  beb5e3d0
0000f8  c5cfa20d          DCB      197,207,162,"\r\n",0
0000fc  0a00    
0000fe  00                DCB      0
0000ff  00                DCB      0

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  DataFromPLC
                          %        600
                  DataToPLC
                          %        600
                  HandlePlcData
                          %        388
                  DispatchData
                          %        52

                          AREA ||.constdata||, DATA, READONLY, ALIGN=2

000000  00010003          DCW      0x0001,0x0003
000004  0007000f          DCW      0x0007,0x000f
000008  001f003f          DCW      0x001f,0x003f
00000c  007f00ff          DCW      0x007f,0x00ff
000010  01ff03ff          DCW      0x01ff,0x03ff
000014  07ff0fff          DCW      0x07ff,0x0fff
000018  1fff3fff          DCW      0x1fff,0x3fff
00001c  7fffffff          DCW      0x7fff,0xffff

                          AREA ||.conststring||, DATA, READONLY, MERGE=1, STRINGS, ALIGN=2

000000  6d6f6465          DCB      "mode=%d\t",208,242,193,208,186,197,"=%d\tdir=%d\tnextdi"
000004  3d256409
000008  d0f2c1d0
00000c  bac53d25
000010  64096469
000014  723d2564
000018  096e6578
00001c  746469  
00001f  723d2564          DCB      "r=%d\tspeed=%d\t",213,190,181,227,"1=%d\t",213,190,181,227
000023  09737065
000027  65643d25
00002b  6409d5be
00002f  b5e3313d
000033  256409d5
000037  beb5e3  
00003a  323d2564          DCB      "2=%d\tx1=%d\ty1=%d\tx2=%d\ty2=%d\tx3=%d\ty3=%d\r\n",0
00003e  0978313d
000042  25640979
000046  313d2564
00004a  0978323d
00004e  25640979
000052  323d2564
000056  0978333d
00005a  25640979
00005e  333d2564
000062  0d0a00  
000065  00                DCB      0
000066  00                DCB      0
000067  00                DCB      0
000068  b8fcd0c2          DCB      184,252,208,194,213,190,181,227,"Mode=%d\t---",183,189,207
00006c  d5beb5e3
000070  4d6f6465
000074  3d256409
000078  2d2d2db7
00007c  bdcf    
00007e  f23d2564          DCB      242,"=%d\tnextDir=%d\t",203,217,182,200,"=%d\t",208,242,193
000082  096e6578
000086  74446972
00008a  3d256409
00008e  cbd9b6c8
000092  3d256409
000096  d0f2c1  
000099  d0bac53d          DCB      208,186,197,"=%d\t",213,190,181,227,"1=%d\t",213,190,181
00009d  256409d5
0000a1  beb5e331
0000a5  3d256409
0000a9  d5beb5  
0000ac  e3323d25          DCB      227,"2=%d\tx0=%d\ty0=%d\tx1=%d\ty1=%d\tx2=%d\ty2=%d\tx3="
0000b0  64097830
0000b4  3d256409
0000b8  79303d25
0000bc  64097831
0000c0  3d256409
0000c4  79313d25
0000c8  64097832
0000cc  3d256409
0000d0  79323d25
0000d4  64097833
0000d8  3d      
0000d9  25640979          DCB      "%d\ty3=%d\r\n",0
0000dd  333d2564
0000e1  0d0a00  

                          AREA ||.data||, DATA, ALIGN=0

                  flagSave
000000  01                DCB      0x01
                  CurScreen
000001  00                DCB      0x00
                  LastScreen
000002  00                DCB      0x00

;*** Start embedded assembler ***

#line 1 "..\\..\\User\\parameter\\userPLC.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___9_userPLC_c_9787d38d____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___9_userPLC_c_9787d38d____REV16| PROC
#line 130

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___9_userPLC_c_9787d38d____REVSH|
#line 144
|__asm___9_userPLC_c_9787d38d____REVSH| PROC
#line 145

 revsh r0, r0
 bx lr
	ENDP
	AREA ||.rrx_text||, CODE
	THUMB
	EXPORT |__asm___9_userPLC_c_9787d38d____RRX|
#line 300
|__asm___9_userPLC_c_9787d38d____RRX| PROC
#line 301

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***