user_modbus.txt
205 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
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
; 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\user_modbus.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\user_modbus.d --cpu=Cortex-M4.fp --apcs=interwork -O0 --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.\RTE\_Flash -IC:\Users\49520\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\49520\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\user_modbus.crf ..\..\User\user_modbus.c]
THUMB
AREA ||i.GetCRC||, CODE, READONLY, ALIGN=2
GetCRC PROC
;;;27 ////////////////////modbus_RTU//////////////////////////////////
;;;28 unsigned short GetCRC( unsigned char *dataPacket,unsigned int dataLenth )
000000 e92d41f0 PUSH {r4-r8,lr}
;;;29 {
000004 f5ad7d00 SUB sp,sp,#0x200
000008 4604 MOV r4,r0
00000a 4688 MOV r8,r1
;;;30 const unsigned char auchCRCHi[] =
00000c f44f7280 MOV r2,#0x100
000010 4911 LDR r1,|L1.88|
000012 a840 ADD r0,sp,#0x100
000014 f7fffffe BL __aeabi_memcpy4
;;;31 {
;;;32 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
;;;33 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
;;;34 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
;;;35 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
;;;36 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81,
;;;37 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
;;;38 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
;;;39 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
;;;40 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
;;;41 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
;;;42 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
;;;43 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
;;;44 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
;;;45 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
;;;46 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
;;;47 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
;;;48 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
;;;49 0x40
;;;50 } ;
;;;51
;;;52 const char auchCRCLo[] =
000018 f44f7280 MOV r2,#0x100
00001c 490f LDR r1,|L1.92|
00001e 4668 MOV r0,sp
000020 f7fffffe BL __aeabi_memcpy4
;;;53 {
;;;54 0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4,
;;;55 0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,
;;;56 0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD,
;;;57 0x1D, 0x1C, 0xDC, 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,
;;;58 0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2, 0x32, 0x36, 0xF6, 0xF7,
;;;59 0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,
;;;60 0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE,
;;;61 0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,
;;;62 0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2,
;;;63 0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,
;;;64 0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB,
;;;65 0x7B, 0x7A, 0xBA, 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
;;;66 0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0, 0x50, 0x90, 0x91,
;;;67 0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,
;;;68 0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88,
;;;69 0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
;;;70 0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80,
;;;71 0x40
;;;72 };
;;;73 unsigned char CRCHi=0xFF; //CRC高位字节初始化
000024 25ff MOVS r5,#0xff
;;;74 unsigned char CRCLo=0xFF; //CRC低位字节初始化
000026 26ff MOVS r6,#0xff
;;;75 unsigned int index=0; //CRC查询表索引
000028 2700 MOVS r7,#0
;;;76
;;;77 while (dataLenth--)
00002a e009 B |L1.64|
|L1.44|
;;;78 {
;;;79 index = CRCLo ^ *dataPacket++;/*计算CRC */
00002c f8140b01 LDRB r0,[r4],#1
000030 ea800706 EOR r7,r0,r6
;;;80 CRCLo = CRCHi ^ auchCRCHi[index];
000034 a840 ADD r0,sp,#0x100
000036 5dc0 LDRB r0,[r0,r7]
000038 ea800605 EOR r6,r0,r5
;;;81 CRCHi = auchCRCLo[index];
00003c f81d5007 LDRB r5,[sp,r7]
|L1.64|
000040 f1b80000 SUBS r0,r8,#0 ;77
000044 f1a80801 SUB r8,r8,#1 ;77
000048 d1f0 BNE |L1.44|
;;;82 }
;;;83 return (CRCHi << 8 | CRCLo) ;
00004a ea462005 ORR r0,r6,r5,LSL #8
;;;84 }
00004e f50d7d00 ADD sp,sp,#0x200
000052 e8bd81f0 POP {r4-r8,pc}
;;;85
ENDP
000056 0000 DCW 0x0000
|L1.88|
DCD ||.constdata||
|L1.92|
DCD ||.constdata||+0x100
AREA ||i.GetLRC||, CODE, READONLY, ALIGN=1
GetLRC PROC
;;;1113 ///////////////////////////////modbus_ASCII//////////////////////////////////////////////
;;;1114 unsigned char GetLRC( unsigned char *dataPacket,unsigned int dataLenth )
000000 b510 PUSH {r4,lr}
;;;1115 {
000002 4602 MOV r2,r0
000004 460b MOV r3,r1
;;;1116 unsigned int iCount = 0;
000006 2100 MOVS r1,#0
;;;1117 unsigned char LrcValue = 0x00;
000008 2400 MOVS r4,#0
;;;1118 for(iCount = 0; iCount < dataLenth; iCount++)
00000a bf00 NOP
00000c e003 B |L2.22|
|L2.14|
;;;1119 {
;;;1120 LrcValue += dataPacket[iCount];
00000e 5c50 LDRB r0,[r2,r1]
000010 4420 ADD r0,r0,r4
000012 b2c4 UXTB r4,r0
000014 1c49 ADDS r1,r1,#1 ;1118
|L2.22|
000016 4299 CMP r1,r3 ;1118
000018 d3f9 BCC |L2.14|
;;;1121 }
;;;1122 return (unsigned char)((~LrcValue)+1);
00001a 43e0 MVNS r0,r4
00001c 1c40 ADDS r0,r0,#1
00001e b2c0 UXTB r0,r0
;;;1123 }
000020 bd10 POP {r4,pc}
;;;1124
ENDP
AREA ||i.Modbus_ASCII_DippFramer||, CODE, READONLY, ALIGN=1
Modbus_ASCII_DippFramer PROC
;;;1124
;;;1125 void Modbus_ASCII_DippFramer(DipperdeFramer *pd,unsigned char *pData)
000000 b510 PUSH {r4,lr}
;;;1126 {
;;;1127 pd->oneFrame = 0;
000002 2200 MOVS r2,#0
000004 8002 STRH r2,[r0,#0]
;;;1128 if (*pData == ':')
000006 780a LDRB r2,[r1,#0]
000008 2a3a CMP r2,#0x3a
00000a d105 BNE |L3.24|
;;;1129 {
;;;1130 pd->frmBuf[0] = ':';
00000c 7202 STRB r2,[r0,#8]
;;;1131 pd->dataNum = 1;
00000e 2201 MOVS r2,#1
000010 8042 STRH r2,[r0,#2]
;;;1132 pd->dataLeft = 0;
000012 2200 MOVS r2,#0
000014 8082 STRH r2,[r0,#4]
000016 e01e B |L3.86|
|L3.24|
;;;1133 }
;;;1134 else if ((pd->dataNum >= 1) && (pd->dataNum <= 1023))
000018 8842 LDRH r2,[r0,#2]
00001a 2a01 CMP r2,#1
00001c db17 BLT |L3.78|
00001e 8842 LDRH r2,[r0,#2]
000020 f5b26f80 CMP r2,#0x400
000024 da13 BGE |L3.78|
;;;1135 {
;;;1136 if ((*pData == 0x0d) || (*pData == 0x0a))
000026 780a LDRB r2,[r1,#0]
000028 2a0d CMP r2,#0xd
00002a d002 BEQ |L3.50|
00002c 780a LDRB r2,[r1,#0]
00002e 2a0a CMP r2,#0xa
000030 d105 BNE |L3.62|
|L3.50|
;;;1137 {
;;;1138 pd->oneFrame = pd->dataNum;
000032 8842 LDRH r2,[r0,#2]
000034 8002 STRH r2,[r0,#0]
;;;1139 pd->dataNum = 0;
000036 2200 MOVS r2,#0
000038 8042 STRH r2,[r0,#2]
;;;1140 pd->dataLeft = 0;
00003a 8082 STRH r2,[r0,#4]
00003c e00b B |L3.86|
|L3.62|
;;;1141 }
;;;1142 else
;;;1143 {
;;;1144 pd->frmBuf[pd->dataNum++] = *pData;
00003e 780b LDRB r3,[r1,#0]
000040 8844 LDRH r4,[r0,#2]
000042 1c62 ADDS r2,r4,#1
000044 8042 STRH r2,[r0,#2]
000046 f1000208 ADD r2,r0,#8
00004a 5513 STRB r3,[r2,r4]
00004c e003 B |L3.86|
|L3.78|
;;;1145 }
;;;1146 }
;;;1147 else
;;;1148 {
;;;1149 pd->oneFrame = 0;
00004e 2200 MOVS r2,#0
000050 8002 STRH r2,[r0,#0]
;;;1150 pd->dataNum = 0;
000052 8042 STRH r2,[r0,#2]
;;;1151 pd->dataLeft = 0;
000054 8082 STRH r2,[r0,#4]
|L3.86|
;;;1152 }
;;;1153 }
000056 bd10 POP {r4,pc}
;;;1154
ENDP
AREA ||i.Modbus_ASCII_Process||, CODE, READONLY, ALIGN=2
REQUIRE _printf_pre_padding
REQUIRE _printf_percent
REQUIRE _printf_flags
REQUIRE _printf_widthprec
REQUIRE _printf_x
REQUIRE _printf_longlong_hex
Modbus_ASCII_Process PROC
;;;1342
;;;1343 unsigned int Modbus_ASCII_Process(unsigned char *string_in,unsigned short strLen,unsigned char *str_out)
000000 e92d4ffe PUSH {r1-r11,lr}
;;;1344 {
000004 4681 MOV r9,r0
000006 460f MOV r7,r1
000008 4692 MOV r10,r2
;;;1345 static unsigned char buff[1024];
;;;1346 unsigned short data;
;;;1347 unsigned short len;
;;;1348 unsigned short i;
;;;1349 unsigned short count;
;;;1350 unsigned short address;
;;;1351 unsigned char lrc;
;;;1352 unsigned char lrcStr[2];
;;;1353
;;;1354 len = 0;
00000a 2000 MOVS r0,#0
00000c 9002 STR r0,[sp,#8]
;;;1355 for(i = 0; i < strLen / 2; i++)
00000e 2400 MOVS r4,#0
000010 e00d B |L4.46|
|L4.18|
;;;1356 {
;;;1357 buff[i] = HexAscii2Decimal(string_in[2*i+1],string_in[2*i+2]);
000012 0062 LSLS r2,r4,#1
000014 1c92 ADDS r2,r2,#2
000016 f8191002 LDRB r1,[r9,r2]
00001a 0062 LSLS r2,r4,#1
00001c 1c52 ADDS r2,r2,#1
00001e f8190002 LDRB r0,[r9,r2]
000022 f7fffffe BL HexAscii2Decimal
000026 4991 LDR r1,|L4.620|
000028 5508 STRB r0,[r1,r4]
00002a 1c60 ADDS r0,r4,#1 ;1355
00002c b284 UXTH r4,r0 ;1355
|L4.46|
00002e eb0771d7 ADD r1,r7,r7,LSR #31 ;1355
000032 ebb40f61 CMP r4,r1,ASR #1 ;1355
000036 dbec BLT |L4.18|
;;;1358 }
;;;1359
;;;1360 lrc = GetLRC(buff,strLen / 2 - 1);
000038 46bb MOV r11,r7
00003a eb0770db ADD r0,r7,r11,LSR #31
00003e 1040 ASRS r0,r0,#1
000040 1e41 SUBS r1,r0,#1
000042 488a LDR r0,|L4.620|
000044 f7fffffe BL GetLRC
000048 9001 STR r0,[sp,#4]
;;;1361
;;;1362 sprintf((char*)lrcStr,"%02X",lrc);
00004a a189 ADR r1,|L4.624|
00004c 4668 MOV r0,sp
00004e 9a01 LDR r2,[sp,#4]
000050 f7fffffe BL __2sprintf
;;;1363 if((lrcStr[0] != string_in[strLen-2]) || (lrcStr[1] != string_in[strLen-1]))
000054 f89d1000 LDRB r1,[sp,#0]
000058 1eb8 SUBS r0,r7,#2
00005a f8190000 LDRB r0,[r9,r0]
00005e 4281 CMP r1,r0
000060 d106 BNE |L4.112|
000062 f89d1001 LDRB r1,[sp,#1]
000066 1e78 SUBS r0,r7,#1
000068 f8190000 LDRB r0,[r9,r0]
00006c 4281 CMP r1,r0
00006e d002 BEQ |L4.118|
|L4.112|
;;;1364 {
;;;1365 return 0;
000070 2000 MOVS r0,#0
|L4.114|
;;;1366 }
;;;1367
;;;1368 if(buff[1] == 0x01)
;;;1369 {
;;;1370 address = (buff[2] << 8) + buff[3];
;;;1371 count = (buff[4] << 8) + buff[5];
;;;1372 len = Modbus_ASCII_Response_CMD1(str_out,0x01,address,count);
;;;1373 }
;;;1374 else if(buff[1] == 0x03)
;;;1375 {
;;;1376 address = (buff[2] << 8) + buff[3];
;;;1377 count = (buff[4] << 8) + buff[5];
;;;1378 len = Modbus_ASCII_Response_CMD3(str_out,0x01,address,count);
;;;1379 }
;;;1380 else if(buff[1] == 0x0F)
;;;1381 {
;;;1382 address = (buff[2] << 8) + buff[3];
;;;1383 count = (buff[4] << 8) + buff[5];
;;;1384
;;;1385 for(i = 0; i < count; i++)
;;;1386 {
;;;1387 data = buff[(7+(i/8))] & (0x01 << (i%8));
;;;1388 if(data)
;;;1389 {
;;;1390 data = PLC_Get_D(2014 + ((address + i) / 16));
;;;1391 data |= 0x01 << ((address + i) % 16);
;;;1392 PLC_Set_D((2014 + ((address + i) / 16)),data);
;;;1393 }
;;;1394 else
;;;1395 {
;;;1396 data = PLC_Get_D(2014 + ((address + i) / 16));
;;;1397 data &= ~(0x01 << ((address + i) % 16));
;;;1398 PLC_Set_D((2014 + ((address + i) / 16)),data);
;;;1399 }
;;;1400 }
;;;1401 len = Modbus_ASCII_Response_CMD15(str_out,0x01,address,count);
;;;1402 }
;;;1403 else if(buff[1] == 0x10)
;;;1404 {
;;;1405 address = (buff[2] << 8) + buff[3];
;;;1406 count = (buff[4] << 8) + buff[5];
;;;1407
;;;1408 for(i = 0; i < count; i++)
;;;1409 {
;;;1410 data = (buff[7+2*i]<<8) | buff[8+2*i];
;;;1411 PLC_Set_D(1000+address+i,data);
;;;1412
;;;1413 if(1000+address+i >= 1091)
;;;1414 Uart_Printf(COM1,"addr=%d data=%d\r\n",1000+address+i,data);
;;;1415 }
;;;1416
;;;1417 len = Modbus_ASCII_Response_CMD16(str_out,0x01,address,count);
;;;1418 }
;;;1419
;;;1420 return len;
;;;1421 }
000072 e8bd8ffe POP {r1-r11,pc}
|L4.118|
000076 487d LDR r0,|L4.620|
000078 7840 LDRB r0,[r0,#1] ;1368 ; buff
00007a 2801 CMP r0,#1 ;1368
00007c d116 BNE |L4.172|
00007e 487b LDR r0,|L4.620|
000080 78c0 LDRB r0,[r0,#3] ;1370 ; buff
000082 497a LDR r1,|L4.620|
000084 7889 LDRB r1,[r1,#2] ;1370 ; buff
000086 eb002001 ADD r0,r0,r1,LSL #8 ;1370
00008a b285 UXTH r5,r0 ;1370
00008c 4877 LDR r0,|L4.620|
00008e 7940 LDRB r0,[r0,#5] ;1371 ; buff
000090 4976 LDR r1,|L4.620|
000092 7909 LDRB r1,[r1,#4] ;1371 ; buff
000094 eb002001 ADD r0,r0,r1,LSL #8 ;1371
000098 b286 UXTH r6,r0 ;1371
00009a b2f3 UXTB r3,r6 ;1372
00009c 462a MOV r2,r5 ;1372
00009e 2101 MOVS r1,#1 ;1372
0000a0 4650 MOV r0,r10 ;1372
0000a2 f7fffffe BL Modbus_ASCII_Response_CMD1
0000a6 b280 UXTH r0,r0 ;1372
0000a8 9002 STR r0,[sp,#8] ;1372
0000aa e0dd B |L4.616|
|L4.172|
0000ac 486f LDR r0,|L4.620|
0000ae 7840 LDRB r0,[r0,#1] ;1374 ; buff
0000b0 2803 CMP r0,#3 ;1374
0000b2 d116 BNE |L4.226|
0000b4 486d LDR r0,|L4.620|
0000b6 78c0 LDRB r0,[r0,#3] ;1376 ; buff
0000b8 496c LDR r1,|L4.620|
0000ba 7889 LDRB r1,[r1,#2] ;1376 ; buff
0000bc eb002001 ADD r0,r0,r1,LSL #8 ;1376
0000c0 b285 UXTH r5,r0 ;1376
0000c2 486a LDR r0,|L4.620|
0000c4 7940 LDRB r0,[r0,#5] ;1377 ; buff
0000c6 4969 LDR r1,|L4.620|
0000c8 7909 LDRB r1,[r1,#4] ;1377 ; buff
0000ca eb002001 ADD r0,r0,r1,LSL #8 ;1377
0000ce b286 UXTH r6,r0 ;1377
0000d0 b2f3 UXTB r3,r6 ;1378
0000d2 462a MOV r2,r5 ;1378
0000d4 2101 MOVS r1,#1 ;1378
0000d6 4650 MOV r0,r10 ;1378
0000d8 f7fffffe BL Modbus_ASCII_Response_CMD3
0000dc b280 UXTH r0,r0 ;1378
0000de 9002 STR r0,[sp,#8] ;1378
0000e0 e0c2 B |L4.616|
|L4.226|
0000e2 4862 LDR r0,|L4.620|
0000e4 7840 LDRB r0,[r0,#1] ;1380 ; buff
0000e6 280f CMP r0,#0xf ;1380
0000e8 d17f BNE |L4.490|
0000ea 4860 LDR r0,|L4.620|
0000ec 78c0 LDRB r0,[r0,#3] ;1382 ; buff
0000ee 495f LDR r1,|L4.620|
0000f0 7889 LDRB r1,[r1,#2] ;1382 ; buff
0000f2 eb002001 ADD r0,r0,r1,LSL #8 ;1382
0000f6 b285 UXTH r5,r0 ;1382
0000f8 485c LDR r0,|L4.620|
0000fa 7940 LDRB r0,[r0,#5] ;1383 ; buff
0000fc 495b LDR r1,|L4.620|
0000fe 7909 LDRB r1,[r1,#4] ;1383 ; buff
000100 eb002001 ADD r0,r0,r1,LSL #8 ;1383
000104 b286 UXTH r6,r0 ;1383
000106 2400 MOVS r4,#0 ;1385
000108 e063 B |L4.466|
|L4.266|
00010a 4620 MOV r0,r4 ;1387
00010c 17e2 ASRS r2,r4,#31 ;1387
00010e eb047252 ADD r2,r4,r2,LSR #29 ;1387
000112 10d2 ASRS r2,r2,#3 ;1387
000114 1dd2 ADDS r2,r2,#7 ;1387
000116 4b55 LDR r3,|L4.620|
000118 5c9a LDRB r2,[r3,r2] ;1387
00011a 4621 MOV r1,r4 ;1387
00011c 17e3 ASRS r3,r4,#31 ;1387
00011e eb047353 ADD r3,r4,r3,LSR #29 ;1387
000122 10db ASRS r3,r3,#3 ;1387
000124 eba40cc3 SUB r12,r4,r3,LSL #3 ;1387
000128 2301 MOVS r3,#1 ;1387
00012a fa03f30c LSL r3,r3,r12 ;1387
00012e ea020803 AND r8,r2,r3 ;1387
000132 f1b80f00 CMP r8,#0 ;1388
000136 d026 BEQ |L4.390|
000138 eb050b04 ADD r11,r5,r4 ;1390
00013c ea4f71eb ASR r1,r11,#31 ;1390
000140 eb0b7111 ADD r1,r11,r1,LSR #28 ;1390
000144 1109 ASRS r1,r1,#4 ;1390
000146 f20171de ADD r1,r1,#0x7de ;1390
00014a b288 UXTH r0,r1 ;1390
00014c f7fffffe BL PLC_Get_D
000150 4680 MOV r8,r0 ;1390
000152 1928 ADDS r0,r5,r4 ;1391
000154 17c1 ASRS r1,r0,#31 ;1391
000156 eb007111 ADD r1,r0,r1,LSR #28 ;1391
00015a 1109 ASRS r1,r1,#4 ;1391
00015c eba01201 SUB r2,r0,r1,LSL #4 ;1391
000160 2101 MOVS r1,#1 ;1391
000162 4091 LSLS r1,r1,r2 ;1391
000164 ea410108 ORR r1,r1,r8 ;1391
000168 fa1ff881 UXTH r8,r1 ;1391
00016c eb050b04 ADD r11,r5,r4 ;1392
000170 ea4f71eb ASR r1,r11,#31 ;1392
000174 eb0b7111 ADD r1,r11,r1,LSR #28 ;1392
000178 1109 ASRS r1,r1,#4 ;1392
00017a f20170de ADD r0,r1,#0x7de ;1392
00017e 4641 MOV r1,r8 ;1392
000180 f7fffffe BL PLC_Set_D
000184 e023 B |L4.462|
|L4.390|
000186 eb050b04 ADD r11,r5,r4 ;1396
00018a ea4f71eb ASR r1,r11,#31 ;1396
00018e eb0b7111 ADD r1,r11,r1,LSR #28 ;1396
000192 1109 ASRS r1,r1,#4 ;1396
000194 f20171de ADD r1,r1,#0x7de ;1396
000198 b288 UXTH r0,r1 ;1396
00019a f7fffffe BL PLC_Get_D
00019e 4680 MOV r8,r0 ;1396
0001a0 1928 ADDS r0,r5,r4 ;1397
0001a2 17c1 ASRS r1,r0,#31 ;1397
0001a4 eb007111 ADD r1,r0,r1,LSR #28 ;1397
0001a8 1109 ASRS r1,r1,#4 ;1397
0001aa eba01201 SUB r2,r0,r1,LSL #4 ;1397
0001ae 2101 MOVS r1,#1 ;1397
0001b0 4091 LSLS r1,r1,r2 ;1397
0001b2 ea280801 BIC r8,r8,r1 ;1397
0001b6 eb050b04 ADD r11,r5,r4 ;1398
0001ba ea4f71eb ASR r1,r11,#31 ;1398
0001be eb0b7111 ADD r1,r11,r1,LSR #28 ;1398
0001c2 1109 ASRS r1,r1,#4 ;1398
0001c4 f20170de ADD r0,r1,#0x7de ;1398
0001c8 4641 MOV r1,r8 ;1398
0001ca f7fffffe BL PLC_Set_D
|L4.462|
0001ce 1c60 ADDS r0,r4,#1 ;1385
0001d0 b284 UXTH r4,r0 ;1385
|L4.466|
0001d2 42b4 CMP r4,r6 ;1385
0001d4 db99 BLT |L4.266|
0001d6 b2f3 UXTB r3,r6 ;1401
0001d8 462a MOV r2,r5 ;1401
0001da 2101 MOVS r1,#1 ;1401
0001dc 4650 MOV r0,r10 ;1401
0001de f7fffffe BL Modbus_ASCII_Response_CMD15
0001e2 b280 UXTH r0,r0 ;1401
0001e4 9002 STR r0,[sp,#8] ;1401
0001e6 e03f B |L4.616|
0001e8 e7ff B |L4.490|
|L4.490|
0001ea 4820 LDR r0,|L4.620|
0001ec 7840 LDRB r0,[r0,#1] ;1403 ; buff
0001ee 2810 CMP r0,#0x10 ;1403
0001f0 d13a BNE |L4.616|
0001f2 481e LDR r0,|L4.620|
0001f4 78c0 LDRB r0,[r0,#3] ;1405 ; buff
0001f6 491d LDR r1,|L4.620|
0001f8 7889 LDRB r1,[r1,#2] ;1405 ; buff
0001fa eb002001 ADD r0,r0,r1,LSL #8 ;1405
0001fe b285 UXTH r5,r0 ;1405
000200 481a LDR r0,|L4.620|
000202 7940 LDRB r0,[r0,#5] ;1406 ; buff
000204 4919 LDR r1,|L4.620|
000206 7909 LDRB r1,[r1,#4] ;1406 ; buff
000208 eb002001 ADD r0,r0,r1,LSL #8 ;1406
00020c b286 UXTH r6,r0 ;1406
00020e 2400 MOVS r4,#0 ;1408
000210 e020 B |L4.596|
|L4.530|
000212 0060 LSLS r0,r4,#1 ;1410
000214 3008 ADDS r0,r0,#8 ;1410
000216 4915 LDR r1,|L4.620|
000218 5c09 LDRB r1,[r1,r0] ;1410
00021a 0060 LSLS r0,r4,#1 ;1410
00021c 1dc0 ADDS r0,r0,#7 ;1410
00021e 4a13 LDR r2,|L4.620|
000220 5c10 LDRB r0,[r2,r0] ;1410
000222 ea412800 ORR r8,r1,r0,LSL #8 ;1410
000226 f505717a ADD r1,r5,#0x3e8 ;1411
00022a 1908 ADDS r0,r1,r4 ;1411
00022c 4641 MOV r1,r8 ;1411
00022e f7fffffe BL PLC_Set_D
000232 f505707a ADD r0,r5,#0x3e8 ;1413
000236 4420 ADD r0,r0,r4 ;1413
000238 f2404143 MOV r1,#0x443 ;1413
00023c 4288 CMP r0,r1 ;1413
00023e db07 BLT |L4.592|
000240 f505707a ADD r0,r5,#0x3e8 ;1414
000244 1902 ADDS r2,r0,r4 ;1414
000246 4643 MOV r3,r8 ;1414
000248 a10b ADR r1,|L4.632|
00024a 2001 MOVS r0,#1 ;1414
00024c f7fffffe BL Uart_Printf
|L4.592|
000250 1c60 ADDS r0,r4,#1 ;1408
000252 b284 UXTH r4,r0 ;1408
|L4.596|
000254 42b4 CMP r4,r6 ;1408
000256 dbdc BLT |L4.530|
000258 b2f3 UXTB r3,r6 ;1417
00025a 462a MOV r2,r5 ;1417
00025c 2101 MOVS r1,#1 ;1417
00025e 4650 MOV r0,r10 ;1417
000260 f7fffffe BL Modbus_ASCII_Response_CMD16
000264 b280 UXTH r0,r0 ;1417
000266 9002 STR r0,[sp,#8] ;1417
|L4.616|
000268 9802 LDR r0,[sp,#8] ;1420
00026a e702 B |L4.114|
;;;1422
ENDP
|L4.620|
DCD buff
|L4.624|
000270 25303258 DCB "%02X",0
000274 00
000275 00 DCB 0
000276 00 DCB 0
000277 00 DCB 0
|L4.632|
000278 61646472 DCB "addr=%d data=%d\r\n",0
00027c 3d256420
000280 64617461
000284 3d25640d
000288 0a00
00028a 00 DCB 0
00028b 00 DCB 0
AREA ||i.Modbus_ASCII_ProcessUartCommand||, CODE, READONLY, ALIGN=2
Modbus_ASCII_ProcessUartCommand PROC
;;;1422
;;;1423 void Modbus_ASCII_ProcessUartCommand(unsigned char uart_id,DipperdeFramer *pDipperdeFramer,unsigned char *pData)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;1424 {
000004 4607 MOV r7,r0
000006 460c MOV r4,r1
000008 4615 MOV r5,r2
;;;1425
;;;1426 static unsigned char str_out[300];
;;;1427 unsigned int len;
;;;1428
;;;1429 len = 0;
00000a 2600 MOVS r6,#0
;;;1430 Modbus_ASCII_DippFramer(pDipperdeFramer,pData);
00000c 4629 MOV r1,r5
00000e 4620 MOV r0,r4
000010 f7fffffe BL Modbus_ASCII_DippFramer
;;;1431
;;;1432 if(pDipperdeFramer->oneFrame)
000014 8820 LDRH r0,[r4,#0]
000016 b170 CBZ r0,|L5.54|
;;;1433 {
;;;1434 len = Modbus_ASCII_Process(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame,str_out);
000018 8821 LDRH r1,[r4,#0]
00001a 4a08 LDR r2,|L5.60|
00001c f1040008 ADD r0,r4,#8
000020 f7fffffe BL Modbus_ASCII_Process
000024 4606 MOV r6,r0
;;;1435 if(len)
000026 b126 CBZ r6,|L5.50|
;;;1436 {
;;;1437 WriteUart(uart_id,str_out,len);
000028 4632 MOV r2,r6
00002a 4904 LDR r1,|L5.60|
00002c 4638 MOV r0,r7
00002e f7fffffe BL WriteUart
|L5.50|
;;;1438 }
;;;1439 pDipperdeFramer->oneFrame = 0;
000032 2000 MOVS r0,#0
000034 8020 STRH r0,[r4,#0]
|L5.54|
;;;1440 }
;;;1441 }
000036 e8bd81f0 POP {r4-r8,pc}
;;;1442 /////////////////////////////////////////////////////////////////////////////////////////
ENDP
00003a 0000 DCW 0x0000
|L5.60|
DCD |symbol_number.137|
AREA ||i.Modbus_ASCII_Response_CMD1||, CODE, READONLY, ALIGN=2
REQUIRE _printf_pre_padding
REQUIRE _printf_percent
REQUIRE _printf_flags
REQUIRE _printf_widthprec
REQUIRE _printf_x
REQUIRE _printf_longlong_hex
Modbus_ASCII_Response_CMD1 PROC
;;;1154
;;;1155 unsigned int Modbus_ASCII_Response_CMD1(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d5fff PUSH {r0-r12,lr}
;;;1156 {
000004 4680 MOV r8,r0
000006 468b MOV r11,r1
000008 4692 MOV r10,r2
00000a 461c MOV r4,r3
;;;1157 int i,count;
;;;1158 static unsigned char buf[1024];
;;;1159 unsigned char lrc;
;;;1160 unsigned short index;
;;;1161 unsigned short offset;
;;;1162 unsigned short mAddrss;
;;;1163 unsigned char mask;
;;;1164 unsigned char *pStr;
;;;1165
;;;1166 if(dataCount == 0)
00000c b91c CBNZ r4,|L6.22|
;;;1167 return 0;
00000e 2000 MOVS r0,#0
|L6.16|
;;;1168
;;;1169 buf[0] = address;
;;;1170 buf[1] = 0x01;
;;;1171 buf[2] = dataCount/8;
;;;1172 if(dataCount%8)
;;;1173 {
;;;1174 buf[2]++;
;;;1175 }
;;;1176
;;;1177 mAddrss = dataAddress;
;;;1178
;;;1179 for(count = 0; count < buf[2]; count++)
;;;1180 {
;;;1181 mask = 0x01;
;;;1182 buf[3+count] = 0x00;
;;;1183 for(i = 0; i < 8; i++)
;;;1184 {
;;;1185 index = mAddrss/16;
;;;1186 offset = mAddrss%16;
;;;1187
;;;1188 if(PLC_Get_D(2014+index) & (0x01 << offset))//D2014开始位置
;;;1189 {
;;;1190 buf[3+count] |= mask;
;;;1191 }
;;;1192 mask <<= 1;
;;;1193 mAddrss++;
;;;1194 if(mAddrss - dataAddress == dataCount)
;;;1195 break;
;;;1196 }
;;;1197 }
;;;1198
;;;1199 lrc = GetLRC(buf,3+count);
;;;1200
;;;1201 pStr = string_out;
;;;1202 string_out[0] = ':';
;;;1203 pStr++;
;;;1204 for(i = 0; i < 3+count; i++)
;;;1205 {
;;;1206 sprintf((char*)pStr,"%02X",buf[i]);
;;;1207 pStr += 2;
;;;1208 }
;;;1209
;;;1210 sprintf((char*)pStr,"%02X",lrc);
;;;1211 pStr += 2;
;;;1212
;;;1213 *pStr = 0x0d;
;;;1214 pStr++;
;;;1215 *pStr = 0x0a;
;;;1216 pStr++;
;;;1217
;;;1218 return pStr-string_out;
;;;1219 }
000010 b004 ADD sp,sp,#0x10
000012 e8bd9ff0 POP {r4-r12,pc}
|L6.22|
000016 4843 LDR r0,|L6.292|
000018 f880b000 STRB r11,[r0,#0] ;1169
00001c 2001 MOVS r0,#1 ;1170
00001e 4941 LDR r1,|L6.292|
000020 7048 STRB r0,[r1,#1] ;1170
000022 4620 MOV r0,r4 ;1171
000024 17e1 ASRS r1,r4,#31 ;1171
000026 eb047151 ADD r1,r4,r1,LSR #29 ;1171
00002a f3c101c7 UBFX r1,r1,#3,#8 ;1171
00002e 4a3d LDR r2,|L6.292|
000030 7091 STRB r1,[r2,#2] ;1171
000032 17e1 ASRS r1,r4,#31 ;1172
000034 eb047151 ADD r1,r4,r1,LSR #29 ;1172
000038 10c9 ASRS r1,r1,#3 ;1172
00003a eba401c1 SUB r1,r4,r1,LSL #3 ;1172
00003e b121 CBZ r1,|L6.74|
000040 4610 MOV r0,r2 ;1174
000042 7880 LDRB r0,[r0,#2] ;1174 ; buf
000044 1c40 ADDS r0,r0,#1 ;1174
000046 4611 MOV r1,r2 ;1174
000048 7088 STRB r0,[r1,#2] ;1174
|L6.74|
00004a 4655 MOV r5,r10 ;1177
00004c 2700 MOVS r7,#0 ;1179
00004e e03b B |L6.200|
|L6.80|
000050 2001 MOVS r0,#1 ;1181
000052 9000 STR r0,[sp,#0] ;1181
000054 2100 MOVS r1,#0 ;1182
000056 1cf8 ADDS r0,r7,#3 ;1182
000058 4a32 LDR r2,|L6.292|
00005a 5411 STRB r1,[r2,r0] ;1182
00005c 4689 MOV r9,r1 ;1183
00005e e02e B |L6.190|
|L6.96|
000060 4628 MOV r0,r5 ;1185
000062 17e9 ASRS r1,r5,#31 ;1185
000064 eb057111 ADD r1,r5,r1,LSR #28 ;1185
000068 f3c1110f UBFX r1,r1,#4,#16 ;1185
00006c 9102 STR r1,[sp,#8] ;1185
00006e 17e9 ASRS r1,r5,#31 ;1186
000070 eb057111 ADD r1,r5,r1,LSR #28 ;1186
000074 1109 ASRS r1,r1,#4 ;1186
000076 eba51101 SUB r1,r5,r1,LSL #4 ;1186
00007a b289 UXTH r1,r1 ;1186
00007c 9101 STR r1,[sp,#4] ;1186
00007e 9902 LDR r1,[sp,#8] ;1188
000080 f20171de ADD r1,r1,#0x7de ;1188
000084 b288 UXTH r0,r1 ;1188
000086 f7fffffe BL PLC_Get_D
00008a 2201 MOVS r2,#1 ;1188
00008c 9901 LDR r1,[sp,#4] ;1188
00008e 408a LSLS r2,r2,r1 ;1188
000090 4010 ANDS r0,r0,r2 ;1188
000092 b138 CBZ r0,|L6.164|
000094 1cf8 ADDS r0,r7,#3 ;1190
000096 4923 LDR r1,|L6.292|
000098 5c08 LDRB r0,[r1,r0] ;1190
00009a 9900 LDR r1,[sp,#0] ;1190
00009c 4308 ORRS r0,r0,r1 ;1190
00009e 1cf9 ADDS r1,r7,#3 ;1190
0000a0 4a20 LDR r2,|L6.292|
0000a2 5450 STRB r0,[r2,r1] ;1190
|L6.164|
0000a4 9800 LDR r0,[sp,#0] ;1192
0000a6 0640 LSLS r0,r0,#25 ;1192
0000a8 0e00 LSRS r0,r0,#24 ;1192
0000aa 9000 STR r0,[sp,#0] ;1192
0000ac 1c68 ADDS r0,r5,#1 ;1193
0000ae b285 UXTH r5,r0 ;1193
0000b0 eba5000a SUB r0,r5,r10 ;1194
0000b4 42a0 CMP r0,r4 ;1194
0000b6 d100 BNE |L6.186|
0000b8 e004 B |L6.196|
|L6.186|
0000ba f1090901 ADD r9,r9,#1 ;1183
|L6.190|
0000be f1b90f08 CMP r9,#8 ;1183
0000c2 dbcd BLT |L6.96|
|L6.196|
0000c4 bf00 NOP ;1195
0000c6 1c7f ADDS r7,r7,#1 ;1179
|L6.200|
0000c8 4816 LDR r0,|L6.292|
0000ca 7880 LDRB r0,[r0,#2] ;1179 ; buf
0000cc 42b8 CMP r0,r7 ;1179
0000ce dcbf BGT |L6.80|
0000d0 1cf9 ADDS r1,r7,#3 ;1199
0000d2 4814 LDR r0,|L6.292|
0000d4 f7fffffe BL GetLRC
0000d8 9003 STR r0,[sp,#0xc] ;1199
0000da 4646 MOV r6,r8 ;1201
0000dc 203a MOVS r0,#0x3a ;1202
0000de f8880000 STRB r0,[r8,#0] ;1202
0000e2 1c76 ADDS r6,r6,#1 ;1203
0000e4 f04f0900 MOV r9,#0 ;1204
0000e8 e009 B |L6.254|
|L6.234|
0000ea 480e LDR r0,|L6.292|
0000ec f8102009 LDRB r2,[r0,r9] ;1206
0000f0 a10d ADR r1,|L6.296|
0000f2 4630 MOV r0,r6 ;1206
0000f4 f7fffffe BL __2sprintf
0000f8 1cb6 ADDS r6,r6,#2 ;1207
0000fa f1090901 ADD r9,r9,#1 ;1204
|L6.254|
0000fe 1cf8 ADDS r0,r7,#3 ;1204
000100 4548 CMP r0,r9 ;1204
000102 dcf2 BGT |L6.234|
000104 a108 ADR r1,|L6.296|
000106 4630 MOV r0,r6 ;1210
000108 9a03 LDR r2,[sp,#0xc] ;1210
00010a f7fffffe BL __2sprintf
00010e 1cb6 ADDS r6,r6,#2 ;1211
000110 200d MOVS r0,#0xd ;1213
000112 7030 STRB r0,[r6,#0] ;1213
000114 1c76 ADDS r6,r6,#1 ;1214
000116 200a MOVS r0,#0xa ;1215
000118 7030 STRB r0,[r6,#0] ;1215
00011a 1c76 ADDS r6,r6,#1 ;1216
00011c eba60008 SUB r0,r6,r8 ;1218
000120 e776 B |L6.16|
;;;1220
ENDP
000122 0000 DCW 0x0000
|L6.292|
DCD buf
|L6.296|
000128 25303258 DCB "%02X",0
00012c 00
00012d 00 DCB 0
00012e 00 DCB 0
00012f 00 DCB 0
AREA ||i.Modbus_ASCII_Response_CMD15||, CODE, READONLY, ALIGN=2
REQUIRE _printf_pre_padding
REQUIRE _printf_percent
REQUIRE _printf_flags
REQUIRE _printf_widthprec
REQUIRE _printf_x
REQUIRE _printf_longlong_hex
Modbus_ASCII_Response_CMD15 PROC
;;;1267
;;;1268 unsigned int Modbus_ASCII_Response_CMD15(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d5ff0 PUSH {r4-r12,lr}
;;;1269 {
000004 4605 MOV r5,r0
000006 4689 MOV r9,r1
000008 4616 MOV r6,r2
00000a 461f MOV r7,r3
;;;1270 int i,count;
;;;1271 static unsigned char buf[1024];
;;;1272 unsigned char lrc;
;;;1273 unsigned char *pStr;
;;;1274
;;;1275 buf[0] = address;
00000c 481a LDR r0,|L7.120|
00000e f8809000 STRB r9,[r0,#0]
;;;1276 buf[1] = 0x0f;
000012 200f MOVS r0,#0xf
000014 4918 LDR r1,|L7.120|
000016 7048 STRB r0,[r1,#1]
;;;1277 buf[2] = dataAddress >> 8;
000018 1230 ASRS r0,r6,#8
00001a 7088 STRB r0,[r1,#2]
;;;1278 buf[3] = dataAddress & 0x00ff;
00001c 70ce STRB r6,[r1,#3]
;;;1279 buf[4] = dataCount >> 8;
00001e 1238 ASRS r0,r7,#8
000020 7108 STRB r0,[r1,#4]
;;;1280 buf[5] = dataCount & 0x00ff;
000022 714f STRB r7,[r1,#5]
;;;1281
;;;1282 lrc = GetLRC(buf,6);
000024 2106 MOVS r1,#6
000026 4814 LDR r0,|L7.120|
000028 f7fffffe BL GetLRC
00002c 4683 MOV r11,r0
;;;1283
;;;1284 pStr = string_out;
00002e 462c MOV r4,r5
;;;1285 string_out[0] = ':';
000030 203a MOVS r0,#0x3a
000032 7028 STRB r0,[r5,#0]
;;;1286 pStr++;
000034 1c64 ADDS r4,r4,#1
;;;1287 count = 6;
000036 f04f0a06 MOV r10,#6
;;;1288 for(i = 0; i < count; i++)
00003a f04f0800 MOV r8,#0
00003e e009 B |L7.84|
|L7.64|
;;;1289 {
;;;1290 sprintf((char*)pStr,"%02X",buf[i]);
000040 480d LDR r0,|L7.120|
000042 f8102008 LDRB r2,[r0,r8]
000046 a10d ADR r1,|L7.124|
000048 4620 MOV r0,r4
00004a f7fffffe BL __2sprintf
;;;1291 pStr += 2;
00004e 1ca4 ADDS r4,r4,#2
000050 f1080801 ADD r8,r8,#1 ;1288
|L7.84|
000054 45d0 CMP r8,r10 ;1288
000056 dbf3 BLT |L7.64|
;;;1292 }
;;;1293
;;;1294 sprintf((char*)pStr,"%02X",lrc);
000058 465a MOV r2,r11
00005a a108 ADR r1,|L7.124|
00005c 4620 MOV r0,r4
00005e f7fffffe BL __2sprintf
;;;1295 pStr += 2;
000062 1ca4 ADDS r4,r4,#2
;;;1296
;;;1297 *pStr = 0x0d;
000064 200d MOVS r0,#0xd
000066 7020 STRB r0,[r4,#0]
;;;1298 pStr++;
000068 1c64 ADDS r4,r4,#1
;;;1299 *pStr = 0x0a;
00006a 200a MOVS r0,#0xa
00006c 7020 STRB r0,[r4,#0]
;;;1300 pStr++;
00006e 1c64 ADDS r4,r4,#1
;;;1301
;;;1302 return pStr-string_out;
000070 1b60 SUBS r0,r4,r5
;;;1303 }
000072 e8bd9ff0 POP {r4-r12,pc}
;;;1304
ENDP
000076 0000 DCW 0x0000
|L7.120|
DCD |symbol_number.134|
|L7.124|
00007c 25303258 DCB "%02X",0
000080 00
000081 00 DCB 0
000082 00 DCB 0
000083 00 DCB 0
AREA ||i.Modbus_ASCII_Response_CMD16||, CODE, READONLY, ALIGN=2
REQUIRE _printf_pre_padding
REQUIRE _printf_percent
REQUIRE _printf_flags
REQUIRE _printf_widthprec
REQUIRE _printf_x
REQUIRE _printf_longlong_hex
Modbus_ASCII_Response_CMD16 PROC
;;;1305
;;;1306 unsigned int Modbus_ASCII_Response_CMD16(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d5ff0 PUSH {r4-r12,lr}
;;;1307 {
000004 4605 MOV r5,r0
000006 4689 MOV r9,r1
000008 4616 MOV r6,r2
00000a 461f MOV r7,r3
;;;1308 int i,count;
;;;1309 static unsigned char buf[1024];
;;;1310 unsigned char lrc;
;;;1311 unsigned char *pStr;
;;;1312
;;;1313 buf[0] = address;
00000c 481a LDR r0,|L8.120|
00000e f8809000 STRB r9,[r0,#0]
;;;1314 buf[1] = 0x10;
000012 2010 MOVS r0,#0x10
000014 4918 LDR r1,|L8.120|
000016 7048 STRB r0,[r1,#1]
;;;1315 buf[2] = dataAddress >> 8;
000018 1230 ASRS r0,r6,#8
00001a 7088 STRB r0,[r1,#2]
;;;1316 buf[3] = dataAddress & 0x00ff;
00001c 70ce STRB r6,[r1,#3]
;;;1317 buf[4] = dataCount >> 8;
00001e 1238 ASRS r0,r7,#8
000020 7108 STRB r0,[r1,#4]
;;;1318 buf[5] = dataCount & 0x00ff;
000022 714f STRB r7,[r1,#5]
;;;1319
;;;1320 lrc = GetLRC(buf,6);
000024 2106 MOVS r1,#6
000026 4814 LDR r0,|L8.120|
000028 f7fffffe BL GetLRC
00002c 4683 MOV r11,r0
;;;1321
;;;1322 pStr = string_out;
00002e 462c MOV r4,r5
;;;1323 string_out[0] = ':';
000030 203a MOVS r0,#0x3a
000032 7028 STRB r0,[r5,#0]
;;;1324 pStr++;
000034 1c64 ADDS r4,r4,#1
;;;1325 count = 6;
000036 f04f0a06 MOV r10,#6
;;;1326 for(i = 0; i < count; i++)
00003a f04f0800 MOV r8,#0
00003e e009 B |L8.84|
|L8.64|
;;;1327 {
;;;1328 sprintf((char*)pStr,"%02X",buf[i]);
000040 480d LDR r0,|L8.120|
000042 f8102008 LDRB r2,[r0,r8]
000046 a10d ADR r1,|L8.124|
000048 4620 MOV r0,r4
00004a f7fffffe BL __2sprintf
;;;1329 pStr += 2;
00004e 1ca4 ADDS r4,r4,#2
000050 f1080801 ADD r8,r8,#1 ;1326
|L8.84|
000054 45d0 CMP r8,r10 ;1326
000056 dbf3 BLT |L8.64|
;;;1330 }
;;;1331
;;;1332 sprintf((char*)pStr,"%02X",lrc);
000058 465a MOV r2,r11
00005a a108 ADR r1,|L8.124|
00005c 4620 MOV r0,r4
00005e f7fffffe BL __2sprintf
;;;1333 pStr += 2;
000062 1ca4 ADDS r4,r4,#2
;;;1334
;;;1335 *pStr = 0x0d;
000064 200d MOVS r0,#0xd
000066 7020 STRB r0,[r4,#0]
;;;1336 pStr++;
000068 1c64 ADDS r4,r4,#1
;;;1337 *pStr = 0x0a;
00006a 200a MOVS r0,#0xa
00006c 7020 STRB r0,[r4,#0]
;;;1338 pStr++;
00006e 1c64 ADDS r4,r4,#1
;;;1339
;;;1340 return pStr-string_out;
000070 1b60 SUBS r0,r4,r5
;;;1341 }
000072 e8bd9ff0 POP {r4-r12,pc}
;;;1342
ENDP
000076 0000 DCW 0x0000
|L8.120|
DCD |symbol_number.135|
|L8.124|
00007c 25303258 DCB "%02X",0
000080 00
000081 00 DCB 0
000082 00 DCB 0
000083 00 DCB 0
AREA ||i.Modbus_ASCII_Response_CMD3||, CODE, READONLY, ALIGN=2
REQUIRE _printf_pre_padding
REQUIRE _printf_percent
REQUIRE _printf_flags
REQUIRE _printf_widthprec
REQUIRE _printf_x
REQUIRE _printf_longlong_hex
Modbus_ASCII_Response_CMD3 PROC
;;;1220
;;;1221 unsigned int Modbus_ASCII_Response_CMD3(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d4ff8 PUSH {r3-r11,lr}
;;;1222 {
000004 4606 MOV r6,r0
000006 468a MOV r10,r1
000008 4693 MOV r11,r2
00000a 461f MOV r7,r3
;;;1223 int i,count;
;;;1224 static unsigned char buf[1024];
;;;1225 unsigned short data;
;;;1226 unsigned char lrc;
;;;1227 unsigned char *pStr;
;;;1228
;;;1229 if(dataCount == 0)
00000c b917 CBNZ r7,|L9.20|
;;;1230 return 0;
00000e 2000 MOVS r0,#0
|L9.16|
;;;1231
;;;1232 buf[0] = address;
;;;1233 buf[1] = 0x03;
;;;1234 buf[2] = 2*dataCount;
;;;1235
;;;1236 count = dataCount;
;;;1237 for(i = 0; i < count; i++)
;;;1238 {
;;;1239 data = PLC_Get_D(1000+dataAddress+i);
;;;1240 buf[3+2*i] = data >> 8;
;;;1241 buf[4+2*i] = data & 0x00ff;
;;;1242 }
;;;1243
;;;1244 lrc = GetLRC(buf,3+2*count);
;;;1245
;;;1246 pStr = string_out;
;;;1247 string_out[0] = ':';
;;;1248 pStr++;
;;;1249 count = 3 + 2 * dataCount;
;;;1250 for(i = 0; i < count; i++)
;;;1251 {
;;;1252 sprintf((char*)pStr,"%02X",buf[i]);
;;;1253 pStr += 2;
;;;1254 }
;;;1255
;;;1256 sprintf((char*)pStr,"%02X",lrc);
;;;1257 pStr += 2;
;;;1258
;;;1259 *pStr = 0x0d;
;;;1260 pStr++;
;;;1261 *pStr = 0x0a;
;;;1262 pStr++;
;;;1263
;;;1264 return pStr-string_out;
;;;1265 }
000010 e8bd8ff8 POP {r3-r11,pc}
|L9.20|
000014 4823 LDR r0,|L9.164|
000016 f880a000 STRB r10,[r0,#0] ;1232
00001a 2003 MOVS r0,#3 ;1233
00001c 4921 LDR r1,|L9.164|
00001e 7048 STRB r0,[r1,#1] ;1233
000020 0678 LSLS r0,r7,#25 ;1234
000022 0e00 LSRS r0,r0,#24 ;1234
000024 7088 STRB r0,[r1,#2] ;1234
000026 46b8 MOV r8,r7 ;1236
000028 2500 MOVS r5,#0 ;1237
00002a e011 B |L9.80|
|L9.44|
00002c f50b717a ADD r1,r11,#0x3e8 ;1239
000030 4429 ADD r1,r1,r5 ;1239
000032 b288 UXTH r0,r1 ;1239
000034 f7fffffe BL PLC_Get_D
000038 4681 MOV r9,r0 ;1239
00003a ea4f2129 ASR r1,r9,#8 ;1240
00003e 0068 LSLS r0,r5,#1 ;1240
000040 1cc0 ADDS r0,r0,#3 ;1240
000042 4a18 LDR r2,|L9.164|
000044 5411 STRB r1,[r2,r0] ;1240
000046 0068 LSLS r0,r5,#1 ;1241
000048 1d00 ADDS r0,r0,#4 ;1241
00004a f8029000 STRB r9,[r2,r0] ;1241
00004e 1c6d ADDS r5,r5,#1 ;1237
|L9.80|
000050 4545 CMP r5,r8 ;1237
000052 dbeb BLT |L9.44|
000054 ea4f0048 LSL r0,r8,#1 ;1244
000058 1cc1 ADDS r1,r0,#3 ;1244
00005a 4812 LDR r0,|L9.164|
00005c f7fffffe BL GetLRC
000060 9000 STR r0,[sp,#0] ;1244
000062 4634 MOV r4,r6 ;1246
000064 203a MOVS r0,#0x3a ;1247
000066 7030 STRB r0,[r6,#0] ;1247
000068 1c64 ADDS r4,r4,#1 ;1248
00006a 0078 LSLS r0,r7,#1 ;1249
00006c f1000803 ADD r8,r0,#3 ;1249
000070 2500 MOVS r5,#0 ;1250
000072 e007 B |L9.132|
|L9.116|
000074 480b LDR r0,|L9.164|
000076 5d42 LDRB r2,[r0,r5] ;1252
000078 a10b ADR r1,|L9.168|
00007a 4620 MOV r0,r4 ;1252
00007c f7fffffe BL __2sprintf
000080 1ca4 ADDS r4,r4,#2 ;1253
000082 1c6d ADDS r5,r5,#1 ;1250
|L9.132|
000084 4545 CMP r5,r8 ;1250
000086 dbf5 BLT |L9.116|
000088 a107 ADR r1,|L9.168|
00008a 4620 MOV r0,r4 ;1256
00008c 9a00 LDR r2,[sp,#0] ;1256
00008e f7fffffe BL __2sprintf
000092 1ca4 ADDS r4,r4,#2 ;1257
000094 200d MOVS r0,#0xd ;1259
000096 7020 STRB r0,[r4,#0] ;1259
000098 1c64 ADDS r4,r4,#1 ;1260
00009a 200a MOVS r0,#0xa ;1261
00009c 7020 STRB r0,[r4,#0] ;1261
00009e 1c64 ADDS r4,r4,#1 ;1262
0000a0 1ba0 SUBS r0,r4,r6 ;1264
0000a2 e7b5 B |L9.16|
;;;1266
ENDP
|L9.164|
DCD |symbol_number.133|
|L9.168|
0000a8 25303258 DCB "%02X",0
0000ac 00
0000ad 00 DCB 0
0000ae 00 DCB 0
0000af 00 DCB 0
AREA ||i.Modbus_ProcessCANCommand||, CODE, READONLY, ALIGN=2
Modbus_ProcessCANCommand PROC
;;;1442 /////////////////////////////////////////////////////////////////////////////////////////
;;;1443 void Modbus_ProcessCANCommand(unsigned char can_id,DipperdeFramer *pDipperdeFramer,unsigned char *pData)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;1444 {
000004 4680 MOV r8,r0
000006 460c MOV r4,r1
000008 4615 MOV r5,r2
;;;1445 unsigned short crc;
;;;1446 static unsigned char str_out[300];
;;;1447 unsigned int len;
;;;1448
;;;1449 len = 0;
00000a 2700 MOVS r7,#0
;;;1450 Modbus_RTU_DippFramer(pDipperdeFramer,pData);
00000c 4629 MOV r1,r5
00000e 4620 MOV r0,r4
000010 f7fffffe BL Modbus_RTU_DippFramer
;;;1451
;;;1452 if(pDipperdeFramer->oneFrame)
000014 8820 LDRH r0,[r4,#0]
000016 b300 CBZ r0,|L10.90|
;;;1453 {
;;;1454 crc = (pDipperdeFramer->frmBuf[pDipperdeFramer->oneFrame-1] << 8) | pDipperdeFramer->frmBuf[pDipperdeFramer->oneFrame-2];
000018 8820 LDRH r0,[r4,#0]
00001a 1e80 SUBS r0,r0,#2
00001c f1040108 ADD r1,r4,#8
000020 5c0a LDRB r2,[r1,r0]
000022 8820 LDRH r0,[r4,#0]
000024 1e40 SUBS r0,r0,#1
000026 5c08 LDRB r0,[r1,r0]
000028 ea422600 ORR r6,r2,r0,LSL #8
;;;1455 if(GetCRC(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame-2) == crc)
00002c 8820 LDRH r0,[r4,#0]
00002e 1e81 SUBS r1,r0,#2
000030 f1040008 ADD r0,r4,#8
000034 f7fffffe BL GetCRC
000038 42b0 CMP r0,r6
00003a d10c BNE |L10.86|
;;;1456 {
;;;1457 len = Modbus_RTU_Process(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame,str_out);
00003c 8821 LDRH r1,[r4,#0]
00003e 4a08 LDR r2,|L10.96|
000040 f1040008 ADD r0,r4,#8
000044 f7fffffe BL Modbus_RTU_Process
000048 4607 MOV r7,r0
;;;1458 if(len)
00004a b127 CBZ r7,|L10.86|
;;;1459 {
;;;1460 WriteCAN(201,str_out,len);
00004c 463a MOV r2,r7
00004e 4904 LDR r1,|L10.96|
000050 20c9 MOVS r0,#0xc9
000052 f7fffffe BL WriteCAN
|L10.86|
;;;1461 }
;;;1462 }
;;;1463 pDipperdeFramer->oneFrame = 0;
000056 2000 MOVS r0,#0
000058 8020 STRH r0,[r4,#0]
|L10.90|
;;;1464 }
;;;1465 }
00005a e8bd81f0 POP {r4-r8,pc}
ENDP
00005e 0000 DCW 0x0000
|L10.96|
DCD |symbol_number.138|
AREA ||i.Modbus_RTU_DippFramer||, CODE, READONLY, ALIGN=1
Modbus_RTU_DippFramer PROC
;;;745
;;;746 void Modbus_RTU_DippFramer(DipperdeFramer *pd,unsigned char *pData)
000000 b510 PUSH {r4,lr}
;;;747 {
;;;748 pd->oneFrame = 0;
000002 2200 MOVS r2,#0
000004 8002 STRH r2,[r0,#0]
;;;749 if(pd->dataNum == 0)
000006 8842 LDRH r2,[r0,#2]
000008 b92a CBNZ r2,|L11.22|
;;;750 {
;;;751 if(*pData == 0x01)
00000a 780a LDRB r2,[r1,#0]
00000c 2a01 CMP r2,#1
00000e d16d BNE |L11.236|
;;;752 {
;;;753 pd->frmBuf[0] = 0x01;
000010 7202 STRB r2,[r0,#8]
;;;754 pd->dataNum = 1;
000012 8042 STRH r2,[r0,#2]
000014 e06a B |L11.236|
|L11.22|
;;;755 }
;;;756 }
;;;757 else if(pd->dataNum == 1)
000016 8842 LDRH r2,[r0,#2]
000018 2a01 CMP r2,#1
00001a d116 BNE |L11.74|
;;;758 {
;;;759 if((*pData == 0x01) || (*pData == 0x03) || (*pData == 0x05) || (*pData == 0x06) || (*pData == 0x0F) || (*pData == 0x10))
00001c 780a LDRB r2,[r1,#0]
00001e 2a01 CMP r2,#1
000020 d00e BEQ |L11.64|
000022 780a LDRB r2,[r1,#0]
000024 2a03 CMP r2,#3
000026 d00b BEQ |L11.64|
000028 780a LDRB r2,[r1,#0]
00002a 2a05 CMP r2,#5
00002c d008 BEQ |L11.64|
00002e 780a LDRB r2,[r1,#0]
000030 2a06 CMP r2,#6
000032 d005 BEQ |L11.64|
000034 780a LDRB r2,[r1,#0]
000036 2a0f CMP r2,#0xf
000038 d002 BEQ |L11.64|
00003a 780a LDRB r2,[r1,#0]
00003c 2a10 CMP r2,#0x10
00003e d155 BNE |L11.236|
|L11.64|
;;;760 {
;;;761 pd->frmBuf[1] = *pData;
000040 780b LDRB r3,[r1,#0]
000042 7243 STRB r3,[r0,#9]
;;;762 pd->dataNum = 2;
000044 2202 MOVS r2,#2
000046 8042 STRH r2,[r0,#2]
000048 e050 B |L11.236|
|L11.74|
;;;763 }
;;;764 }
;;;765 else if((pd->dataNum >= 2) &&((pd->dataNum <= 5)))
00004a 8842 LDRH r2,[r0,#2]
00004c 2a02 CMP r2,#2
00004e db0b BLT |L11.104|
000050 8842 LDRH r2,[r0,#2]
000052 2a05 CMP r2,#5
000054 dc08 BGT |L11.104|
;;;766 {
;;;767 pd->frmBuf[pd->dataNum] = *pData;
000056 780b LDRB r3,[r1,#0]
000058 8844 LDRH r4,[r0,#2]
00005a f1000208 ADD r2,r0,#8
00005e 5513 STRB r3,[r2,r4]
;;;768 pd->dataNum++;
000060 8842 LDRH r2,[r0,#2]
000062 1c52 ADDS r2,r2,#1
000064 8042 STRH r2,[r0,#2]
000066 e041 B |L11.236|
|L11.104|
;;;769 }
;;;770 else if (pd->dataNum == 6)
000068 8842 LDRH r2,[r0,#2]
00006a 2a06 CMP r2,#6
00006c d127 BNE |L11.190|
;;;771 {
;;;772 pd->frmBuf[pd->dataNum] = *pData;
00006e 780b LDRB r3,[r1,#0]
000070 8844 LDRH r4,[r0,#2]
000072 f1000208 ADD r2,r0,#8
000076 5513 STRB r3,[r2,r4]
;;;773
;;;774 if((pd->frmBuf[1] == 0x01) || (pd->frmBuf[1] == 0x03) || (pd->frmBuf[1] == 0x05) || (pd->frmBuf[1] == 0x06))
000078 7a42 LDRB r2,[r0,#9]
00007a 2a01 CMP r2,#1
00007c d008 BEQ |L11.144|
00007e 7a42 LDRB r2,[r0,#9]
000080 2a03 CMP r2,#3
000082 d005 BEQ |L11.144|
000084 7a42 LDRB r2,[r0,#9]
000086 2a05 CMP r2,#5
000088 d002 BEQ |L11.144|
00008a 7a42 LDRB r2,[r0,#9]
00008c 2a06 CMP r2,#6
00008e d102 BNE |L11.150|
|L11.144|
;;;775 {
;;;776 pd->dataLeft = 1;
000090 2201 MOVS r2,#1
000092 8082 STRH r2,[r0,#4]
000094 e008 B |L11.168|
|L11.150|
;;;777 }
;;;778 else if((pd->frmBuf[1] == 0x0F) || (pd->frmBuf[1] == 0x10))
000096 7a42 LDRB r2,[r0,#9]
000098 2a0f CMP r2,#0xf
00009a d002 BEQ |L11.162|
00009c 7a42 LDRB r2,[r0,#9]
00009e 2a10 CMP r2,#0x10
0000a0 d102 BNE |L11.168|
|L11.162|
;;;779 {
;;;780 pd->dataLeft = 2 + pd->frmBuf[6];
0000a2 7b82 LDRB r2,[r0,#0xe]
0000a4 1c92 ADDS r2,r2,#2
0000a6 8082 STRH r2,[r0,#4]
|L11.168|
;;;781 }
;;;782 pd->dataNum++;
0000a8 8842 LDRH r2,[r0,#2]
0000aa 1c52 ADDS r2,r2,#1
0000ac 8042 STRH r2,[r0,#2]
;;;783 if(pd->dataLeft > 247)
0000ae f9b02004 LDRSH r2,[r0,#4]
0000b2 2af7 CMP r2,#0xf7
0000b4 dd1a BLE |L11.236|
;;;784 {
;;;785 pd->oneFrame = 0;
0000b6 2200 MOVS r2,#0
0000b8 8002 STRH r2,[r0,#0]
;;;786 pd->dataNum = 0;
0000ba 8042 STRH r2,[r0,#2]
0000bc e016 B |L11.236|
|L11.190|
;;;787 }
;;;788 }
;;;789 else if ((pd->dataNum > 6) && (pd->dataLeft))
0000be 8842 LDRH r2,[r0,#2]
0000c0 2a06 CMP r2,#6
0000c2 dd13 BLE |L11.236|
0000c4 8882 LDRH r2,[r0,#4]
0000c6 b18a CBZ r2,|L11.236|
;;;790 {
;;;791 pd->frmBuf[pd->dataNum] = *pData;
0000c8 780b LDRB r3,[r1,#0]
0000ca 8844 LDRH r4,[r0,#2]
0000cc f1000208 ADD r2,r0,#8
0000d0 5513 STRB r3,[r2,r4]
;;;792 pd->dataNum++;
0000d2 8842 LDRH r2,[r0,#2]
0000d4 1c52 ADDS r2,r2,#1
0000d6 8042 STRH r2,[r0,#2]
;;;793 pd->dataLeft--;
0000d8 8882 LDRH r2,[r0,#4]
0000da 1e52 SUBS r2,r2,#1
0000dc b212 SXTH r2,r2
0000de 8082 STRH r2,[r0,#4]
;;;794 if(pd->dataLeft == 0)
0000e0 8882 LDRH r2,[r0,#4]
0000e2 b91a CBNZ r2,|L11.236|
;;;795 {
;;;796 pd->oneFrame = pd->dataNum;
0000e4 8842 LDRH r2,[r0,#2]
0000e6 8002 STRH r2,[r0,#0]
;;;797 pd->dataNum = 0;
0000e8 2200 MOVS r2,#0
0000ea 8042 STRH r2,[r0,#2]
|L11.236|
;;;798 }
;;;799 }
;;;800 }
0000ec bd10 POP {r4,pc}
;;;801
ENDP
AREA ||i.Modbus_RTU_Host_D_Updata||, CODE, READONLY, ALIGN=2
Modbus_RTU_Host_D_Updata PROC
;;;1030
;;;1031 void Modbus_RTU_Host_D_Updata()
000000 2007 MOVS r0,#7
;;;1032 {
;;;1033 modbus_rtu_host_step = 7;
000002 4901 LDR r1,|L12.8|
000004 7008 STRB r0,[r1,#0]
;;;1034 }
000006 4770 BX lr
;;;1035
ENDP
|L12.8|
DCD modbus_rtu_host_step
AREA ||i.Modbus_RTU_Host_DippFramer||, CODE, READONLY, ALIGN=1
Modbus_RTU_Host_DippFramer PROC
;;;702
;;;703 void Modbus_RTU_Host_DippFramer(DipperdeFramer *pd,unsigned char *pData)
000000 b510 PUSH {r4,lr}
;;;704 {
;;;705 pd->oneFrame = 0;
000002 2200 MOVS r2,#0
000004 8002 STRH r2,[r0,#0]
;;;706 if(pd->dataNum == 0)
000006 8842 LDRH r2,[r0,#2]
000008 b92a CBNZ r2,|L13.22|
;;;707 {
;;;708 if(*pData == 0x01)
00000a 780a LDRB r2,[r1,#0]
00000c 2a01 CMP r2,#1
00000e d148 BNE |L13.162|
;;;709 {
;;;710 pd->frmBuf[0] = 0x01;
000010 7202 STRB r2,[r0,#8]
;;;711 pd->dataNum = 1;
000012 8042 STRH r2,[r0,#2]
000014 e045 B |L13.162|
|L13.22|
;;;712 }
;;;713 }
;;;714 else if(pd->dataNum == 1)
000016 8842 LDRH r2,[r0,#2]
000018 2a01 CMP r2,#1
00001a d104 BNE |L13.38|
;;;715 {
;;;716 pd->frmBuf[1] = *pData;
00001c 780b LDRB r3,[r1,#0]
00001e 7243 STRB r3,[r0,#9]
;;;717 pd->dataNum = 2;
000020 2202 MOVS r2,#2
000022 8042 STRH r2,[r0,#2]
000024 e03d B |L13.162|
|L13.38|
;;;718 }
;;;719 else if(pd->dataNum == 2)
000026 8842 LDRH r2,[r0,#2]
000028 2a02 CMP r2,#2
00002a d123 BNE |L13.116|
;;;720 {
;;;721 if((pd->frmBuf[1] == 0x01) || (pd->frmBuf[1] == 0x02) || (pd->frmBuf[1] == 0x03))
00002c 7a42 LDRB r2,[r0,#9]
00002e 2a01 CMP r2,#1
000030 d005 BEQ |L13.62|
000032 7a42 LDRB r2,[r0,#9]
000034 2a02 CMP r2,#2
000036 d002 BEQ |L13.62|
000038 7a42 LDRB r2,[r0,#9]
00003a 2a03 CMP r2,#3
00003c d103 BNE |L13.70|
|L13.62|
;;;722 {
;;;723 pd->dataLeft = *pData + 2;
00003e 780a LDRB r2,[r1,#0]
000040 1c92 ADDS r2,r2,#2
000042 8082 STRH r2,[r0,#4]
000044 e00d B |L13.98|
|L13.70|
;;;724 }
;;;725 else if((pd->frmBuf[1] == 0x05) || (pd->frmBuf[1] == 0x06) || (pd->frmBuf[1] == 0x0F) || (pd->frmBuf[1] == 0x10))
000046 7a42 LDRB r2,[r0,#9]
000048 2a05 CMP r2,#5
00004a d008 BEQ |L13.94|
00004c 7a42 LDRB r2,[r0,#9]
00004e 2a06 CMP r2,#6
000050 d005 BEQ |L13.94|
000052 7a42 LDRB r2,[r0,#9]
000054 2a0f CMP r2,#0xf
000056 d002 BEQ |L13.94|
000058 7a42 LDRB r2,[r0,#9]
00005a 2a10 CMP r2,#0x10
00005c d101 BNE |L13.98|
|L13.94|
;;;726 {
;;;727 pd->dataLeft = 5;
00005e 2205 MOVS r2,#5
000060 8082 STRH r2,[r0,#4]
|L13.98|
;;;728 }
;;;729
;;;730 pd->frmBuf[pd->dataNum] = *pData;
000062 780b LDRB r3,[r1,#0]
000064 8844 LDRH r4,[r0,#2]
000066 f1000208 ADD r2,r0,#8
00006a 5513 STRB r3,[r2,r4]
;;;731 pd->dataNum++;
00006c 8842 LDRH r2,[r0,#2]
00006e 1c52 ADDS r2,r2,#1
000070 8042 STRH r2,[r0,#2]
000072 e016 B |L13.162|
|L13.116|
;;;732 }
;;;733 else if ((pd->dataNum > 2) && (pd->dataLeft))
000074 8842 LDRH r2,[r0,#2]
000076 2a02 CMP r2,#2
000078 dd13 BLE |L13.162|
00007a 8882 LDRH r2,[r0,#4]
00007c b18a CBZ r2,|L13.162|
;;;734 {
;;;735 pd->frmBuf[pd->dataNum] = *pData;
00007e 780b LDRB r3,[r1,#0]
000080 8844 LDRH r4,[r0,#2]
000082 f1000208 ADD r2,r0,#8
000086 5513 STRB r3,[r2,r4]
;;;736 pd->dataNum++;
000088 8842 LDRH r2,[r0,#2]
00008a 1c52 ADDS r2,r2,#1
00008c 8042 STRH r2,[r0,#2]
;;;737 pd->dataLeft--;
00008e 8882 LDRH r2,[r0,#4]
000090 1e52 SUBS r2,r2,#1
000092 b212 SXTH r2,r2
000094 8082 STRH r2,[r0,#4]
;;;738 if(pd->dataLeft == 0)
000096 8882 LDRH r2,[r0,#4]
000098 b91a CBNZ r2,|L13.162|
;;;739 {
;;;740 pd->oneFrame = pd->dataNum;
00009a 8842 LDRH r2,[r0,#2]
00009c 8002 STRH r2,[r0,#0]
;;;741 pd->dataNum = 0;
00009e 2200 MOVS r2,#0
0000a0 8042 STRH r2,[r0,#2]
|L13.162|
;;;742 }
;;;743 }
;;;744 }
0000a2 bd10 POP {r4,pc}
;;;745
ENDP
AREA ||i.Modbus_RTU_Host_OutTime_Check||, CODE, READONLY, ALIGN=2
Modbus_RTU_Host_OutTime_Check PROC
;;;455
;;;456 void Modbus_RTU_Host_OutTime_Check()
000000 b510 PUSH {r4,lr}
;;;457 {
;;;458 if(bsp_GetRunTime() - modbus_rtu_host_start_time > 1000)
000002 f7fffffe BL bsp_GetRunTime
000006 4905 LDR r1,|L14.28|
000008 6809 LDR r1,[r1,#0] ; modbus_rtu_host_start_time
00000a 1a40 SUBS r0,r0,r1
00000c f5b07f7a CMP r0,#0x3e8
000010 d902 BLS |L14.24|
;;;459 {
;;;460 modbus_rtu_host_response = 0;
000012 2000 MOVS r0,#0
000014 4902 LDR r1,|L14.32|
000016 7008 STRB r0,[r1,#0]
|L14.24|
;;;461 }
;;;462 }
000018 bd10 POP {r4,pc}
;;;463
ENDP
00001a 0000 DCW 0x0000
|L14.28|
DCD modbus_rtu_host_start_time
|L14.32|
DCD modbus_rtu_host_response
AREA ||i.Modbus_RTU_Host_Process||, CODE, READONLY, ALIGN=2
Modbus_RTU_Host_Process PROC
;;;898
;;;899 unsigned int Modbus_RTU_Host_Process(unsigned char *buff,unsigned short buffLen,unsigned char *str_out)
000000 e92d5ff0 PUSH {r4-r12,lr}
;;;900 {
000004 4680 MOV r8,r0
;;;901 unsigned short data;
;;;902 unsigned short len;
;;;903 unsigned short i;
;;;904 unsigned short count;
;;;905 unsigned short address;
;;;906
;;;907 len = 0;
000006 f04f0a00 MOV r10,#0
;;;908
;;;909 if(modbus_rtu_host_step == 0)
00000a 4895 LDR r0,|L15.608|
00000c 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00000e b938 CBNZ r0,|L15.32|
;;;910 {
;;;911 address = modbus_rtu_host_address;
000010 4894 LDR r0,|L15.612|
000012 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;912 count = modbus_rtu_host_num;
000014 4894 LDR r0,|L15.616|
000016 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;913 modbus_rtu_host_response = 0;
000018 2000 MOVS r0,#0
00001a 4994 LDR r1,|L15.620|
00001c 7008 STRB r0,[r1,#0]
00001e e11b B |L15.600|
|L15.32|
;;;914 }
;;;915 else if(modbus_rtu_host_step == 1)
000020 488f LDR r0,|L15.608|
000022 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000024 2801 CMP r0,#1
000026 d14b BNE |L15.192|
;;;916 {
;;;917 address = modbus_rtu_host_address;
000028 488e LDR r0,|L15.612|
00002a 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;918 count = modbus_rtu_host_num;
00002c 488e LDR r0,|L15.616|
00002e 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;919
;;;920 for(i = 0; i < count; i++)
000030 2400 MOVS r4,#0
000032 e03f B |L15.180|
|L15.52|
;;;921 {
;;;922 data = buff[(3+(i/8))] & (0x01 << (i%8));
000034 4620 MOV r0,r4
000036 17e2 ASRS r2,r4,#31
000038 eb047252 ADD r2,r4,r2,LSR #29
00003c 10d2 ASRS r2,r2,#3
00003e 1cd2 ADDS r2,r2,#3
000040 f8182002 LDRB r2,[r8,r2]
000044 4621 MOV r1,r4
000046 17e3 ASRS r3,r4,#31
000048 eb047353 ADD r3,r4,r3,LSR #29
00004c 10db ASRS r3,r3,#3
00004e eba40cc3 SUB r12,r4,r3,LSL #3
000052 2301 MOVS r3,#1
000054 fa03f30c LSL r3,r3,r12
000058 ea020703 AND r7,r2,r3
;;;923 if(data)
00005c b1a7 CBZ r7,|L15.136|
;;;924 {
;;;925 PLC_Set_M((60+i/16)*100 + (i%16));
00005e 17e1 ASRS r1,r4,#31
000060 eb047111 ADD r1,r4,r1,LSR #28
000064 1109 ASRS r1,r1,#4
000066 eba41201 SUB r2,r4,r1,LSL #4
00006a 17e1 ASRS r1,r4,#31
00006c eb047111 ADD r1,r4,r1,LSR #28
000070 1109 ASRS r1,r1,#4
000072 313c ADDS r1,r1,#0x3c
000074 eb0103c1 ADD r3,r1,r1,LSL #3
000078 eb031101 ADD r1,r3,r1,LSL #4
00007c eb020181 ADD r1,r2,r1,LSL #2
000080 b288 UXTH r0,r1
000082 f7fffffe BL PLC_Set_M
000086 e013 B |L15.176|
|L15.136|
;;;926 }
;;;927 else
;;;928 {
;;;929 PLC_Reset_M((60+i/16)*100 + (i%16));
000088 17e1 ASRS r1,r4,#31
00008a eb047111 ADD r1,r4,r1,LSR #28
00008e 1109 ASRS r1,r1,#4
000090 eba41201 SUB r2,r4,r1,LSL #4
000094 17e1 ASRS r1,r4,#31
000096 eb047111 ADD r1,r4,r1,LSR #28
00009a 1109 ASRS r1,r1,#4
00009c 313c ADDS r1,r1,#0x3c
00009e eb0103c1 ADD r3,r1,r1,LSL #3
0000a2 eb031101 ADD r1,r3,r1,LSL #4
0000a6 eb020181 ADD r1,r2,r1,LSL #2
0000aa b288 UXTH r0,r1
0000ac f7fffffe BL PLC_Reset_M
|L15.176|
0000b0 1c60 ADDS r0,r4,#1 ;920
0000b2 b284 UXTH r4,r0 ;920
|L15.180|
0000b4 42ac CMP r4,r5 ;920
0000b6 dbbd BLT |L15.52|
;;;930 }
;;;931 }
;;;932 modbus_rtu_host_response = 0;
0000b8 2000 MOVS r0,#0
0000ba 496c LDR r1,|L15.620|
0000bc 7008 STRB r0,[r1,#0]
0000be e0cb B |L15.600|
|L15.192|
;;;933 }
;;;934 else if(modbus_rtu_host_step == 2)
0000c0 4867 LDR r0,|L15.608|
0000c2 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0000c4 2802 CMP r0,#2
0000c6 d118 BNE |L15.250|
;;;935 {
;;;936 address = modbus_rtu_host_address;
0000c8 4866 LDR r0,|L15.612|
0000ca 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;937 count = modbus_rtu_host_num;
0000cc 4866 LDR r0,|L15.616|
0000ce 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;938
;;;939 for(i = 0; i < count; i++)
0000d0 2400 MOVS r4,#0
0000d2 e00c B |L15.238|
|L15.212|
;;;940 {
;;;941 data = (buff[3+2*i]<<8) | buff[3+2*i];
0000d4 0060 LSLS r0,r4,#1
0000d6 1cc0 ADDS r0,r0,#3
0000d8 f8180000 LDRB r0,[r8,r0]
0000dc ea402700 ORR r7,r0,r0,LSL #8
;;;942 PLC_Set_D(600+i,data);
0000e0 f5047016 ADD r0,r4,#0x258
0000e4 4639 MOV r1,r7
0000e6 f7fffffe BL PLC_Set_D
0000ea 1c60 ADDS r0,r4,#1 ;939
0000ec b284 UXTH r4,r0 ;939
|L15.238|
0000ee 42ac CMP r4,r5 ;939
0000f0 dbf0 BLT |L15.212|
;;;943 }
;;;944 modbus_rtu_host_response = 0;
0000f2 2000 MOVS r0,#0
0000f4 495d LDR r1,|L15.620|
0000f6 7008 STRB r0,[r1,#0]
0000f8 e0ae B |L15.600|
|L15.250|
;;;945
;;;946 }
;;;947 else if(modbus_rtu_host_step == 3)
0000fa 4859 LDR r0,|L15.608|
0000fc 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0000fe 2803 CMP r0,#3
000100 d118 BNE |L15.308|
;;;948 {
;;;949 address = modbus_rtu_host_address;
000102 4858 LDR r0,|L15.612|
000104 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;950 count = modbus_rtu_host_num;
000106 4858 LDR r0,|L15.616|
000108 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;951
;;;952 for(i = 0; i < count; i++)
00010a 2400 MOVS r4,#0
00010c e00c B |L15.296|
|L15.270|
;;;953 {
;;;954 data = (buff[3+2*i]<<8) | buff[3+2*i];
00010e 0060 LSLS r0,r4,#1
000110 1cc0 ADDS r0,r0,#3
000112 f8180000 LDRB r0,[r8,r0]
000116 ea402700 ORR r7,r0,r0,LSL #8
;;;955 PLC_Set_D(606+i,data);
00011a f204205e ADD r0,r4,#0x25e
00011e 4639 MOV r1,r7
000120 f7fffffe BL PLC_Set_D
000124 1c60 ADDS r0,r4,#1 ;952
000126 b284 UXTH r4,r0 ;952
|L15.296|
000128 42ac CMP r4,r5 ;952
00012a dbf0 BLT |L15.270|
;;;956 }
;;;957 modbus_rtu_host_response = 0;
00012c 2000 MOVS r0,#0
00012e 494f LDR r1,|L15.620|
000130 7008 STRB r0,[r1,#0]
000132 e091 B |L15.600|
|L15.308|
;;;958 }
;;;959 else if(modbus_rtu_host_step == 4)
000134 484a LDR r0,|L15.608|
000136 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000138 2804 CMP r0,#4
00013a d118 BNE |L15.366|
;;;960 {
;;;961 address = modbus_rtu_host_address;
00013c 4849 LDR r0,|L15.612|
00013e 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;962 count = modbus_rtu_host_num;
000140 4849 LDR r0,|L15.616|
000142 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;963
;;;964 for(i = 0; i < count; i++)
000144 2400 MOVS r4,#0
000146 e00c B |L15.354|
|L15.328|
;;;965 {
;;;966 data = (buff[3+2*i]<<8) | buff[3+2*i];
000148 0060 LSLS r0,r4,#1
00014a 1cc0 ADDS r0,r0,#3
00014c f8180000 LDRB r0,[r8,r0]
000150 ea402700 ORR r7,r0,r0,LSL #8
;;;967 PLC_Set_D(612+i,data);
000154 f5047019 ADD r0,r4,#0x264
000158 4639 MOV r1,r7
00015a f7fffffe BL PLC_Set_D
00015e 1c60 ADDS r0,r4,#1 ;964
000160 b284 UXTH r4,r0 ;964
|L15.354|
000162 42ac CMP r4,r5 ;964
000164 dbf0 BLT |L15.328|
;;;968 }
;;;969 modbus_rtu_host_response = 0;
000166 2000 MOVS r0,#0
000168 4940 LDR r1,|L15.620|
00016a 7008 STRB r0,[r1,#0]
00016c e074 B |L15.600|
|L15.366|
;;;970 }
;;;971 else if(modbus_rtu_host_step == 5)
00016e 483c LDR r0,|L15.608|
000170 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000172 2805 CMP r0,#5
000174 d118 BNE |L15.424|
;;;972 {
;;;973 address = modbus_rtu_host_address;
000176 483b LDR r0,|L15.612|
000178 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;974 count = modbus_rtu_host_num;
00017a 483b LDR r0,|L15.616|
00017c 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;975
;;;976 for(i = 0; i < count; i++)
00017e 2400 MOVS r4,#0
000180 e00c B |L15.412|
|L15.386|
;;;977 {
;;;978 data = (buff[3+2*i]<<8) | buff[3+2*i];
000182 0060 LSLS r0,r4,#1
000184 1cc0 ADDS r0,r0,#3
000186 f8180000 LDRB r0,[r8,r0]
00018a ea402700 ORR r7,r0,r0,LSL #8
;;;979 PLC_Set_D(618+i,data);
00018e f204206a ADD r0,r4,#0x26a
000192 4639 MOV r1,r7
000194 f7fffffe BL PLC_Set_D
000198 1c60 ADDS r0,r4,#1 ;976
00019a b284 UXTH r4,r0 ;976
|L15.412|
00019c 42ac CMP r4,r5 ;976
00019e dbf0 BLT |L15.386|
;;;980 }
;;;981 modbus_rtu_host_response = 0;
0001a0 2000 MOVS r0,#0
0001a2 4932 LDR r1,|L15.620|
0001a4 7008 STRB r0,[r1,#0]
0001a6 e057 B |L15.600|
|L15.424|
;;;982 }
;;;983 else if(modbus_rtu_host_step == 6)
0001a8 482d LDR r0,|L15.608|
0001aa 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0001ac 2806 CMP r0,#6
0001ae d118 BNE |L15.482|
;;;984 {
;;;985 address = modbus_rtu_host_address;
0001b0 482c LDR r0,|L15.612|
0001b2 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;986 count = modbus_rtu_host_num;
0001b4 482c LDR r0,|L15.616|
0001b6 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;987
;;;988 for(i = 0; i < count; i++)
0001b8 2400 MOVS r4,#0
0001ba e00c B |L15.470|
|L15.444|
;;;989 {
;;;990 data = (buff[3+2*i]<<8) | buff[3+2*i];
0001bc 0060 LSLS r0,r4,#1
0001be 1cc0 ADDS r0,r0,#3
0001c0 f8180000 LDRB r0,[r8,r0]
0001c4 ea402700 ORR r7,r0,r0,LSL #8
;;;991 PLC_Set_D(628+i,data);
0001c8 f504701d ADD r0,r4,#0x274
0001cc 4639 MOV r1,r7
0001ce f7fffffe BL PLC_Set_D
0001d2 1c60 ADDS r0,r4,#1 ;988
0001d4 b284 UXTH r4,r0 ;988
|L15.470|
0001d6 42ac CMP r4,r5 ;988
0001d8 dbf0 BLT |L15.444|
;;;992 }
;;;993 modbus_rtu_host_response = 0;
0001da 2000 MOVS r0,#0
0001dc 4923 LDR r1,|L15.620|
0001de 7008 STRB r0,[r1,#0]
0001e0 e03a B |L15.600|
|L15.482|
;;;994 }
;;;995 else if(modbus_rtu_host_step == 7)
0001e2 481f LDR r0,|L15.608|
0001e4 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0001e6 2807 CMP r0,#7
0001e8 d107 BNE |L15.506|
;;;996 {
;;;997 address = modbus_rtu_host_address;
0001ea 481e LDR r0,|L15.612|
0001ec 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;998 count = modbus_rtu_host_num;
0001ee 481e LDR r0,|L15.616|
0001f0 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;999 modbus_rtu_host_response = 0;
0001f2 2000 MOVS r0,#0
0001f4 491d LDR r1,|L15.620|
0001f6 7008 STRB r0,[r1,#0]
0001f8 e02e B |L15.600|
|L15.506|
;;;1000 }
;;;1001 else if(modbus_rtu_host_step == 8)
0001fa 4819 LDR r0,|L15.608|
0001fc 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0001fe 2808 CMP r0,#8
000200 d107 BNE |L15.530|
;;;1002 {
;;;1003 address = modbus_rtu_host_address;
000202 4818 LDR r0,|L15.612|
000204 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;1004 count = modbus_rtu_host_num;
000206 4818 LDR r0,|L15.616|
000208 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;1005 modbus_rtu_host_response = 0;
00020a 2000 MOVS r0,#0
00020c 4917 LDR r1,|L15.620|
00020e 7008 STRB r0,[r1,#0]
000210 e022 B |L15.600|
|L15.530|
;;;1006 }
;;;1007 else if(modbus_rtu_host_step == 9)
000212 4813 LDR r0,|L15.608|
000214 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000216 2809 CMP r0,#9
000218 d107 BNE |L15.554|
;;;1008 {
;;;1009 address = modbus_rtu_host_address;
00021a 4812 LDR r0,|L15.612|
00021c 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;1010 count = modbus_rtu_host_num;
00021e 4812 LDR r0,|L15.616|
000220 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;1011 modbus_rtu_host_response = 0;
000222 2000 MOVS r0,#0
000224 4911 LDR r1,|L15.620|
000226 7008 STRB r0,[r1,#0]
000228 e016 B |L15.600|
|L15.554|
;;;1012 }
;;;1013 else if(modbus_rtu_host_step == 10)
00022a 480d LDR r0,|L15.608|
00022c 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00022e 280a CMP r0,#0xa
000230 d107 BNE |L15.578|
;;;1014 {
;;;1015 address = modbus_rtu_host_address;
000232 480c LDR r0,|L15.612|
000234 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;1016 count = modbus_rtu_host_num;
000236 480c LDR r0,|L15.616|
000238 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;1017 modbus_rtu_host_response = 0;
00023a 2000 MOVS r0,#0
00023c 490b LDR r1,|L15.620|
00023e 7008 STRB r0,[r1,#0]
000240 e00a B |L15.600|
|L15.578|
;;;1018 }
;;;1019 else if(modbus_rtu_host_step == 11)
000242 4807 LDR r0,|L15.608|
000244 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000246 280b CMP r0,#0xb
000248 d106 BNE |L15.600|
;;;1020 {
;;;1021 address = modbus_rtu_host_address;
00024a 4806 LDR r0,|L15.612|
00024c 8806 LDRH r6,[r0,#0] ; modbus_rtu_host_address
;;;1022 count = modbus_rtu_host_num;
00024e 4806 LDR r0,|L15.616|
000250 7805 LDRB r5,[r0,#0] ; modbus_rtu_host_num
;;;1023 modbus_rtu_host_response = 0;
000252 2000 MOVS r0,#0
000254 4905 LDR r1,|L15.620|
000256 7008 STRB r0,[r1,#0]
|L15.600|
;;;1024 }
;;;1025
;;;1026
;;;1027 return len;
000258 4650 MOV r0,r10
;;;1028 }
00025a e8bd9ff0 POP {r4-r12,pc}
;;;1029
ENDP
00025e 0000 DCW 0x0000
|L15.608|
DCD modbus_rtu_host_step
|L15.612|
DCD modbus_rtu_host_address
|L15.616|
DCD modbus_rtu_host_num
|L15.620|
DCD modbus_rtu_host_response
AREA ||i.Modbus_RTU_Host_ProcessUartCommand||, CODE, READONLY, ALIGN=2
Modbus_RTU_Host_ProcessUartCommand PROC
;;;1092
;;;1093 void Modbus_RTU_Host_ProcessUartCommand(unsigned char uart_id,DipperdeFramer *pDipperdeFramer,unsigned char *pData)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;1094 {
000004 4680 MOV r8,r0
000006 460c MOV r4,r1
000008 4615 MOV r5,r2
;;;1095 unsigned short crc;
;;;1096 static unsigned char str_out[300];
;;;1097 unsigned int len;
;;;1098
;;;1099 len = 0;
00000a 2700 MOVS r7,#0
;;;1100 Modbus_RTU_Host_DippFramer(pDipperdeFramer,pData);
00000c 4629 MOV r1,r5
00000e 4620 MOV r0,r4
000010 f7fffffe BL Modbus_RTU_Host_DippFramer
;;;1101
;;;1102 if(pDipperdeFramer->oneFrame)
000014 8820 LDRH r0,[r4,#0]
000016 b1d0 CBZ r0,|L16.78|
;;;1103 {
;;;1104 crc = (pDipperdeFramer->frmBuf[pDipperdeFramer->oneFrame-1] << 8) | pDipperdeFramer->frmBuf[pDipperdeFramer->oneFrame-2];
000018 8820 LDRH r0,[r4,#0]
00001a 1e80 SUBS r0,r0,#2
00001c f1040108 ADD r1,r4,#8
000020 5c0a LDRB r2,[r1,r0]
000022 8820 LDRH r0,[r4,#0]
000024 1e40 SUBS r0,r0,#1
000026 5c08 LDRB r0,[r1,r0]
000028 ea422600 ORR r6,r2,r0,LSL #8
;;;1105 if(GetCRC(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame-2) == crc)
00002c 8820 LDRH r0,[r4,#0]
00002e 1e81 SUBS r1,r0,#2
000030 f1040008 ADD r0,r4,#8
000034 f7fffffe BL GetCRC
000038 42b0 CMP r0,r6
00003a d106 BNE |L16.74|
;;;1106 {
;;;1107 len = Modbus_RTU_Host_Process(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame,str_out);
00003c 8821 LDRH r1,[r4,#0]
00003e 4a05 LDR r2,|L16.84|
000040 f1040008 ADD r0,r4,#8
000044 f7fffffe BL Modbus_RTU_Host_Process
000048 4607 MOV r7,r0
|L16.74|
;;;1108 }
;;;1109 pDipperdeFramer->oneFrame = 0;
00004a 2000 MOVS r0,#0
00004c 8020 STRH r0,[r4,#0]
|L16.78|
;;;1110 }
;;;1111 }
00004e e8bd81f0 POP {r4-r8,pc}
;;;1112
ENDP
000052 0000 DCW 0x0000
|L16.84|
DCD |symbol_number.131|
AREA ||i.Modbus_RTU_Process||, CODE, READONLY, ALIGN=1
Modbus_RTU_Process PROC
;;;802
;;;803 unsigned int Modbus_RTU_Process(unsigned char *buff,unsigned short buffLen,unsigned char *str_out)
000000 e92d5ffc PUSH {r2-r12,lr}
;;;804 {
000004 4604 MOV r4,r0
000006 4689 MOV r9,r1
000008 4692 MOV r10,r2
;;;805 unsigned short data;
;;;806 unsigned short len;
;;;807 unsigned short i;
;;;808 unsigned short count;
;;;809 unsigned short address;
;;;810
;;;811 len = 0;
00000a 2000 MOVS r0,#0
00000c 9001 STR r0,[sp,#4]
;;;812
;;;813 if(buff[1] == 0x01)
00000e 7860 LDRB r0,[r4,#1]
000010 2801 CMP r0,#1
000012 d112 BNE |L17.58|
;;;814 {
;;;815 address = (buff[2] << 8) + buff[3];
000014 78e0 LDRB r0,[r4,#3]
000016 78a1 LDRB r1,[r4,#2]
000018 eb002001 ADD r0,r0,r1,LSL #8
00001c b285 UXTH r5,r0
;;;816 count = (buff[4] << 8) + buff[5];
00001e 7960 LDRB r0,[r4,#5]
000020 7921 LDRB r1,[r4,#4]
000022 eb002001 ADD r0,r0,r1,LSL #8
000026 b287 UXTH r7,r0
;;;817 len = Modbus_RTU_Response_CMD1(str_out,0x01,address,count);
000028 b2fb UXTB r3,r7
00002a 462a MOV r2,r5
00002c 2101 MOVS r1,#1
00002e 4650 MOV r0,r10
000030 f7fffffe BL Modbus_RTU_Response_CMD1
000034 b280 UXTH r0,r0
000036 9001 STR r0,[sp,#4]
000038 e0fc B |L17.564|
|L17.58|
;;;818 }
;;;819 else if(buff[1] == 0x03)
00003a 7860 LDRB r0,[r4,#1]
00003c 2803 CMP r0,#3
00003e d112 BNE |L17.102|
;;;820 {
;;;821 address = (buff[2] << 8) + buff[3];
000040 78e0 LDRB r0,[r4,#3]
000042 78a1 LDRB r1,[r4,#2]
000044 eb002001 ADD r0,r0,r1,LSL #8
000048 b285 UXTH r5,r0
;;;822 count = (buff[4] << 8) + buff[5];
00004a 7960 LDRB r0,[r4,#5]
00004c 7921 LDRB r1,[r4,#4]
00004e eb002001 ADD r0,r0,r1,LSL #8
000052 b287 UXTH r7,r0
;;;823 len = Modbus_RTU_Response_CMD3(str_out,0x01,address,count);
000054 b2fb UXTB r3,r7
000056 462a MOV r2,r5
000058 2101 MOVS r1,#1
00005a 4650 MOV r0,r10
00005c f7fffffe BL Modbus_RTU_Response_CMD3
000060 b280 UXTH r0,r0
000062 9001 STR r0,[sp,#4]
000064 e0e6 B |L17.564|
|L17.102|
;;;824 }
;;;825 else if(buff[1] == 0x05)
000066 7860 LDRB r0,[r4,#1]
000068 2805 CMP r0,#5
00006a d13e BNE |L17.234|
;;;826 {
;;;827 address = (buff[2] << 8) + buff[3];
00006c 78e0 LDRB r0,[r4,#3]
00006e 78a1 LDRB r1,[r4,#2]
000070 eb002001 ADD r0,r0,r1,LSL #8
000074 b285 UXTH r5,r0
;;;828 //count = (buff[4] << 8) + buff[5];
;;;829 if((buff[4] == 0xff) && (buff[5] == 0x00))
000076 7920 LDRB r0,[r4,#4]
000078 28ff CMP r0,#0xff
00007a d116 BNE |L17.170|
00007c 7960 LDRB r0,[r4,#5]
00007e b9a0 CBNZ r0,|L17.170|
;;;830 {
;;;831 PLC_Set_M((address/16)*100 + (address%16));
000080 17e9 ASRS r1,r5,#31
000082 eb057111 ADD r1,r5,r1,LSR #28
000086 1109 ASRS r1,r1,#4
000088 eba51101 SUB r1,r5,r1,LSL #4
00008c 17ea ASRS r2,r5,#31
00008e eb057212 ADD r2,r5,r2,LSR #28
000092 1112 ASRS r2,r2,#4
000094 eb0203c2 ADD r3,r2,r2,LSL #3
000098 eb031202 ADD r2,r3,r2,LSL #4
00009c eb010182 ADD r1,r1,r2,LSL #2
0000a0 b288 UXTH r0,r1
0000a2 9500 STR r5,[sp,#0]
0000a4 f7fffffe BL PLC_Set_M
0000a8 e013 B |L17.210|
|L17.170|
;;;832 }
;;;833 else
;;;834 {
;;;835 PLC_Reset_M((address/16)*100 + (address%16));
0000aa 17e9 ASRS r1,r5,#31
0000ac eb057111 ADD r1,r5,r1,LSR #28
0000b0 1109 ASRS r1,r1,#4
0000b2 eba51101 SUB r1,r5,r1,LSL #4
0000b6 17ea ASRS r2,r5,#31
0000b8 eb057212 ADD r2,r5,r2,LSR #28
0000bc 1112 ASRS r2,r2,#4
0000be eb0203c2 ADD r3,r2,r2,LSL #3
0000c2 eb031202 ADD r2,r3,r2,LSL #4
0000c6 eb010182 ADD r1,r1,r2,LSL #2
0000ca b288 UXTH r0,r1
0000cc 9500 STR r5,[sp,#0]
0000ce f7fffffe BL PLC_Reset_M
|L17.210|
;;;836 }
;;;837 for(i = 0; i < buffLen; i++)
0000d2 2600 MOVS r6,#0
0000d4 e004 B |L17.224|
|L17.214|
;;;838 {
;;;839 str_out[i] = buff[i];
0000d6 5da0 LDRB r0,[r4,r6]
0000d8 f80a0006 STRB r0,[r10,r6]
0000dc 1c70 ADDS r0,r6,#1 ;837
0000de b286 UXTH r6,r0 ;837
|L17.224|
0000e0 454e CMP r6,r9 ;837
0000e2 dbf8 BLT |L17.214|
;;;840 }
;;;841 len = buffLen;
0000e4 f8cd9004 STR r9,[sp,#4]
0000e8 e0a4 B |L17.564|
|L17.234|
;;;842 //len = Modbus_RTU_Response_CMD3(str_out,0x05,address,count);
;;;843 }
;;;844 else if(buff[1] == 0x06)
0000ea 7860 LDRB r0,[r4,#1]
0000ec 2806 CMP r0,#6
0000ee d117 BNE |L17.288|
;;;845 {
;;;846 address = (buff[2] << 8) + buff[3];
0000f0 78e0 LDRB r0,[r4,#3]
0000f2 78a1 LDRB r1,[r4,#2]
0000f4 eb002001 ADD r0,r0,r1,LSL #8
0000f8 b285 UXTH r5,r0
;;;847 data = (buff[4] << 8) + buff[5];
0000fa 7960 LDRB r0,[r4,#5]
0000fc 7921 LDRB r1,[r4,#4]
0000fe eb002001 ADD r0,r0,r1,LSL #8
000102 fa1ff880 UXTH r8,r0
;;;848 PLC_Set_D(address,data);
000106 4641 MOV r1,r8
000108 4628 MOV r0,r5
00010a f7fffffe BL PLC_Set_D
;;;849 len = Modbus_RTU_Response_CMD6(str_out,0x01,address,data);
00010e 4643 MOV r3,r8
000110 462a MOV r2,r5
000112 2101 MOVS r1,#1
000114 4650 MOV r0,r10
000116 f7fffffe BL Modbus_RTU_Response_CMD6
00011a b280 UXTH r0,r0
00011c 9001 STR r0,[sp,#4]
;;;850 if(address >= 600 && address <= 637)
00011e e089 B |L17.564|
|L17.288|
;;;851 {
;;;852 //Modbus_RTU_Host_D_Updata();
;;;853 }
;;;854
;;;855 }
;;;856 else if(buff[1] == 0x0F)
000120 7860 LDRB r0,[r4,#1]
000122 280f CMP r0,#0xf
000124 d15f BNE |L17.486|
;;;857 {
;;;858 address = (buff[2] << 8) + buff[3];
000126 78e0 LDRB r0,[r4,#3]
000128 78a1 LDRB r1,[r4,#2]
00012a eb002001 ADD r0,r0,r1,LSL #8
00012e b285 UXTH r5,r0
;;;859 count = (buff[4] << 8) + buff[5];
000130 7960 LDRB r0,[r4,#5]
000132 7921 LDRB r1,[r4,#4]
000134 eb002001 ADD r0,r0,r1,LSL #8
000138 b287 UXTH r7,r0
;;;860
;;;861 for(i = 0; i < count; i++)
00013a 2600 MOVS r6,#0
00013c e048 B |L17.464|
|L17.318|
;;;862 {
;;;863 data = buff[(7+(i/8))] & (0x01 << (i%8));
00013e 4630 MOV r0,r6
000140 17f2 ASRS r2,r6,#31
000142 eb067252 ADD r2,r6,r2,LSR #29
000146 10d2 ASRS r2,r2,#3
000148 1dd2 ADDS r2,r2,#7
00014a 5ca2 LDRB r2,[r4,r2]
00014c 4631 MOV r1,r6
00014e 17f3 ASRS r3,r6,#31
000150 eb067353 ADD r3,r6,r3,LSR #29
000154 10db ASRS r3,r3,#3
000156 eba60cc3 SUB r12,r6,r3,LSL #3
00015a 2301 MOVS r3,#1
00015c fa03f30c LSL r3,r3,r12
000160 ea020803 AND r8,r2,r3
;;;864 if(data)
000164 f1b80f00 CMP r8,#0
000168 d018 BEQ |L17.412|
;;;865 {
;;;866 PLC_Set_M(((address+i)/16)*100 + ((address+i)%16));
00016a eb050b06 ADD r11,r5,r6
00016e ea4f71eb ASR r1,r11,#31
000172 eb0b7111 ADD r1,r11,r1,LSR #28
000176 1109 ASRS r1,r1,#4
000178 ebab1201 SUB r2,r11,r1,LSL #4
00017c 19a9 ADDS r1,r5,r6
00017e 17cb ASRS r3,r1,#31
000180 9100 STR r1,[sp,#0]
000182 eb017113 ADD r1,r1,r3,LSR #28
000186 1109 ASRS r1,r1,#4
000188 eb0103c1 ADD r3,r1,r1,LSL #3
00018c eb031101 ADD r1,r3,r1,LSL #4
000190 eb020181 ADD r1,r2,r1,LSL #2
000194 b288 UXTH r0,r1
000196 f7fffffe BL PLC_Set_M
00019a e017 B |L17.460|
|L17.412|
;;;867 }
;;;868 else
;;;869 {
;;;870 PLC_Reset_M(((address+i)/16)*100 + ((address+i)%16));
00019c eb050b06 ADD r11,r5,r6
0001a0 ea4f71eb ASR r1,r11,#31
0001a4 eb0b7111 ADD r1,r11,r1,LSR #28
0001a8 1109 ASRS r1,r1,#4
0001aa ebab1201 SUB r2,r11,r1,LSL #4
0001ae 19a9 ADDS r1,r5,r6
0001b0 17cb ASRS r3,r1,#31
0001b2 9100 STR r1,[sp,#0]
0001b4 eb017113 ADD r1,r1,r3,LSR #28
0001b8 1109 ASRS r1,r1,#4
0001ba eb0103c1 ADD r3,r1,r1,LSL #3
0001be eb031101 ADD r1,r3,r1,LSL #4
0001c2 eb020181 ADD r1,r2,r1,LSL #2
0001c6 b288 UXTH r0,r1
0001c8 f7fffffe BL PLC_Reset_M
|L17.460|
0001cc 1c70 ADDS r0,r6,#1 ;861
0001ce b286 UXTH r6,r0 ;861
|L17.464|
0001d0 42be CMP r6,r7 ;861
0001d2 dbb4 BLT |L17.318|
;;;871 }
;;;872 }
;;;873
;;;874 len = Modbus_RTU_Response_CMD15(str_out,0x01,address,count);
0001d4 b2fb UXTB r3,r7
0001d6 462a MOV r2,r5
0001d8 2101 MOVS r1,#1
0001da 4650 MOV r0,r10
0001dc f7fffffe BL Modbus_RTU_Response_CMD15
0001e0 b280 UXTH r0,r0
0001e2 9001 STR r0,[sp,#4]
0001e4 e026 B |L17.564|
|L17.486|
;;;875 }
;;;876 else if(buff[1] == 0x10)
0001e6 7860 LDRB r0,[r4,#1]
0001e8 2810 CMP r0,#0x10
0001ea d123 BNE |L17.564|
;;;877 {
;;;878 address = (buff[2] << 8) + buff[3];
0001ec 78e0 LDRB r0,[r4,#3]
0001ee 78a1 LDRB r1,[r4,#2]
0001f0 eb002001 ADD r0,r0,r1,LSL #8
0001f4 b285 UXTH r5,r0
;;;879 count = (buff[4] << 8) + buff[5];
0001f6 7960 LDRB r0,[r4,#5]
0001f8 7921 LDRB r1,[r4,#4]
0001fa eb002001 ADD r0,r0,r1,LSL #8
0001fe b287 UXTH r7,r0
;;;880
;;;881 for(i = 0; i < count; i++)
000200 2600 MOVS r6,#0
000202 e00d B |L17.544|
|L17.516|
;;;882 {
;;;883 data = (buff[7+2*i]<<8) | buff[8+2*i];
000204 0070 LSLS r0,r6,#1
000206 3008 ADDS r0,r0,#8
000208 5c21 LDRB r1,[r4,r0]
00020a 0070 LSLS r0,r6,#1
00020c 1dc0 ADDS r0,r0,#7
00020e 5c20 LDRB r0,[r4,r0]
000210 ea412800 ORR r8,r1,r0,LSL #8
;;;884 PLC_Set_D(address+i,data);
000214 19a8 ADDS r0,r5,r6
000216 4641 MOV r1,r8
000218 f7fffffe BL PLC_Set_D
00021c 1c70 ADDS r0,r6,#1 ;881
00021e b286 UXTH r6,r0 ;881
|L17.544|
000220 42be CMP r6,r7 ;881
000222 dbef BLT |L17.516|
;;;885 }
;;;886
;;;887 if(address >= 600 && address <= 637)
;;;888 {
;;;889 //Modbus_RTU_Host_D_Updata();
;;;890 }
;;;891
;;;892 len = Modbus_RTU_Response_CMD16(str_out,0x01,address,count);
000224 b2fb UXTB r3,r7
000226 462a MOV r2,r5
000228 2101 MOVS r1,#1
00022a 4650 MOV r0,r10
00022c f7fffffe BL Modbus_RTU_Response_CMD16
000230 b280 UXTH r0,r0
000232 9001 STR r0,[sp,#4]
|L17.564|
;;;893 }
;;;894
;;;895 return len;
000234 9801 LDR r0,[sp,#4]
;;;896 }
000236 e8bd9ffc POP {r2-r12,pc}
;;;897
ENDP
AREA ||i.Modbus_RTU_ProcessUartCommand||, CODE, READONLY, ALIGN=2
Modbus_RTU_ProcessUartCommand PROC
;;;1035
;;;1036 void Modbus_RTU_ProcessUartCommand(unsigned char uart_id,DipperdeFramer *pDipperdeFramer,unsigned char *pData)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;1037 {
000004 4680 MOV r8,r0
000006 460c MOV r4,r1
000008 4615 MOV r5,r2
;;;1038 unsigned short crc;
;;;1039 static unsigned char str_out[300];
;;;1040 unsigned int len;
;;;1041
;;;1042 len = 0;
00000a 2700 MOVS r7,#0
;;;1043 Modbus_RTU_DippFramer(pDipperdeFramer,pData);
00000c 4629 MOV r1,r5
00000e 4620 MOV r0,r4
000010 f7fffffe BL Modbus_RTU_DippFramer
;;;1044 // WriteUart(COM3,pData,1);
;;;1045
;;;1046 if(pDipperdeFramer->oneFrame)
000014 8820 LDRH r0,[r4,#0]
000016 b300 CBZ r0,|L18.90|
;;;1047 {
;;;1048 crc = (pDipperdeFramer->frmBuf[pDipperdeFramer->oneFrame-1] << 8) | pDipperdeFramer->frmBuf[pDipperdeFramer->oneFrame-2];
000018 8820 LDRH r0,[r4,#0]
00001a 1e80 SUBS r0,r0,#2
00001c f1040108 ADD r1,r4,#8
000020 5c0a LDRB r2,[r1,r0]
000022 8820 LDRH r0,[r4,#0]
000024 1e40 SUBS r0,r0,#1
000026 5c08 LDRB r0,[r1,r0]
000028 ea422600 ORR r6,r2,r0,LSL #8
;;;1049 // Uart_Printf(COM3, "GetOneFrame!\r\n");
;;;1050 if(GetCRC(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame-2) == crc)
00002c 8820 LDRH r0,[r4,#0]
00002e 1e81 SUBS r1,r0,#2
000030 f1040008 ADD r0,r4,#8
000034 f7fffffe BL GetCRC
000038 42b0 CMP r0,r6
00003a d10c BNE |L18.86|
;;;1051 {
;;;1052 // Uart_Printf(COM3, "CRCPASS!\r\n");
;;;1053 len = Modbus_RTU_Process(pDipperdeFramer->frmBuf,pDipperdeFramer->oneFrame,str_out);
00003c 8821 LDRH r1,[r4,#0]
00003e 4a08 LDR r2,|L18.96|
000040 f1040008 ADD r0,r4,#8
000044 f7fffffe BL Modbus_RTU_Process
000048 4607 MOV r7,r0
;;;1054 if(len)
00004a b127 CBZ r7,|L18.86|
;;;1055 {
;;;1056 WriteUart(uart_id,str_out,len);
00004c 463a MOV r2,r7
00004e 4904 LDR r1,|L18.96|
000050 4640 MOV r0,r8
000052 f7fffffe BL WriteUart
|L18.86|
;;;1057 // WriteUart(COM3,str_out,len);
;;;1058 }
;;;1059 }
;;;1060 pDipperdeFramer->oneFrame = 0;
000056 2000 MOVS r0,#0
000058 8020 STRH r0,[r4,#0]
|L18.90|
;;;1061 }
;;;1062 }
00005a e8bd81f0 POP {r4-r8,pc}
;;;1063
ENDP
00005e 0000 DCW 0x0000
|L18.96|
DCD str_out
AREA ||i.Modbus_RTU_Read_CMD||, CODE, READONLY, ALIGN=1
Modbus_RTU_Read_CMD PROC
;;;85
;;;86 unsigned int Modbus_RTU_Read_CMD(unsigned char string_out[],unsigned char address,unsigned char cmd,unsigned short dataAddress,unsigned char dataCount)
000000 e92d47f0 PUSH {r4-r10,lr}
;;;87 {
000004 4604 MOV r4,r0
000006 460f MOV r7,r1
000008 4690 MOV r8,r2
00000a 461d MOV r5,r3
00000c f8dd9020 LDR r9,[sp,#0x20]
;;;88 unsigned short crc;
;;;89
;;;90 if(dataCount == 0)
000010 f1b90f00 CMP r9,#0
000014 d102 BNE |L19.28|
;;;91 return 0;
000016 2000 MOVS r0,#0
|L19.24|
;;;92
;;;93 string_out[0] = address;
;;;94 string_out[1] = cmd;
;;;95 string_out[2] = ((dataAddress >> 8) & 0xff);
;;;96 string_out[3] = (dataAddress & 0xff);
;;;97 string_out[4] = ((dataCount >> 8) & 0xff);
;;;98 string_out[5] = (dataCount & 0xff);
;;;99
;;;100 crc = GetCRC(string_out,6);
;;;101
;;;102 string_out[6] = crc & 0x00ff;
;;;103 string_out[7] = crc >> 8;
;;;104
;;;105 return 8;
;;;106 }
000018 e8bd87f0 POP {r4-r10,pc}
|L19.28|
00001c 7027 STRB r7,[r4,#0] ;93
00001e f8848001 STRB r8,[r4,#1] ;94
000022 0a28 LSRS r0,r5,#8 ;95
000024 70a0 STRB r0,[r4,#2] ;95
000026 70e5 STRB r5,[r4,#3] ;96
000028 2000 MOVS r0,#0 ;97
00002a 7120 STRB r0,[r4,#4] ;97
00002c f8849005 STRB r9,[r4,#5] ;98
000030 2106 MOVS r1,#6 ;100
000032 4620 MOV r0,r4 ;100
000034 f7fffffe BL GetCRC
000038 4606 MOV r6,r0 ;100
00003a 71a6 STRB r6,[r4,#6] ;102
00003c 1230 ASRS r0,r6,#8 ;103
00003e 71e0 STRB r0,[r4,#7] ;103
000040 2008 MOVS r0,#8 ;105
000042 e7e9 B |L19.24|
;;;107
ENDP
AREA ||i.Modbus_RTU_Read_Position1||, CODE, READONLY, ALIGN=2
Modbus_RTU_Read_Position1 PROC
;;;214
;;;215 void Modbus_RTU_Read_Position1()
000000 b538 PUSH {r3-r5,lr}
;;;216 {
;;;217 static unsigned char string_out[1024];
;;;218 unsigned short len;
;;;219
;;;220 len = Modbus_RTU_Read_CMD(string_out,0x01,0x03,32480,10);
000002 200a MOVS r0,#0xa
000004 f64763e0 MOV r3,#0x7ee0
000008 2203 MOVS r2,#3
00000a 2101 MOVS r1,#1
00000c 9000 STR r0,[sp,#0]
00000e 4805 LDR r0,|L20.36|
000010 f7fffffe BL Modbus_RTU_Read_CMD
000014 b284 UXTH r4,r0
;;;221 if(len)
000016 b124 CBZ r4,|L20.34|
;;;222 {
;;;223 WriteUart(3,string_out,len);
000018 4622 MOV r2,r4
00001a 4902 LDR r1,|L20.36|
00001c 2003 MOVS r0,#3
00001e f7fffffe BL WriteUart
|L20.34|
;;;224 }
;;;225 }
000022 bd38 POP {r3-r5,pc}
;;;226
ENDP
|L20.36|
DCD |symbol_number.115|
AREA ||i.Modbus_RTU_Read_Position2||, CODE, READONLY, ALIGN=2
Modbus_RTU_Read_Position2 PROC
;;;226
;;;227 void Modbus_RTU_Read_Position2()
000000 b538 PUSH {r3-r5,lr}
;;;228 {
;;;229 static unsigned char string_out[1024];
;;;230 unsigned short len;
;;;231
;;;232 len = Modbus_RTU_Read_CMD(string_out,0x01,0x03,32490,10);
000002 200a MOVS r0,#0xa
000004 f64763ea MOV r3,#0x7eea
000008 2203 MOVS r2,#3
00000a 2101 MOVS r1,#1
00000c 9000 STR r0,[sp,#0]
00000e 4805 LDR r0,|L21.36|
000010 f7fffffe BL Modbus_RTU_Read_CMD
000014 b284 UXTH r4,r0
;;;233 if(len)
000016 b124 CBZ r4,|L21.34|
;;;234 {
;;;235 WriteUart(3,string_out,len);
000018 4622 MOV r2,r4
00001a 4902 LDR r1,|L21.36|
00001c 2003 MOVS r0,#3
00001e f7fffffe BL WriteUart
|L21.34|
;;;236 }
;;;237 }
000022 bd38 POP {r3-r5,pc}
;;;238
ENDP
|L21.36|
DCD |symbol_number.116|
AREA ||i.Modbus_RTU_Read_Speed1||, CODE, READONLY, ALIGN=2
Modbus_RTU_Read_Speed1 PROC
;;;178
;;;179 void Modbus_RTU_Read_Speed1()
000000 b538 PUSH {r3-r5,lr}
;;;180 {
;;;181 static unsigned char string_out[1024];
;;;182 unsigned short len;
;;;183
;;;184 len = Modbus_RTU_Read_CMD(string_out,0x01,0x03,32450,6);
000002 2006 MOVS r0,#6
000004 f64763c2 MOV r3,#0x7ec2
000008 2203 MOVS r2,#3
00000a 2101 MOVS r1,#1
00000c 9000 STR r0,[sp,#0]
00000e 4805 LDR r0,|L22.36|
000010 f7fffffe BL Modbus_RTU_Read_CMD
000014 b284 UXTH r4,r0
;;;185 if(len)
000016 b124 CBZ r4,|L22.34|
;;;186 {
;;;187 WriteUart(3,string_out,len);
000018 4622 MOV r2,r4
00001a 4902 LDR r1,|L22.36|
00001c 2003 MOVS r0,#3
00001e f7fffffe BL WriteUart
|L22.34|
;;;188 }
;;;189 }
000022 bd38 POP {r3-r5,pc}
;;;190
ENDP
|L22.36|
DCD |symbol_number.112|
AREA ||i.Modbus_RTU_Read_Speed2||, CODE, READONLY, ALIGN=2
Modbus_RTU_Read_Speed2 PROC
;;;190
;;;191 void Modbus_RTU_Read_Speed2()
000000 b538 PUSH {r3-r5,lr}
;;;192 {
;;;193 static unsigned char string_out[1024];
;;;194 unsigned short len;
;;;195
;;;196 len = Modbus_RTU_Read_CMD(string_out,0x01,0x03,32458,6);
000002 2006 MOVS r0,#6
000004 f64763ca MOV r3,#0x7eca
000008 2203 MOVS r2,#3
00000a 2101 MOVS r1,#1
00000c 9000 STR r0,[sp,#0]
00000e 4805 LDR r0,|L23.36|
000010 f7fffffe BL Modbus_RTU_Read_CMD
000014 b284 UXTH r4,r0
;;;197 if(len)
000016 b124 CBZ r4,|L23.34|
;;;198 {
;;;199 WriteUart(3,string_out,len);
000018 4622 MOV r2,r4
00001a 4902 LDR r1,|L23.36|
00001c 2003 MOVS r0,#3
00001e f7fffffe BL WriteUart
|L23.34|
;;;200 }
;;;201 }
000022 bd38 POP {r3-r5,pc}
;;;202
ENDP
|L23.36|
DCD |symbol_number.113|
AREA ||i.Modbus_RTU_Read_Speed3||, CODE, READONLY, ALIGN=2
Modbus_RTU_Read_Speed3 PROC
;;;202
;;;203 void Modbus_RTU_Read_Speed3()
000000 b538 PUSH {r3-r5,lr}
;;;204 {
;;;205 static unsigned char string_out[1024];
;;;206 unsigned short len;
;;;207
;;;208 len = Modbus_RTU_Read_CMD(string_out,0x01,0x03,32470,6);
000002 2006 MOVS r0,#6
000004 f64763d6 MOV r3,#0x7ed6
000008 2203 MOVS r2,#3
00000a 2101 MOVS r1,#1
00000c 9000 STR r0,[sp,#0]
00000e 4805 LDR r0,|L24.36|
000010 f7fffffe BL Modbus_RTU_Read_CMD
000014 b284 UXTH r4,r0
;;;209 if(len)
000016 b124 CBZ r4,|L24.34|
;;;210 {
;;;211 WriteUart(3,string_out,len);
000018 4622 MOV r2,r4
00001a 4902 LDR r1,|L24.36|
00001c 2003 MOVS r0,#3
00001e f7fffffe BL WriteUart
|L24.34|
;;;212 }
;;;213 }
000022 bd38 POP {r3-r5,pc}
;;;214
ENDP
|L24.36|
DCD |symbol_number.114|
AREA ||i.Modbus_RTU_Read_State||, CODE, READONLY, ALIGN=2
Modbus_RTU_Read_State PROC
;;;166
;;;167 void Modbus_RTU_Read_State()
000000 b538 PUSH {r3-r5,lr}
;;;168 {
;;;169 static unsigned char string_out[1024];
;;;170 unsigned short len;
;;;171
;;;172 len = Modbus_RTU_Read_CMD(string_out,0x01,0x01,2048,9);
000002 2009 MOVS r0,#9
000004 f44f6300 MOV r3,#0x800
000008 2201 MOVS r2,#1
00000a 4611 MOV r1,r2
00000c 9000 STR r0,[sp,#0]
00000e 4805 LDR r0,|L25.36|
000010 f7fffffe BL Modbus_RTU_Read_CMD
000014 b284 UXTH r4,r0
;;;173 if(len)
000016 b124 CBZ r4,|L25.34|
;;;174 {
;;;175 WriteUart(3,string_out,len);
000018 4622 MOV r2,r4
00001a 4902 LDR r1,|L25.36|
00001c 2003 MOVS r0,#3
00001e f7fffffe BL WriteUart
|L25.34|
;;;176 }
;;;177 }
000022 bd38 POP {r3-r5,pc}
;;;178
ENDP
|L25.36|
DCD string_out
AREA ||i.Modbus_RTU_Response_CMD1||, CODE, READONLY, ALIGN=1
Modbus_RTU_Response_CMD1 PROC
;;;569
;;;570 unsigned int Modbus_RTU_Response_CMD1(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d4fff PUSH {r0-r11,lr}
;;;571 {
000004 b081 SUB sp,sp,#4
000006 4604 MOV r4,r0
000008 4690 MOV r8,r2
00000a 461d MOV r5,r3
;;;572 int i,count;
;;;573 unsigned short crc;
;;;574 unsigned short mIndex;
;;;575 unsigned short mAddrss;
;;;576 unsigned char mask;
;;;577
;;;578 if(dataCount == 0)
00000c b91d CBNZ r5,|L26.22|
;;;579 return 0;
00000e 2000 MOVS r0,#0
|L26.16|
;;;580
;;;581 string_out[0] = address;
;;;582 string_out[1] = 0x01;
;;;583 string_out[2] = dataCount/8;
;;;584 if(dataCount%8)
;;;585 {
;;;586 string_out[2]++;
;;;587 }
;;;588
;;;589 mAddrss = dataAddress;
;;;590
;;;591 for(count = 0; count < string_out[2]; count++)
;;;592 {
;;;593 mask = 0x01;
;;;594 string_out[3+count] = 0x00;
;;;595 for(i = 0; i < 8; i++)
;;;596 {
;;;597 mIndex = mAddrss/16;
;;;598 mIndex *= 100;
;;;599 mIndex += (mAddrss%16);
;;;600 if(PLC_Get_M(mIndex))
;;;601 {
;;;602 string_out[3+count] |= mask;
;;;603 }
;;;604 mask <<= 1;
;;;605 mAddrss++;
;;;606 if(mAddrss - dataAddress == dataCount)
;;;607 break;
;;;608 }
;;;609 }
;;;610
;;;611 crc = GetCRC(string_out,3+count);
;;;612
;;;613 string_out[3+count] = crc & 0x00ff;
;;;614 string_out[4+count] = crc >> 8;
;;;615
;;;616 return 5+count;
;;;617 }
000010 b005 ADD sp,sp,#0x14
000012 e8bd8ff0 POP {r4-r11,pc}
|L26.22|
000016 9802 LDR r0,[sp,#8] ;581
000018 7020 STRB r0,[r4,#0] ;581
00001a 2001 MOVS r0,#1 ;582
00001c 7060 STRB r0,[r4,#1] ;582
00001e 4628 MOV r0,r5 ;583
000020 17e9 ASRS r1,r5,#31 ;583
000022 eb057151 ADD r1,r5,r1,LSR #29 ;583
000026 f3c101c7 UBFX r1,r1,#3,#8 ;583
00002a 70a1 STRB r1,[r4,#2] ;583
00002c 17e9 ASRS r1,r5,#31 ;584
00002e eb057151 ADD r1,r5,r1,LSR #29 ;584
000032 10c9 ASRS r1,r1,#3 ;584
000034 eba501c1 SUB r1,r5,r1,LSL #3 ;584
000038 b111 CBZ r1,|L26.64|
00003a 78a0 LDRB r0,[r4,#2] ;586
00003c 1c40 ADDS r0,r0,#1 ;586
00003e 70a0 STRB r0,[r4,#2] ;586
|L26.64|
000040 4647 MOV r7,r8 ;589
000042 2600 MOVS r6,#0 ;591
000044 e038 B |L26.184|
|L26.70|
000046 2001 MOVS r0,#1 ;593
000048 9000 STR r0,[sp,#0] ;593
00004a 2100 MOVS r1,#0 ;594
00004c 1cf0 ADDS r0,r6,#3 ;594
00004e 5421 STRB r1,[r4,r0] ;594
000050 468b MOV r11,r1 ;595
000052 e02c B |L26.174|
|L26.84|
000054 17f9 ASRS r1,r7,#31 ;597
000056 eb077111 ADD r1,r7,r1,LSR #28 ;597
00005a ea4f1a21 ASR r10,r1,#4 ;597
00005e eb0a00ca ADD r0,r10,r10,LSL #3 ;598
000062 eb00100a ADD r0,r0,r10,LSL #4 ;598
000066 f64f71ff MOV r1,#0xffff ;598
00006a ea010a80 AND r10,r1,r0,LSL #2 ;598
00006e 17f9 ASRS r1,r7,#31 ;599
000070 eb077111 ADD r1,r7,r1,LSR #28 ;599
000074 1109 ASRS r1,r1,#4 ;599
000076 eba71101 SUB r1,r7,r1,LSL #4 ;599
00007a 4451 ADD r1,r1,r10 ;599
00007c fa1ffa81 UXTH r10,r1 ;599
000080 4650 MOV r0,r10 ;600
000082 f7fffffe BL PLC_Get_M
000086 b128 CBZ r0,|L26.148|
000088 1cf0 ADDS r0,r6,#3 ;602
00008a 5c20 LDRB r0,[r4,r0] ;602
00008c 9900 LDR r1,[sp,#0] ;602
00008e 4308 ORRS r0,r0,r1 ;602
000090 1cf1 ADDS r1,r6,#3 ;602
000092 5460 STRB r0,[r4,r1] ;602
|L26.148|
000094 9800 LDR r0,[sp,#0] ;604
000096 0640 LSLS r0,r0,#25 ;604
000098 0e00 LSRS r0,r0,#24 ;604
00009a 9000 STR r0,[sp,#0] ;604
00009c 1c78 ADDS r0,r7,#1 ;605
00009e b287 UXTH r7,r0 ;605
0000a0 eba70008 SUB r0,r7,r8 ;606
0000a4 42a8 CMP r0,r5 ;606
0000a6 d100 BNE |L26.170|
0000a8 e004 B |L26.180|
|L26.170|
0000aa f10b0b01 ADD r11,r11,#1 ;595
|L26.174|
0000ae f1bb0f08 CMP r11,#8 ;595
0000b2 dbcf BLT |L26.84|
|L26.180|
0000b4 bf00 NOP ;607
0000b6 1c76 ADDS r6,r6,#1 ;591
|L26.184|
0000b8 78a0 LDRB r0,[r4,#2] ;591
0000ba 42b0 CMP r0,r6 ;591
0000bc dcc3 BGT |L26.70|
0000be 1cf1 ADDS r1,r6,#3 ;611
0000c0 4620 MOV r0,r4 ;611
0000c2 f7fffffe BL GetCRC
0000c6 4681 MOV r9,r0 ;611
0000c8 1cf0 ADDS r0,r6,#3 ;613
0000ca f8049000 STRB r9,[r4,r0] ;613
0000ce ea4f2129 ASR r1,r9,#8 ;614
0000d2 1d30 ADDS r0,r6,#4 ;614
0000d4 5421 STRB r1,[r4,r0] ;614
0000d6 1d70 ADDS r0,r6,#5 ;616
0000d8 e79a B |L26.16|
;;;618
ENDP
AREA ||i.Modbus_RTU_Response_CMD15||, CODE, READONLY, ALIGN=1
Modbus_RTU_Response_CMD15 PROC
;;;665
;;;666 unsigned int Modbus_RTU_Response_CMD15(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;667 {
000004 4604 MOV r4,r0
000006 4688 MOV r8,r1
000008 4615 MOV r5,r2
00000a 461e MOV r6,r3
;;;668 unsigned short crc;
;;;669
;;;670 string_out[0] = address;
00000c f8848000 STRB r8,[r4,#0]
;;;671 string_out[1] = 0x0f;
000010 200f MOVS r0,#0xf
000012 7060 STRB r0,[r4,#1]
;;;672 string_out[2] = dataAddress >> 8;
000014 1228 ASRS r0,r5,#8
000016 70a0 STRB r0,[r4,#2]
;;;673 string_out[3] = dataAddress & 0x00ff;
000018 70e5 STRB r5,[r4,#3]
;;;674 string_out[4] = dataCount >> 8;
00001a 1230 ASRS r0,r6,#8
00001c 7120 STRB r0,[r4,#4]
;;;675 string_out[5] = dataCount & 0x00ff;
00001e 7166 STRB r6,[r4,#5]
;;;676
;;;677 crc = GetCRC(string_out,6);
000020 2106 MOVS r1,#6
000022 4620 MOV r0,r4
000024 f7fffffe BL GetCRC
000028 4607 MOV r7,r0
;;;678 string_out[6] = crc & 0x00ff;
00002a 71a7 STRB r7,[r4,#6]
;;;679 string_out[7] = crc >> 8;
00002c 1238 ASRS r0,r7,#8
00002e 71e0 STRB r0,[r4,#7]
;;;680
;;;681 return 8;
000030 2008 MOVS r0,#8
;;;682 }
000032 e8bd81f0 POP {r4-r8,pc}
;;;683
ENDP
AREA ||i.Modbus_RTU_Response_CMD16||, CODE, READONLY, ALIGN=1
Modbus_RTU_Response_CMD16 PROC
;;;684
;;;685 unsigned int Modbus_RTU_Response_CMD16(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;686 {
000004 4604 MOV r4,r0
000006 4688 MOV r8,r1
000008 4615 MOV r5,r2
00000a 461e MOV r6,r3
;;;687 unsigned short crc;
;;;688
;;;689 string_out[0] = address;
00000c f8848000 STRB r8,[r4,#0]
;;;690 string_out[1] = 0x10;
000010 2010 MOVS r0,#0x10
000012 7060 STRB r0,[r4,#1]
;;;691 string_out[2] = dataAddress >> 8;
000014 1228 ASRS r0,r5,#8
000016 70a0 STRB r0,[r4,#2]
;;;692 string_out[3] = dataAddress & 0x00ff;
000018 70e5 STRB r5,[r4,#3]
;;;693 string_out[4] = dataCount >> 8;
00001a 1230 ASRS r0,r6,#8
00001c 7120 STRB r0,[r4,#4]
;;;694 string_out[5] = dataCount & 0x00ff;
00001e 7166 STRB r6,[r4,#5]
;;;695
;;;696 crc = GetCRC(string_out,6);
000020 2106 MOVS r1,#6
000022 4620 MOV r0,r4
000024 f7fffffe BL GetCRC
000028 4607 MOV r7,r0
;;;697 string_out[6] = crc & 0x00ff;
00002a 71a7 STRB r7,[r4,#6]
;;;698 string_out[7] = crc >> 8;
00002c 1238 ASRS r0,r7,#8
00002e 71e0 STRB r0,[r4,#7]
;;;699
;;;700 return 8;
000030 2008 MOVS r0,#8
;;;701 }
000032 e8bd81f0 POP {r4-r8,pc}
;;;702
ENDP
AREA ||i.Modbus_RTU_Response_CMD3||, CODE, READONLY, ALIGN=1
Modbus_RTU_Response_CMD3 PROC
;;;618
;;;619 unsigned int Modbus_RTU_Response_CMD3(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned char dataCount)
000000 e92d47f0 PUSH {r4-r10,lr}
;;;620 {
000004 4605 MOV r5,r0
000006 4689 MOV r9,r1
000008 4692 MOV r10,r2
00000a 461e MOV r6,r3
;;;621 int i;
;;;622 unsigned short data;
;;;623 unsigned short crc;
;;;624
;;;625 if(dataCount == 0)
00000c b916 CBNZ r6,|L29.20|
;;;626 return 0;
00000e 2000 MOVS r0,#0
|L29.16|
;;;627
;;;628 string_out[0] = address;
;;;629 string_out[1] = 0x03;
;;;630 string_out[2] = 2*dataCount;
;;;631
;;;632 for(i = 0; i < dataCount; i++)
;;;633 {
;;;634 data = PLC_Get_D(dataAddress+i);
;;;635 string_out[3+2*i] = data >> 8;
;;;636 string_out[4+2*i] = data & 0x00ff;
;;;637 }
;;;638
;;;639 crc = GetCRC(string_out,3+2*i);
;;;640
;;;641 string_out[3+2*i] = crc & 0x00ff;
;;;642 string_out[4+2*i] = crc >> 8;
;;;643
;;;644 return 5+2*i;
;;;645 }
000010 e8bd87f0 POP {r4-r10,pc}
|L29.20|
000014 f8859000 STRB r9,[r5,#0] ;628
000018 2003 MOVS r0,#3 ;629
00001a 7068 STRB r0,[r5,#1] ;629
00001c 0670 LSLS r0,r6,#25 ;630
00001e 0e00 LSRS r0,r0,#24 ;630
000020 70a8 STRB r0,[r5,#2] ;630
000022 2400 MOVS r4,#0 ;632
000024 e00d B |L29.66|
|L29.38|
000026 eb0a0104 ADD r1,r10,r4 ;634
00002a b288 UXTH r0,r1 ;634
00002c f7fffffe BL PLC_Get_D
000030 4607 MOV r7,r0 ;634
000032 1239 ASRS r1,r7,#8 ;635
000034 0060 LSLS r0,r4,#1 ;635
000036 1cc0 ADDS r0,r0,#3 ;635
000038 5429 STRB r1,[r5,r0] ;635
00003a 0060 LSLS r0,r4,#1 ;636
00003c 1d00 ADDS r0,r0,#4 ;636
00003e 542f STRB r7,[r5,r0] ;636
000040 1c64 ADDS r4,r4,#1 ;632
|L29.66|
000042 42b4 CMP r4,r6 ;632
000044 dbef BLT |L29.38|
000046 0060 LSLS r0,r4,#1 ;639
000048 1cc1 ADDS r1,r0,#3 ;639
00004a 4628 MOV r0,r5 ;639
00004c f7fffffe BL GetCRC
000050 4680 MOV r8,r0 ;639
000052 0060 LSLS r0,r4,#1 ;641
000054 1cc0 ADDS r0,r0,#3 ;641
000056 f8058000 STRB r8,[r5,r0] ;641
00005a ea4f2128 ASR r1,r8,#8 ;642
00005e 0060 LSLS r0,r4,#1 ;642
000060 1d00 ADDS r0,r0,#4 ;642
000062 5429 STRB r1,[r5,r0] ;642
000064 0060 LSLS r0,r4,#1 ;644
000066 1d40 ADDS r0,r0,#5 ;644
000068 e7d2 B |L29.16|
;;;646
ENDP
AREA ||i.Modbus_RTU_Response_CMD6||, CODE, READONLY, ALIGN=1
Modbus_RTU_Response_CMD6 PROC
;;;646
;;;647 unsigned int Modbus_RTU_Response_CMD6(unsigned char string_out[],unsigned char address,unsigned short dataAddress,unsigned short data)
000000 e92d41f0 PUSH {r4-r8,lr}
;;;648 {
000004 4604 MOV r4,r0
000006 4688 MOV r8,r1
000008 4615 MOV r5,r2
00000a 461e MOV r6,r3
;;;649 unsigned short crc;
;;;650
;;;651 string_out[0] = address;
00000c f8848000 STRB r8,[r4,#0]
;;;652 string_out[1] = 0x06;
000010 2006 MOVS r0,#6
000012 7060 STRB r0,[r4,#1]
;;;653 string_out[2] = dataAddress >> 8;
000014 1228 ASRS r0,r5,#8
000016 70a0 STRB r0,[r4,#2]
;;;654 string_out[3] = dataAddress;
000018 70e5 STRB r5,[r4,#3]
;;;655 string_out[4] = data >> 8 ;
00001a 1230 ASRS r0,r6,#8
00001c 7120 STRB r0,[r4,#4]
;;;656 string_out[5] = data;
00001e 7166 STRB r6,[r4,#5]
;;;657
;;;658 crc = GetCRC(string_out,6);
000020 2106 MOVS r1,#6
000022 4620 MOV r0,r4
000024 f7fffffe BL GetCRC
000028 4607 MOV r7,r0
;;;659
;;;660 string_out[6] = crc & 0x00ff;
00002a 71a7 STRB r7,[r4,#6]
;;;661 string_out[7] = crc >> 8;
00002c 1238 ASRS r0,r7,#8
00002e 71e0 STRB r0,[r4,#7]
;;;662
;;;663 return 8;
000030 2008 MOVS r0,#8
;;;664 }
000032 e8bd81f0 POP {r4-r8,pc}
;;;665
ENDP
AREA ||i.Modbus_RTU_Write||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write PROC
;;;431
;;;432 void Modbus_RTU_Write()
000000 b51c PUSH {r2-r4,lr}
;;;433 {
;;;434 static unsigned char string_out[1024];
;;;435 static unsigned char data[128];
;;;436 unsigned short len;
;;;437
;;;438 data[0] = 2;
000002 2002 MOVS r0,#2
000004 490e LDR r1,|L31.64|
000006 7008 STRB r0,[r1,#0]
;;;439 data[1] = 2;
000008 7048 STRB r0,[r1,#1]
;;;440 data[2] = 2;
00000a 7088 STRB r0,[r1,#2]
;;;441 data[3] = 2;
00000c 70c8 STRB r0,[r1,#3]
;;;442 data[4] = 2;
00000e 7108 STRB r0,[r1,#4]
;;;443 data[5] = 2;
000010 7148 STRB r0,[r1,#5]
;;;444 data[6] = 2;
000012 7188 STRB r0,[r1,#6]
;;;445 data[7] = 2;
000014 71c8 STRB r0,[r1,#7]
;;;446 data[8] = 2;
000016 7208 STRB r0,[r1,#8]
;;;447 data[9] = 2;
000018 7248 STRB r0,[r1,#9]
;;;448
;;;449 len = Modbus_RTU_Write_CMD(string_out,0x01,0x10,32450,10,data);
00001a 4608 MOV r0,r1
00001c 210a MOVS r1,#0xa
00001e f64763c2 MOV r3,#0x7ec2
000022 2210 MOVS r2,#0x10
000024 e9cd1000 STRD r1,r0,[sp,#0]
000028 2101 MOVS r1,#1
00002a 4806 LDR r0,|L31.68|
00002c f7fffffe BL Modbus_RTU_Write_CMD
000030 b284 UXTH r4,r0
;;;450 if(len)
000032 b124 CBZ r4,|L31.62|
;;;451 {
;;;452 WriteUart(3,string_out,len);
000034 4622 MOV r2,r4
000036 4903 LDR r1,|L31.68|
000038 2003 MOVS r0,#3
00003a f7fffffe BL WriteUart
|L31.62|
;;;453 }
;;;454 }
00003e bd1c POP {r2-r4,pc}
;;;455
ENDP
|L31.64|
DCD |symbol_number.129|
|L31.68|
DCD |symbol_number.128|
AREA ||i.Modbus_RTU_Write_Action||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write_Action PROC
;;;238
;;;239 void Modbus_RTU_Write_Action()
000000 e92d47fc PUSH {r2-r10,lr}
;;;240 {
;;;241 int i,count,index;
;;;242 unsigned short crc;
;;;243 unsigned short mIndex;
;;;244 unsigned short mAddrss;
;;;245 unsigned char mask;
;;;246 static unsigned char string_out[1024];
;;;247 unsigned short len;
;;;248 static unsigned char data[6];
;;;249
;;;250 mAddrss = 61;
000004 f04f093d MOV r9,#0x3d
;;;251 mIndex = 0;
000008 2500 MOVS r5,#0
;;;252 index = 0;
00000a 46a8 MOV r8,r5
;;;253
;;;254 for(count = 0; count < 3; count++)
00000c 2400 MOVS r4,#0
00000e e02b B |L32.104|
|L32.16|
;;;255 {
;;;256 mask = 0x01;
000010 f04f0a01 MOV r10,#1
;;;257 data[count] = 0x00;
000014 2000 MOVS r0,#0
000016 491f LDR r1,|L32.148|
000018 5508 STRB r0,[r1,r4]
;;;258 for(i = 0; i < 8; i++)
00001a 2700 MOVS r7,#0
00001c e020 B |L32.96|
|L32.30|
;;;259 {
;;;260 if(PLC_Get_M(100*mAddrss+mIndex))
00001e 2164 MOVS r1,#0x64
000020 fb015109 MLA r1,r1,r9,r5
000024 b288 UXTH r0,r1
000026 f7fffffe BL PLC_Get_M
00002a b128 CBZ r0,|L32.56|
;;;261 {
;;;262 data[count] |= mask;
00002c 4819 LDR r0,|L32.148|
00002e 5d00 LDRB r0,[r0,r4]
000030 ea40000a ORR r0,r0,r10
000034 4917 LDR r1,|L32.148|
000036 5508 STRB r0,[r1,r4]
|L32.56|
;;;263 }
;;;264
;;;265 mask <<= 1;
000038 ea4f604a LSL r0,r10,#25
00003c ea4f6a10 LSR r10,r0,#24
;;;266 mIndex++;
000040 1c68 ADDS r0,r5,#1
000042 b285 UXTH r5,r0
;;;267 if(mIndex == 16)
000044 2d10 CMP r5,#0x10
000046 d104 BNE |L32.82|
;;;268 {
;;;269 mAddrss++;
000048 f1090001 ADD r0,r9,#1
00004c fa1ff980 UXTH r9,r0
;;;270 mIndex = 0;
000050 2500 MOVS r5,#0
|L32.82|
;;;271 }
;;;272 index++;
000052 f1080801 ADD r8,r8,#1
;;;273 if(index == 21)
000056 f1b80f15 CMP r8,#0x15
00005a d100 BNE |L32.94|
;;;274 break;
00005c e002 B |L32.100|
|L32.94|
00005e 1c7f ADDS r7,r7,#1 ;258
|L32.96|
000060 2f08 CMP r7,#8 ;258
000062 dbdc BLT |L32.30|
|L32.100|
000064 bf00 NOP
000066 1c64 ADDS r4,r4,#1 ;254
|L32.104|
000068 2c03 CMP r4,#3 ;254
00006a dbd1 BLT |L32.16|
;;;275 }
;;;276 }
;;;277
;;;278 len = Modbus_RTU_Write_CMD(string_out,0x01,0x0F,2208,21,data);
00006c 4809 LDR r0,|L32.148|
00006e 2115 MOVS r1,#0x15
000070 f44f630a MOV r3,#0x8a0
000074 220f MOVS r2,#0xf
000076 e9cd1000 STRD r1,r0,[sp,#0]
00007a 2101 MOVS r1,#1
00007c 4806 LDR r0,|L32.152|
00007e f7fffffe BL Modbus_RTU_Write_CMD
000082 b286 UXTH r6,r0
;;;279 if(len)
000084 b126 CBZ r6,|L32.144|
;;;280 {
;;;281 WriteUart(3,string_out,len);
000086 4632 MOV r2,r6
000088 4903 LDR r1,|L32.152|
00008a 2003 MOVS r0,#3
00008c f7fffffe BL WriteUart
|L32.144|
;;;282 }
;;;283 }
000090 e8bd87fc POP {r2-r10,pc}
;;;284
ENDP
|L32.148|
DCD |symbol_number.139|
|L32.152|
DCD |symbol_number.117|
AREA ||i.Modbus_RTU_Write_CMD||, CODE, READONLY, ALIGN=1
Modbus_RTU_Write_CMD PROC
;;;107
;;;108 unsigned int Modbus_RTU_Write_CMD(unsigned char string_out[],unsigned char address,unsigned char cmd,unsigned short dataAddress,unsigned char dataCount,unsigned char data[])
000000 e92d5fff PUSH {r0-r12,lr}
;;;109 {
000004 4604 MOV r4,r0
000006 4617 MOV r7,r2
000008 469a MOV r10,r3
00000a e9dd5b0e LDRD r5,r11,[sp,#0x38]
;;;110 int i,count,byteCount;
;;;111 unsigned short crc;
;;;112
;;;113 if(dataCount == 0)
00000e b91d CBNZ r5,|L33.24|
;;;114 return 0;
000010 2000 MOVS r0,#0
|L33.18|
;;;115
;;;116 string_out[0] = address;
;;;117 string_out[1] = cmd;
;;;118 string_out[2] = ((dataAddress >> 8) & 0xff);
;;;119 string_out[3] = (dataAddress & 0xff);
;;;120 if((cmd == 0x05) || (cmd == 0x06))
;;;121 {
;;;122 string_out[4] = data[0];
;;;123 string_out[5] = data[1];
;;;124
;;;125 crc = GetCRC(string_out,6);
;;;126
;;;127 string_out[6] = crc & 0x00ff;
;;;128 string_out[7] = crc >> 8;
;;;129
;;;130 return 8;
;;;131 }
;;;132 else if((cmd == 0x0f) || (cmd == 0x10))
;;;133 {
;;;134 string_out[4] = ((dataCount >> 8) & 0xff);
;;;135 string_out[5] = (dataCount & 0xff);
;;;136 if(cmd == 0x0f)
;;;137 {
;;;138 if(dataCount%8)
;;;139 {
;;;140 byteCount = (dataCount / 8) + 1;
;;;141 }
;;;142 else
;;;143 {
;;;144 byteCount = dataCount / 8;
;;;145 }
;;;146 string_out[6] = byteCount;
;;;147 }
;;;148 else
;;;149 {
;;;150 byteCount = dataCount * 2;
;;;151 string_out[6] = byteCount;
;;;152 }
;;;153 for(i = 0; i < byteCount; i++)
;;;154 {
;;;155 string_out[7+i] = data[i];
;;;156 }
;;;157
;;;158 crc = GetCRC(string_out,7+i);
;;;159
;;;160 string_out[7+i] = crc & 0x00ff;
;;;161 string_out[8+i] = crc >> 8;
;;;162
;;;163 return 9+i;
;;;164 }
;;;165 }
000012 b004 ADD sp,sp,#0x10
000014 e8bd9ff0 POP {r4-r12,pc}
|L33.24|
000018 9801 LDR r0,[sp,#4] ;116
00001a 7020 STRB r0,[r4,#0] ;116
00001c 7067 STRB r7,[r4,#1] ;117
00001e ea4f201a LSR r0,r10,#8 ;118
000022 70a0 STRB r0,[r4,#2] ;118
000024 f00a00ff AND r0,r10,#0xff ;119
000028 70e0 STRB r0,[r4,#3] ;119
00002a 2f05 CMP r7,#5 ;120
00002c d001 BEQ |L33.50|
00002e 2f06 CMP r7,#6 ;120
000030 d111 BNE |L33.86|
|L33.50|
000032 f89b0000 LDRB r0,[r11,#0] ;122
000036 7120 STRB r0,[r4,#4] ;122
000038 f89b0001 LDRB r0,[r11,#1] ;123
00003c 7160 STRB r0,[r4,#5] ;123
00003e 2106 MOVS r1,#6 ;125
000040 4620 MOV r0,r4 ;125
000042 f7fffffe BL GetCRC
000046 4681 MOV r9,r0 ;125
000048 f8849006 STRB r9,[r4,#6] ;127
00004c ea4f2029 ASR r0,r9,#8 ;128
000050 71e0 STRB r0,[r4,#7] ;128
000052 2008 MOVS r0,#8 ;130
000054 e7dd B |L33.18|
|L33.86|
000056 2f0f CMP r7,#0xf ;132
000058 d001 BEQ |L33.94|
00005a 2f10 CMP r7,#0x10 ;132
00005c d137 BNE |L33.206|
|L33.94|
00005e 2000 MOVS r0,#0 ;134
000060 7120 STRB r0,[r4,#4] ;134
000062 7165 STRB r5,[r4,#5] ;135
000064 2f0f CMP r7,#0xf ;136
000066 d117 BNE |L33.152|
000068 17e9 ASRS r1,r5,#31 ;138
00006a eb057151 ADD r1,r5,r1,LSR #29 ;138
00006e 10c9 ASRS r1,r1,#3 ;138
000070 eba501c1 SUB r1,r5,r1,LSL #3 ;138
000074 b139 CBZ r1,|L33.134|
000076 4628 MOV r0,r5 ;140
000078 17e9 ASRS r1,r5,#31 ;140
00007a eb057151 ADD r1,r5,r1,LSR #29 ;140
00007e 10c9 ASRS r1,r1,#3 ;140
000080 f1010801 ADD r8,r1,#1 ;140
000084 e005 B |L33.146|
|L33.134|
000086 4628 MOV r0,r5 ;144
000088 17e9 ASRS r1,r5,#31 ;144
00008a eb057151 ADD r1,r5,r1,LSR #29 ;144
00008e ea4f08e1 ASR r8,r1,#3 ;144
|L33.146|
000092 f8848006 STRB r8,[r4,#6] ;146
000096 e003 B |L33.160|
|L33.152|
000098 ea4f0845 LSL r8,r5,#1 ;150
00009c f8848006 STRB r8,[r4,#6] ;151
|L33.160|
0000a0 2600 MOVS r6,#0 ;153
0000a2 e004 B |L33.174|
|L33.164|
0000a4 f81b1006 LDRB r1,[r11,r6] ;155
0000a8 1df0 ADDS r0,r6,#7 ;155
0000aa 5421 STRB r1,[r4,r0] ;155
0000ac 1c76 ADDS r6,r6,#1 ;153
|L33.174|
0000ae 4546 CMP r6,r8 ;153
0000b0 dbf8 BLT |L33.164|
0000b2 1df1 ADDS r1,r6,#7 ;158
0000b4 4620 MOV r0,r4 ;158
0000b6 f7fffffe BL GetCRC
0000ba 4681 MOV r9,r0 ;158
0000bc 1df0 ADDS r0,r6,#7 ;160
0000be f8049000 STRB r9,[r4,r0] ;160
0000c2 ea4f2129 ASR r1,r9,#8 ;161
0000c6 1c40 ADDS r0,r0,#1 ;161
0000c8 5421 STRB r1,[r4,r0] ;161
0000ca 1c40 ADDS r0,r0,#1 ;163
0000cc e7a1 B |L33.18|
|L33.206|
0000ce bf00 NOP
0000d0 e79f B |L33.18|
;;;166
ENDP
AREA ||i.Modbus_RTU_Write_Position1||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write_Position1 PROC
;;;362
;;;363 void Modbus_RTU_Write_Position1()
000000 b51c PUSH {r2-r4,lr}
;;;364 {
;;;365 static unsigned char string_out[1024];
;;;366 unsigned short len;
;;;367 static unsigned char data[20];
;;;368
;;;369 data[0] = PLC_Get_D(618) >> 8;
000002 f240206a MOV r0,#0x26a
000006 f7fffffe BL PLC_Get_D
00000a 1200 ASRS r0,r0,#8
00000c 4947 LDR r1,|L34.300|
00000e 7008 STRB r0,[r1,#0]
;;;370 data[1] = PLC_Get_D(618) & 0xff;
000010 f240206a MOV r0,#0x26a
000014 f7fffffe BL PLC_Get_D
000018 4944 LDR r1,|L34.300|
00001a 7048 STRB r0,[r1,#1]
;;;371 data[2] = PLC_Get_D(619) >> 8;
00001c f240206b MOV r0,#0x26b
000020 f7fffffe BL PLC_Get_D
000024 1200 ASRS r0,r0,#8
000026 4941 LDR r1,|L34.300|
000028 7088 STRB r0,[r1,#2]
;;;372 data[3] = PLC_Get_D(619) & 0xff;
00002a f240206b MOV r0,#0x26b
00002e f7fffffe BL PLC_Get_D
000032 493e LDR r1,|L34.300|
000034 70c8 STRB r0,[r1,#3]
;;;373 data[4] = PLC_Get_D(620) >> 8;
000036 f44f701b MOV r0,#0x26c
00003a f7fffffe BL PLC_Get_D
00003e 1200 ASRS r0,r0,#8
000040 493a LDR r1,|L34.300|
000042 7108 STRB r0,[r1,#4]
;;;374 data[5] = PLC_Get_D(620) & 0xff;
000044 f44f701b MOV r0,#0x26c
000048 f7fffffe BL PLC_Get_D
00004c 4937 LDR r1,|L34.300|
00004e 7148 STRB r0,[r1,#5]
;;;375 data[6] = PLC_Get_D(621) >> 8;
000050 f240206d MOV r0,#0x26d
000054 f7fffffe BL PLC_Get_D
000058 1200 ASRS r0,r0,#8
00005a 4934 LDR r1,|L34.300|
00005c 7188 STRB r0,[r1,#6]
;;;376 data[7] = PLC_Get_D(621) & 0xff;
00005e f240206d MOV r0,#0x26d
000062 f7fffffe BL PLC_Get_D
000066 4931 LDR r1,|L34.300|
000068 71c8 STRB r0,[r1,#7]
;;;377 data[8] = PLC_Get_D(622) >> 8;
00006a f240206e MOV r0,#0x26e
00006e f7fffffe BL PLC_Get_D
000072 1200 ASRS r0,r0,#8
000074 492d LDR r1,|L34.300|
000076 7208 STRB r0,[r1,#8]
;;;378 data[9] = PLC_Get_D(622) & 0xff;
000078 f240206e MOV r0,#0x26e
00007c f7fffffe BL PLC_Get_D
000080 492a LDR r1,|L34.300|
000082 7248 STRB r0,[r1,#9]
;;;379 data[10] = PLC_Get_D(623) >> 8;
000084 f240206f MOV r0,#0x26f
000088 f7fffffe BL PLC_Get_D
00008c 1200 ASRS r0,r0,#8
00008e 4927 LDR r1,|L34.300|
000090 7288 STRB r0,[r1,#0xa]
;;;380 data[11] = PLC_Get_D(623) & 0xff;
000092 f240206f MOV r0,#0x26f
000096 f7fffffe BL PLC_Get_D
00009a 4924 LDR r1,|L34.300|
00009c 72c8 STRB r0,[r1,#0xb]
;;;381 data[12] = PLC_Get_D(624) >> 8;
00009e f44f701c MOV r0,#0x270
0000a2 f7fffffe BL PLC_Get_D
0000a6 1200 ASRS r0,r0,#8
0000a8 4920 LDR r1,|L34.300|
0000aa 7308 STRB r0,[r1,#0xc]
;;;382 data[13] = PLC_Get_D(624) & 0xff;
0000ac f44f701c MOV r0,#0x270
0000b0 f7fffffe BL PLC_Get_D
0000b4 491d LDR r1,|L34.300|
0000b6 7348 STRB r0,[r1,#0xd]
;;;383 data[14] = PLC_Get_D(625) >> 8;
0000b8 f2402071 MOV r0,#0x271
0000bc f7fffffe BL PLC_Get_D
0000c0 1200 ASRS r0,r0,#8
0000c2 491a LDR r1,|L34.300|
0000c4 7388 STRB r0,[r1,#0xe]
;;;384 data[15] = PLC_Get_D(625) & 0xff;
0000c6 f2402071 MOV r0,#0x271
0000ca f7fffffe BL PLC_Get_D
0000ce 4917 LDR r1,|L34.300|
0000d0 73c8 STRB r0,[r1,#0xf]
;;;385 data[16] = PLC_Get_D(626) >> 8;
0000d2 f2402072 MOV r0,#0x272
0000d6 f7fffffe BL PLC_Get_D
0000da 1200 ASRS r0,r0,#8
0000dc 4913 LDR r1,|L34.300|
0000de 7408 STRB r0,[r1,#0x10]
;;;386 data[17] = PLC_Get_D(626) & 0xff;
0000e0 f2402072 MOV r0,#0x272
0000e4 f7fffffe BL PLC_Get_D
0000e8 4910 LDR r1,|L34.300|
0000ea 7448 STRB r0,[r1,#0x11]
;;;387 data[18] = PLC_Get_D(627) >> 8;
0000ec f2402073 MOV r0,#0x273
0000f0 f7fffffe BL PLC_Get_D
0000f4 1200 ASRS r0,r0,#8
0000f6 490d LDR r1,|L34.300|
0000f8 7488 STRB r0,[r1,#0x12]
;;;388 data[19] = PLC_Get_D(627) & 0xff;
0000fa f2402073 MOV r0,#0x273
0000fe f7fffffe BL PLC_Get_D
000102 490a LDR r1,|L34.300|
000104 74c8 STRB r0,[r1,#0x13]
;;;389
;;;390 len = Modbus_RTU_Write_CMD(string_out,0x01,0x10,32480,10,data);
000106 4608 MOV r0,r1
000108 210a MOVS r1,#0xa
00010a f64763e0 MOV r3,#0x7ee0
00010e 2210 MOVS r2,#0x10
000110 e9cd1000 STRD r1,r0,[sp,#0]
000114 2101 MOVS r1,#1
000116 4806 LDR r0,|L34.304|
000118 f7fffffe BL Modbus_RTU_Write_CMD
00011c b284 UXTH r4,r0
;;;391 if(len)
00011e b124 CBZ r4,|L34.298|
;;;392 {
;;;393 WriteUart(3,string_out,len);
000120 4622 MOV r2,r4
000122 4903 LDR r1,|L34.304|
000124 2003 MOVS r0,#3
000126 f7fffffe BL WriteUart
|L34.298|
;;;394 }
;;;395 }
00012a bd1c POP {r2-r4,pc}
;;;396
ENDP
|L34.300|
DCD |symbol_number.125|
|L34.304|
DCD |symbol_number.124|
AREA ||i.Modbus_RTU_Write_Position2||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write_Position2 PROC
;;;396
;;;397 void Modbus_RTU_Write_Position2()
000000 b51c PUSH {r2-r4,lr}
;;;398 {
;;;399 static unsigned char string_out[1024];
;;;400 unsigned short len;
;;;401 static unsigned char data[20];
;;;402
;;;403 data[0] = PLC_Get_D(628) >> 8;
000002 f44f701d MOV r0,#0x274
000006 f7fffffe BL PLC_Get_D
00000a 1200 ASRS r0,r0,#8
00000c 4947 LDR r1,|L35.300|
00000e 7008 STRB r0,[r1,#0]
;;;404 data[1] = PLC_Get_D(628) & 0xff;
000010 f44f701d MOV r0,#0x274
000014 f7fffffe BL PLC_Get_D
000018 4944 LDR r1,|L35.300|
00001a 7048 STRB r0,[r1,#1]
;;;405 data[2] = PLC_Get_D(629) >> 8;
00001c f2402075 MOV r0,#0x275
000020 f7fffffe BL PLC_Get_D
000024 1200 ASRS r0,r0,#8
000026 4941 LDR r1,|L35.300|
000028 7088 STRB r0,[r1,#2]
;;;406 data[3] = PLC_Get_D(629) & 0xff;
00002a f2402075 MOV r0,#0x275
00002e f7fffffe BL PLC_Get_D
000032 493e LDR r1,|L35.300|
000034 70c8 STRB r0,[r1,#3]
;;;407 data[4] = PLC_Get_D(630) >> 8;
000036 f2402076 MOV r0,#0x276
00003a f7fffffe BL PLC_Get_D
00003e 1200 ASRS r0,r0,#8
000040 493a LDR r1,|L35.300|
000042 7108 STRB r0,[r1,#4]
;;;408 data[5] = PLC_Get_D(630) & 0xff;
000044 f2402076 MOV r0,#0x276
000048 f7fffffe BL PLC_Get_D
00004c 4937 LDR r1,|L35.300|
00004e 7148 STRB r0,[r1,#5]
;;;409 data[6] = PLC_Get_D(631) >> 8;
000050 f2402077 MOV r0,#0x277
000054 f7fffffe BL PLC_Get_D
000058 1200 ASRS r0,r0,#8
00005a 4934 LDR r1,|L35.300|
00005c 7188 STRB r0,[r1,#6]
;;;410 data[7] = PLC_Get_D(631) & 0xff;
00005e f2402077 MOV r0,#0x277
000062 f7fffffe BL PLC_Get_D
000066 4931 LDR r1,|L35.300|
000068 71c8 STRB r0,[r1,#7]
;;;411 data[8] = PLC_Get_D(632) >> 8;
00006a f44f701e MOV r0,#0x278
00006e f7fffffe BL PLC_Get_D
000072 1200 ASRS r0,r0,#8
000074 492d LDR r1,|L35.300|
000076 7208 STRB r0,[r1,#8]
;;;412 data[9] = PLC_Get_D(632) & 0xff;
000078 f44f701e MOV r0,#0x278
00007c f7fffffe BL PLC_Get_D
000080 492a LDR r1,|L35.300|
000082 7248 STRB r0,[r1,#9]
;;;413 data[10] = PLC_Get_D(633) >> 8;
000084 f2402079 MOV r0,#0x279
000088 f7fffffe BL PLC_Get_D
00008c 1200 ASRS r0,r0,#8
00008e 4927 LDR r1,|L35.300|
000090 7288 STRB r0,[r1,#0xa]
;;;414 data[11] = PLC_Get_D(633) & 0xff;
000092 f2402079 MOV r0,#0x279
000096 f7fffffe BL PLC_Get_D
00009a 4924 LDR r1,|L35.300|
00009c 72c8 STRB r0,[r1,#0xb]
;;;415 data[12] = PLC_Get_D(634) >> 8;
00009e f240207a MOV r0,#0x27a
0000a2 f7fffffe BL PLC_Get_D
0000a6 1200 ASRS r0,r0,#8
0000a8 4920 LDR r1,|L35.300|
0000aa 7308 STRB r0,[r1,#0xc]
;;;416 data[13] = PLC_Get_D(634) & 0xff;
0000ac f240207a MOV r0,#0x27a
0000b0 f7fffffe BL PLC_Get_D
0000b4 491d LDR r1,|L35.300|
0000b6 7348 STRB r0,[r1,#0xd]
;;;417 data[14] = PLC_Get_D(635) >> 8;
0000b8 f240207b MOV r0,#0x27b
0000bc f7fffffe BL PLC_Get_D
0000c0 1200 ASRS r0,r0,#8
0000c2 491a LDR r1,|L35.300|
0000c4 7388 STRB r0,[r1,#0xe]
;;;418 data[15] = PLC_Get_D(635) & 0xff;
0000c6 f240207b MOV r0,#0x27b
0000ca f7fffffe BL PLC_Get_D
0000ce 4917 LDR r1,|L35.300|
0000d0 73c8 STRB r0,[r1,#0xf]
;;;419 data[16] = PLC_Get_D(636) >> 8;
0000d2 f44f701f MOV r0,#0x27c
0000d6 f7fffffe BL PLC_Get_D
0000da 1200 ASRS r0,r0,#8
0000dc 4913 LDR r1,|L35.300|
0000de 7408 STRB r0,[r1,#0x10]
;;;420 data[17] = PLC_Get_D(636) & 0xff;
0000e0 f44f701f MOV r0,#0x27c
0000e4 f7fffffe BL PLC_Get_D
0000e8 4910 LDR r1,|L35.300|
0000ea 7448 STRB r0,[r1,#0x11]
;;;421 data[18] = PLC_Get_D(637) >> 8;
0000ec f240207d MOV r0,#0x27d
0000f0 f7fffffe BL PLC_Get_D
0000f4 1200 ASRS r0,r0,#8
0000f6 490d LDR r1,|L35.300|
0000f8 7488 STRB r0,[r1,#0x12]
;;;422 data[19] = PLC_Get_D(637) & 0xff;
0000fa f240207d MOV r0,#0x27d
0000fe f7fffffe BL PLC_Get_D
000102 490a LDR r1,|L35.300|
000104 74c8 STRB r0,[r1,#0x13]
;;;423
;;;424 len = Modbus_RTU_Write_CMD(string_out,0x01,0x10,32490,10,data);
000106 4608 MOV r0,r1
000108 210a MOVS r1,#0xa
00010a f64763ea MOV r3,#0x7eea
00010e 2210 MOVS r2,#0x10
000110 e9cd1000 STRD r1,r0,[sp,#0]
000114 2101 MOVS r1,#1
000116 4806 LDR r0,|L35.304|
000118 f7fffffe BL Modbus_RTU_Write_CMD
00011c b284 UXTH r4,r0
;;;425 if(len)
00011e b124 CBZ r4,|L35.298|
;;;426 {
;;;427 WriteUart(3,string_out,len);
000120 4622 MOV r2,r4
000122 4903 LDR r1,|L35.304|
000124 2003 MOVS r0,#3
000126 f7fffffe BL WriteUart
|L35.298|
;;;428 }
;;;429 }
00012a bd1c POP {r2-r4,pc}
;;;430
ENDP
|L35.300|
DCD |symbol_number.127|
|L35.304|
DCD |symbol_number.126|
AREA ||i.Modbus_RTU_Write_Speed1||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write_Speed1 PROC
;;;284
;;;285 void Modbus_RTU_Write_Speed1()
000000 b51c PUSH {r2-r4,lr}
;;;286 {
;;;287 static unsigned char string_out[1024];
;;;288 unsigned short len;
;;;289 static unsigned char data[12];
;;;290
;;;291 data[0] = PLC_Get_D(600) >> 8;
000002 f44f7016 MOV r0,#0x258
000006 f7fffffe BL PLC_Get_D
00000a 1200 ASRS r0,r0,#8
00000c 492d LDR r1,|L36.196|
00000e 7008 STRB r0,[r1,#0]
;;;292 data[1] = PLC_Get_D(600) & 0xff;
000010 f44f7016 MOV r0,#0x258
000014 f7fffffe BL PLC_Get_D
000018 492a LDR r1,|L36.196|
00001a 7048 STRB r0,[r1,#1]
;;;293 data[2] = PLC_Get_D(601) >> 8;
00001c f2402059 MOV r0,#0x259
000020 f7fffffe BL PLC_Get_D
000024 1200 ASRS r0,r0,#8
000026 4927 LDR r1,|L36.196|
000028 7088 STRB r0,[r1,#2]
;;;294 data[3] = PLC_Get_D(601) & 0xff;
00002a f2402059 MOV r0,#0x259
00002e f7fffffe BL PLC_Get_D
000032 4924 LDR r1,|L36.196|
000034 70c8 STRB r0,[r1,#3]
;;;295 data[4] = PLC_Get_D(602) >> 8;
000036 f240205a MOV r0,#0x25a
00003a f7fffffe BL PLC_Get_D
00003e 1200 ASRS r0,r0,#8
000040 4920 LDR r1,|L36.196|
000042 7108 STRB r0,[r1,#4]
;;;296 data[5] = PLC_Get_D(602) & 0xff;
000044 f240205a MOV r0,#0x25a
000048 f7fffffe BL PLC_Get_D
00004c 491d LDR r1,|L36.196|
00004e 7148 STRB r0,[r1,#5]
;;;297 data[6] = PLC_Get_D(603) >> 8;
000050 f240205b MOV r0,#0x25b
000054 f7fffffe BL PLC_Get_D
000058 1200 ASRS r0,r0,#8
00005a 491a LDR r1,|L36.196|
00005c 7188 STRB r0,[r1,#6]
;;;298 data[7] = PLC_Get_D(603) & 0xff;
00005e f240205b MOV r0,#0x25b
000062 f7fffffe BL PLC_Get_D
000066 4917 LDR r1,|L36.196|
000068 71c8 STRB r0,[r1,#7]
;;;299 data[8] = PLC_Get_D(604) >> 8;
00006a f44f7017 MOV r0,#0x25c
00006e f7fffffe BL PLC_Get_D
000072 1200 ASRS r0,r0,#8
000074 4913 LDR r1,|L36.196|
000076 7208 STRB r0,[r1,#8]
;;;300 data[9] = PLC_Get_D(604) & 0xff;
000078 f44f7017 MOV r0,#0x25c
00007c f7fffffe BL PLC_Get_D
000080 4910 LDR r1,|L36.196|
000082 7248 STRB r0,[r1,#9]
;;;301 data[10] = PLC_Get_D(605) >> 8;
000084 f240205d MOV r0,#0x25d
000088 f7fffffe BL PLC_Get_D
00008c 1200 ASRS r0,r0,#8
00008e 490d LDR r1,|L36.196|
000090 7288 STRB r0,[r1,#0xa]
;;;302 data[11] = PLC_Get_D(605) & 0xff;
000092 f240205d MOV r0,#0x25d
000096 f7fffffe BL PLC_Get_D
00009a 490a LDR r1,|L36.196|
00009c 72c8 STRB r0,[r1,#0xb]
;;;303
;;;304 len = Modbus_RTU_Write_CMD(string_out,0x01,0x10,32450,6,data);
00009e 4608 MOV r0,r1
0000a0 2106 MOVS r1,#6
0000a2 f64763c2 MOV r3,#0x7ec2
0000a6 2210 MOVS r2,#0x10
0000a8 e9cd1000 STRD r1,r0,[sp,#0]
0000ac 2101 MOVS r1,#1
0000ae 4806 LDR r0,|L36.200|
0000b0 f7fffffe BL Modbus_RTU_Write_CMD
0000b4 b284 UXTH r4,r0
;;;305 if(len)
0000b6 b124 CBZ r4,|L36.194|
;;;306 {
;;;307 WriteUart(3,string_out,len);
0000b8 4622 MOV r2,r4
0000ba 4903 LDR r1,|L36.200|
0000bc 2003 MOVS r0,#3
0000be f7fffffe BL WriteUart
|L36.194|
;;;308 }
;;;309 }
0000c2 bd1c POP {r2-r4,pc}
;;;310
ENDP
|L36.196|
DCD data
|L36.200|
DCD |symbol_number.118|
AREA ||i.Modbus_RTU_Write_Speed2||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write_Speed2 PROC
;;;310
;;;311 void Modbus_RTU_Write_Speed2()
000000 b51c PUSH {r2-r4,lr}
;;;312 {
;;;313 static unsigned char string_out[1024];
;;;314 unsigned short len;
;;;315 static unsigned char data[12];
;;;316
;;;317 data[0] = PLC_Get_D(606) >> 8;
000002 f240205e MOV r0,#0x25e
000006 f7fffffe BL PLC_Get_D
00000a 1200 ASRS r0,r0,#8
00000c 492d LDR r1,|L37.196|
00000e 7008 STRB r0,[r1,#0]
;;;318 data[1] = PLC_Get_D(606) & 0xff;
000010 f240205e MOV r0,#0x25e
000014 f7fffffe BL PLC_Get_D
000018 492a LDR r1,|L37.196|
00001a 7048 STRB r0,[r1,#1]
;;;319 data[2] = PLC_Get_D(607) >> 8;
00001c f240205f MOV r0,#0x25f
000020 f7fffffe BL PLC_Get_D
000024 1200 ASRS r0,r0,#8
000026 4927 LDR r1,|L37.196|
000028 7088 STRB r0,[r1,#2]
;;;320 data[3] = PLC_Get_D(607) & 0xff;
00002a f240205f MOV r0,#0x25f
00002e f7fffffe BL PLC_Get_D
000032 4924 LDR r1,|L37.196|
000034 70c8 STRB r0,[r1,#3]
;;;321 data[4] = PLC_Get_D(608) >> 8;
000036 f44f7018 MOV r0,#0x260
00003a f7fffffe BL PLC_Get_D
00003e 1200 ASRS r0,r0,#8
000040 4920 LDR r1,|L37.196|
000042 7108 STRB r0,[r1,#4]
;;;322 data[5] = PLC_Get_D(608) & 0xff;
000044 f44f7018 MOV r0,#0x260
000048 f7fffffe BL PLC_Get_D
00004c 491d LDR r1,|L37.196|
00004e 7148 STRB r0,[r1,#5]
;;;323 data[6] = PLC_Get_D(609) >> 8;
000050 f2402061 MOV r0,#0x261
000054 f7fffffe BL PLC_Get_D
000058 1200 ASRS r0,r0,#8
00005a 491a LDR r1,|L37.196|
00005c 7188 STRB r0,[r1,#6]
;;;324 data[7] = PLC_Get_D(609) & 0xff;
00005e f2402061 MOV r0,#0x261
000062 f7fffffe BL PLC_Get_D
000066 4917 LDR r1,|L37.196|
000068 71c8 STRB r0,[r1,#7]
;;;325 data[8] = PLC_Get_D(610) >> 8;
00006a f2402062 MOV r0,#0x262
00006e f7fffffe BL PLC_Get_D
000072 1200 ASRS r0,r0,#8
000074 4913 LDR r1,|L37.196|
000076 7208 STRB r0,[r1,#8]
;;;326 data[9] = PLC_Get_D(610) & 0xff;
000078 f2402062 MOV r0,#0x262
00007c f7fffffe BL PLC_Get_D
000080 4910 LDR r1,|L37.196|
000082 7248 STRB r0,[r1,#9]
;;;327 data[10] = PLC_Get_D(611) >> 8;
000084 f2402063 MOV r0,#0x263
000088 f7fffffe BL PLC_Get_D
00008c 1200 ASRS r0,r0,#8
00008e 490d LDR r1,|L37.196|
000090 7288 STRB r0,[r1,#0xa]
;;;328 data[11] = PLC_Get_D(611) & 0xff;
000092 f2402063 MOV r0,#0x263
000096 f7fffffe BL PLC_Get_D
00009a 490a LDR r1,|L37.196|
00009c 72c8 STRB r0,[r1,#0xb]
;;;329
;;;330 len = Modbus_RTU_Write_CMD(string_out,0x01,0x10,32458,6,data);
00009e 4608 MOV r0,r1
0000a0 2106 MOVS r1,#6
0000a2 f64763ca MOV r3,#0x7eca
0000a6 2210 MOVS r2,#0x10
0000a8 e9cd1000 STRD r1,r0,[sp,#0]
0000ac 2101 MOVS r1,#1
0000ae 4806 LDR r0,|L37.200|
0000b0 f7fffffe BL Modbus_RTU_Write_CMD
0000b4 b284 UXTH r4,r0
;;;331 if(len)
0000b6 b124 CBZ r4,|L37.194|
;;;332 {
;;;333 WriteUart(3,string_out,len);
0000b8 4622 MOV r2,r4
0000ba 4903 LDR r1,|L37.200|
0000bc 2003 MOVS r0,#3
0000be f7fffffe BL WriteUart
|L37.194|
;;;334 }
;;;335 }
0000c2 bd1c POP {r2-r4,pc}
;;;336
ENDP
|L37.196|
DCD |symbol_number.121|
|L37.200|
DCD |symbol_number.120|
AREA ||i.Modbus_RTU_Write_Speed3||, CODE, READONLY, ALIGN=2
Modbus_RTU_Write_Speed3 PROC
;;;336
;;;337 void Modbus_RTU_Write_Speed3()
000000 b51c PUSH {r2-r4,lr}
;;;338 {
;;;339 static unsigned char string_out[1024];
;;;340 unsigned short len;
;;;341 static unsigned char data[12];
;;;342
;;;343 data[0] = PLC_Get_D(612) >> 8;
000002 f44f7019 MOV r0,#0x264
000006 f7fffffe BL PLC_Get_D
00000a 1200 ASRS r0,r0,#8
00000c 492d LDR r1,|L38.196|
00000e 7008 STRB r0,[r1,#0]
;;;344 data[1] = PLC_Get_D(612) & 0xff;
000010 f44f7019 MOV r0,#0x264
000014 f7fffffe BL PLC_Get_D
000018 492a LDR r1,|L38.196|
00001a 7048 STRB r0,[r1,#1]
;;;345 data[2] = PLC_Get_D(613) >> 8;
00001c f2402065 MOV r0,#0x265
000020 f7fffffe BL PLC_Get_D
000024 1200 ASRS r0,r0,#8
000026 4927 LDR r1,|L38.196|
000028 7088 STRB r0,[r1,#2]
;;;346 data[3] = PLC_Get_D(613) & 0xff;
00002a f2402065 MOV r0,#0x265
00002e f7fffffe BL PLC_Get_D
000032 4924 LDR r1,|L38.196|
000034 70c8 STRB r0,[r1,#3]
;;;347 data[4] = PLC_Get_D(614) >> 8;
000036 f2402066 MOV r0,#0x266
00003a f7fffffe BL PLC_Get_D
00003e 1200 ASRS r0,r0,#8
000040 4920 LDR r1,|L38.196|
000042 7108 STRB r0,[r1,#4]
;;;348 data[5] = PLC_Get_D(614) & 0xff;
000044 f2402066 MOV r0,#0x266
000048 f7fffffe BL PLC_Get_D
00004c 491d LDR r1,|L38.196|
00004e 7148 STRB r0,[r1,#5]
;;;349 data[6] = PLC_Get_D(615) >> 8;
000050 f2402067 MOV r0,#0x267
000054 f7fffffe BL PLC_Get_D
000058 1200 ASRS r0,r0,#8
00005a 491a LDR r1,|L38.196|
00005c 7188 STRB r0,[r1,#6]
;;;350 data[7] = PLC_Get_D(615) & 0xff;
00005e f2402067 MOV r0,#0x267
000062 f7fffffe BL PLC_Get_D
000066 4917 LDR r1,|L38.196|
000068 71c8 STRB r0,[r1,#7]
;;;351 data[8] = PLC_Get_D(616) >> 8;
00006a f44f701a MOV r0,#0x268
00006e f7fffffe BL PLC_Get_D
000072 1200 ASRS r0,r0,#8
000074 4913 LDR r1,|L38.196|
000076 7208 STRB r0,[r1,#8]
;;;352 data[9] = PLC_Get_D(616) & 0xff;
000078 f44f701a MOV r0,#0x268
00007c f7fffffe BL PLC_Get_D
000080 4910 LDR r1,|L38.196|
000082 7248 STRB r0,[r1,#9]
;;;353 data[10] = PLC_Get_D(617) >> 8;
000084 f2402069 MOV r0,#0x269
000088 f7fffffe BL PLC_Get_D
00008c 1200 ASRS r0,r0,#8
00008e 490d LDR r1,|L38.196|
000090 7288 STRB r0,[r1,#0xa]
;;;354 data[11] = PLC_Get_D(617) & 0xff;
000092 f2402069 MOV r0,#0x269
000096 f7fffffe BL PLC_Get_D
00009a 490a LDR r1,|L38.196|
00009c 72c8 STRB r0,[r1,#0xb]
;;;355
;;;356 len = Modbus_RTU_Write_CMD(string_out,0x01,0x10,32470,6,data);
00009e 4608 MOV r0,r1
0000a0 2106 MOVS r1,#6
0000a2 f64763d6 MOV r3,#0x7ed6
0000a6 2210 MOVS r2,#0x10
0000a8 e9cd1000 STRD r1,r0,[sp,#0]
0000ac 2101 MOVS r1,#1
0000ae 4806 LDR r0,|L38.200|
0000b0 f7fffffe BL Modbus_RTU_Write_CMD
0000b4 b284 UXTH r4,r0
;;;357 if(len)
0000b6 b124 CBZ r4,|L38.194|
;;;358 {
;;;359 WriteUart(3,string_out,len);
0000b8 4622 MOV r2,r4
0000ba 4903 LDR r1,|L38.200|
0000bc 2003 MOVS r0,#3
0000be f7fffffe BL WriteUart
|L38.194|
;;;360 }
;;;361 }
0000c2 bd1c POP {r2-r4,pc}
;;;362
ENDP
|L38.196|
DCD |symbol_number.123|
|L38.200|
DCD |symbol_number.122|
AREA ||i.Process_Modbus_RTU_Host||, CODE, READONLY, ALIGN=2
Process_Modbus_RTU_Host PROC
;;;463
;;;464 void Process_Modbus_RTU_Host()
000000 b510 PUSH {r4,lr}
;;;465 {
;;;466 Modbus_RTU_Host_OutTime_Check();
000002 f7fffffe BL Modbus_RTU_Host_OutTime_Check
;;;467 if(modbus_rtu_host_response == 0)
000006 487a LDR r0,|L39.496|
000008 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_response
00000a 2800 CMP r0,#0
00000c d113 BNE |L39.54|
;;;468 {
;;;469 modbus_rtu_host_start_time = bsp_GetRunTime();
00000e f7fffffe BL bsp_GetRunTime
000012 4978 LDR r1,|L39.500|
000014 6008 STR r0,[r1,#0] ; modbus_rtu_host_start_time
;;;470 if(modbus_rtu_host_step == 0)
000016 4878 LDR r0,|L39.504|
000018 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00001a b968 CBNZ r0,|L39.56|
;;;471 {
;;;472 Modbus_RTU_Read_State();
00001c f7fffffe BL Modbus_RTU_Read_State
;;;473 modbus_rtu_host_step = 1;
000020 2001 MOVS r0,#1
000022 4975 LDR r1,|L39.504|
000024 7008 STRB r0,[r1,#0]
;;;474 modbus_rtu_host_response = 1;
000026 4972 LDR r1,|L39.496|
000028 7008 STRB r0,[r1,#0]
;;;475 modbus_rtu_host_address = 2048;
00002a 02c0 LSLS r0,r0,#11
00002c 4973 LDR r1,|L39.508|
00002e 8008 STRH r0,[r1,#0]
;;;476 modbus_rtu_host_num = 9;
000030 2009 MOVS r0,#9
000032 4973 LDR r1,|L39.512|
000034 7008 STRB r0,[r1,#0]
|L39.54|
000036 e0da B |L39.494|
|L39.56|
;;;477 }
;;;478 else if(modbus_rtu_host_step == 1)
000038 486f LDR r0,|L39.504|
00003a 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00003c 2801 CMP r0,#1
00003e d10f BNE |L39.96|
;;;479 {
;;;480 Modbus_RTU_Read_Speed1();
000040 f7fffffe BL Modbus_RTU_Read_Speed1
;;;481 modbus_rtu_host_step = 2;
000044 2002 MOVS r0,#2
000046 496c LDR r1,|L39.504|
000048 7008 STRB r0,[r1,#0]
;;;482 modbus_rtu_host_response = 1;
00004a 2001 MOVS r0,#1
00004c 4968 LDR r1,|L39.496|
00004e 7008 STRB r0,[r1,#0]
;;;483 modbus_rtu_host_address = 32450;
000050 f64760c2 MOV r0,#0x7ec2
000054 4969 LDR r1,|L39.508|
000056 8008 STRH r0,[r1,#0]
;;;484 modbus_rtu_host_num = 6;
000058 2006 MOVS r0,#6
00005a 4969 LDR r1,|L39.512|
00005c 7008 STRB r0,[r1,#0]
00005e e0c6 B |L39.494|
|L39.96|
;;;485 }
;;;486 else if(modbus_rtu_host_step == 2)
000060 4865 LDR r0,|L39.504|
000062 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000064 2802 CMP r0,#2
000066 d10f BNE |L39.136|
;;;487 {
;;;488 Modbus_RTU_Read_Speed2();
000068 f7fffffe BL Modbus_RTU_Read_Speed2
;;;489 modbus_rtu_host_step = 3;
00006c 2003 MOVS r0,#3
00006e 4962 LDR r1,|L39.504|
000070 7008 STRB r0,[r1,#0]
;;;490 modbus_rtu_host_response = 1;
000072 2001 MOVS r0,#1
000074 495e LDR r1,|L39.496|
000076 7008 STRB r0,[r1,#0]
;;;491 modbus_rtu_host_address = 32458;
000078 f64760ca MOV r0,#0x7eca
00007c 495f LDR r1,|L39.508|
00007e 8008 STRH r0,[r1,#0]
;;;492 modbus_rtu_host_num = 6;
000080 2006 MOVS r0,#6
000082 495f LDR r1,|L39.512|
000084 7008 STRB r0,[r1,#0]
000086 e0b2 B |L39.494|
|L39.136|
;;;493 }
;;;494 else if(modbus_rtu_host_step == 3)
000088 485b LDR r0,|L39.504|
00008a 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00008c 2803 CMP r0,#3
00008e d10f BNE |L39.176|
;;;495 {
;;;496 Modbus_RTU_Read_Speed3();
000090 f7fffffe BL Modbus_RTU_Read_Speed3
;;;497 modbus_rtu_host_step = 4;
000094 2004 MOVS r0,#4
000096 4958 LDR r1,|L39.504|
000098 7008 STRB r0,[r1,#0]
;;;498 modbus_rtu_host_response = 1;
00009a 2001 MOVS r0,#1
00009c 4954 LDR r1,|L39.496|
00009e 7008 STRB r0,[r1,#0]
;;;499 modbus_rtu_host_address = 32470;
0000a0 f64760d6 MOV r0,#0x7ed6
0000a4 4955 LDR r1,|L39.508|
0000a6 8008 STRH r0,[r1,#0]
;;;500 modbus_rtu_host_num = 6;
0000a8 2006 MOVS r0,#6
0000aa 4955 LDR r1,|L39.512|
0000ac 7008 STRB r0,[r1,#0]
0000ae e09e B |L39.494|
|L39.176|
;;;501 }
;;;502 else if(modbus_rtu_host_step == 4)
0000b0 4851 LDR r0,|L39.504|
0000b2 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0000b4 2804 CMP r0,#4
0000b6 d10f BNE |L39.216|
;;;503 {
;;;504 Modbus_RTU_Read_Position1();
0000b8 f7fffffe BL Modbus_RTU_Read_Position1
;;;505 modbus_rtu_host_step = 5;
0000bc 2005 MOVS r0,#5
0000be 494e LDR r1,|L39.504|
0000c0 7008 STRB r0,[r1,#0]
;;;506 modbus_rtu_host_response = 1;
0000c2 2001 MOVS r0,#1
0000c4 494a LDR r1,|L39.496|
0000c6 7008 STRB r0,[r1,#0]
;;;507 modbus_rtu_host_address = 32480;
0000c8 f64760e0 MOV r0,#0x7ee0
0000cc 494b LDR r1,|L39.508|
0000ce 8008 STRH r0,[r1,#0]
;;;508 modbus_rtu_host_num = 10;
0000d0 200a MOVS r0,#0xa
0000d2 494b LDR r1,|L39.512|
0000d4 7008 STRB r0,[r1,#0]
0000d6 e08a B |L39.494|
|L39.216|
;;;509 }
;;;510 else if(modbus_rtu_host_step == 5)
0000d8 4847 LDR r0,|L39.504|
0000da 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0000dc 2805 CMP r0,#5
0000de d10f BNE |L39.256|
;;;511 {
;;;512 Modbus_RTU_Read_Position2();
0000e0 f7fffffe BL Modbus_RTU_Read_Position2
;;;513 modbus_rtu_host_step = 6;
0000e4 2006 MOVS r0,#6
0000e6 4944 LDR r1,|L39.504|
0000e8 7008 STRB r0,[r1,#0]
;;;514 modbus_rtu_host_response = 1;
0000ea 2001 MOVS r0,#1
0000ec 4940 LDR r1,|L39.496|
0000ee 7008 STRB r0,[r1,#0]
;;;515 modbus_rtu_host_address = 32490;
0000f0 f64760ea MOV r0,#0x7eea
0000f4 4941 LDR r1,|L39.508|
0000f6 8008 STRH r0,[r1,#0]
;;;516 modbus_rtu_host_num = 10;
0000f8 200a MOVS r0,#0xa
0000fa 4941 LDR r1,|L39.512|
0000fc 7008 STRB r0,[r1,#0]
0000fe e076 B |L39.494|
|L39.256|
;;;517 }
;;;518 else if(modbus_rtu_host_step == 6)
000100 483d LDR r0,|L39.504|
000102 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000104 2806 CMP r0,#6
000106 d10f BNE |L39.296|
;;;519 {
;;;520 Modbus_RTU_Write_Action();
000108 f7fffffe BL Modbus_RTU_Write_Action
;;;521 modbus_rtu_host_step = 0;
00010c 2000 MOVS r0,#0
00010e 493a LDR r1,|L39.504|
000110 7008 STRB r0,[r1,#0]
;;;522 modbus_rtu_host_response = 1;
000112 2001 MOVS r0,#1
000114 4936 LDR r1,|L39.496|
000116 7008 STRB r0,[r1,#0]
;;;523 modbus_rtu_host_address = 2208;
000118 f44f600a MOV r0,#0x8a0
00011c 4937 LDR r1,|L39.508|
00011e 8008 STRH r0,[r1,#0]
;;;524 modbus_rtu_host_num = 21;
000120 2015 MOVS r0,#0x15
000122 4937 LDR r1,|L39.512|
000124 7008 STRB r0,[r1,#0]
000126 e062 B |L39.494|
|L39.296|
;;;525 }
;;;526 else if(modbus_rtu_host_step == 7)
000128 4833 LDR r0,|L39.504|
00012a 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00012c 2807 CMP r0,#7
00012e d10f BNE |L39.336|
;;;527 {
;;;528 Modbus_RTU_Write_Speed1();
000130 f7fffffe BL Modbus_RTU_Write_Speed1
;;;529 modbus_rtu_host_step = 8;
000134 2008 MOVS r0,#8
000136 4930 LDR r1,|L39.504|
000138 7008 STRB r0,[r1,#0]
;;;530 modbus_rtu_host_response = 1;
00013a 2001 MOVS r0,#1
00013c 492c LDR r1,|L39.496|
00013e 7008 STRB r0,[r1,#0]
;;;531 modbus_rtu_host_address = 32450;
000140 f64760c2 MOV r0,#0x7ec2
000144 492d LDR r1,|L39.508|
000146 8008 STRH r0,[r1,#0]
;;;532 modbus_rtu_host_num = 6;
000148 2006 MOVS r0,#6
00014a 492d LDR r1,|L39.512|
00014c 7008 STRB r0,[r1,#0]
00014e e04e B |L39.494|
|L39.336|
;;;533 }
;;;534 else if(modbus_rtu_host_step == 8)
000150 4829 LDR r0,|L39.504|
000152 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
000154 2808 CMP r0,#8
000156 d10f BNE |L39.376|
;;;535 {
;;;536 Modbus_RTU_Write_Speed2();
000158 f7fffffe BL Modbus_RTU_Write_Speed2
;;;537 modbus_rtu_host_step = 9;
00015c 2009 MOVS r0,#9
00015e 4926 LDR r1,|L39.504|
000160 7008 STRB r0,[r1,#0]
;;;538 modbus_rtu_host_response = 1;
000162 2001 MOVS r0,#1
000164 4922 LDR r1,|L39.496|
000166 7008 STRB r0,[r1,#0]
;;;539 modbus_rtu_host_address = 32458;
000168 f64760ca MOV r0,#0x7eca
00016c 4923 LDR r1,|L39.508|
00016e 8008 STRH r0,[r1,#0]
;;;540 modbus_rtu_host_num = 6;
000170 2006 MOVS r0,#6
000172 4923 LDR r1,|L39.512|
000174 7008 STRB r0,[r1,#0]
000176 e03a B |L39.494|
|L39.376|
;;;541 }
;;;542 else if(modbus_rtu_host_step == 9)
000178 481f LDR r0,|L39.504|
00017a 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
00017c 2809 CMP r0,#9
00017e d10f BNE |L39.416|
;;;543 {
;;;544 Modbus_RTU_Write_Speed3();
000180 f7fffffe BL Modbus_RTU_Write_Speed3
;;;545 modbus_rtu_host_step = 10;
000184 200a MOVS r0,#0xa
000186 491c LDR r1,|L39.504|
000188 7008 STRB r0,[r1,#0]
;;;546 modbus_rtu_host_response = 1;
00018a 2001 MOVS r0,#1
00018c 4918 LDR r1,|L39.496|
00018e 7008 STRB r0,[r1,#0]
;;;547 modbus_rtu_host_address = 32470;
000190 f64760d6 MOV r0,#0x7ed6
000194 4919 LDR r1,|L39.508|
000196 8008 STRH r0,[r1,#0]
;;;548 modbus_rtu_host_num = 6;
000198 2006 MOVS r0,#6
00019a 4919 LDR r1,|L39.512|
00019c 7008 STRB r0,[r1,#0]
00019e e026 B |L39.494|
|L39.416|
;;;549 }
;;;550 else if(modbus_rtu_host_step == 10)
0001a0 4815 LDR r0,|L39.504|
0001a2 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0001a4 280a CMP r0,#0xa
0001a6 d10f BNE |L39.456|
;;;551 {
;;;552 Modbus_RTU_Write_Position1();
0001a8 f7fffffe BL Modbus_RTU_Write_Position1
;;;553 modbus_rtu_host_step = 11;
0001ac 200b MOVS r0,#0xb
0001ae 4912 LDR r1,|L39.504|
0001b0 7008 STRB r0,[r1,#0]
;;;554 modbus_rtu_host_response = 1;
0001b2 2001 MOVS r0,#1
0001b4 490e LDR r1,|L39.496|
0001b6 7008 STRB r0,[r1,#0]
;;;555 modbus_rtu_host_address = 32480;
0001b8 f64760e0 MOV r0,#0x7ee0
0001bc 490f LDR r1,|L39.508|
0001be 8008 STRH r0,[r1,#0]
;;;556 modbus_rtu_host_num = 10;
0001c0 200a MOVS r0,#0xa
0001c2 490f LDR r1,|L39.512|
0001c4 7008 STRB r0,[r1,#0]
0001c6 e012 B |L39.494|
|L39.456|
;;;557 }
;;;558 else if(modbus_rtu_host_step == 11)
0001c8 480b LDR r0,|L39.504|
0001ca 7800 LDRB r0,[r0,#0] ; modbus_rtu_host_step
0001cc 280b CMP r0,#0xb
0001ce d10e BNE |L39.494|
;;;559 {
;;;560 Modbus_RTU_Write_Position2();
0001d0 f7fffffe BL Modbus_RTU_Write_Position2
;;;561 modbus_rtu_host_step = 0;
0001d4 2000 MOVS r0,#0
0001d6 4908 LDR r1,|L39.504|
0001d8 7008 STRB r0,[r1,#0]
;;;562 modbus_rtu_host_response = 1;
0001da 2001 MOVS r0,#1
0001dc 4904 LDR r1,|L39.496|
0001de 7008 STRB r0,[r1,#0]
;;;563 modbus_rtu_host_address = 32490;
0001e0 f64760ea MOV r0,#0x7eea
0001e4 4905 LDR r1,|L39.508|
0001e6 8008 STRH r0,[r1,#0]
;;;564 modbus_rtu_host_num = 10;
0001e8 200a MOVS r0,#0xa
0001ea 4905 LDR r1,|L39.512|
0001ec 7008 STRB r0,[r1,#0]
|L39.494|
;;;565 }
;;;566 }
;;;567 }
0001ee bd10 POP {r4,pc}
;;;568
ENDP
|L39.496|
DCD modbus_rtu_host_response
|L39.500|
DCD modbus_rtu_host_start_time
|L39.504|
DCD modbus_rtu_host_step
|L39.508|
DCD modbus_rtu_host_address
|L39.512|
DCD modbus_rtu_host_num
AREA ||.bss||, DATA, NOINIT, ALIGN=0
string_out
% 1024
|symbol_number.112|
% 1024
|symbol_number.113|
% 1024
|symbol_number.114|
% 1024
|symbol_number.115|
% 1024
|symbol_number.116|
% 1024
|symbol_number.117|
% 1024
|symbol_number.118|
% 1024
data
% 12
|symbol_number.120|
% 1024
|symbol_number.121|
% 12
|symbol_number.122|
% 1024
|symbol_number.123|
% 12
|symbol_number.124|
% 1024
|symbol_number.125|
% 20
|symbol_number.126|
% 1024
|symbol_number.127|
% 20
|symbol_number.128|
% 1024
|symbol_number.129|
% 128
str_out
% 300
|symbol_number.131|
% 300
buf
% 1024
|symbol_number.133|
% 1024
|symbol_number.134|
% 1024
|symbol_number.135|
% 1024
buff
% 1024
|symbol_number.137|
% 300
|symbol_number.138|
% 300
AREA ||.constdata||, DATA, READONLY, ALIGN=2
000000 00c18140 DCB 0x00,0xc1,0x81,0x40
000004 01c08041 DCB 0x01,0xc0,0x80,0x41
000008 01c08041 DCB 0x01,0xc0,0x80,0x41
00000c 00c18140 DCB 0x00,0xc1,0x81,0x40
000010 01c08041 DCB 0x01,0xc0,0x80,0x41
000014 00c18140 DCB 0x00,0xc1,0x81,0x40
000018 00c18140 DCB 0x00,0xc1,0x81,0x40
00001c 01c08041 DCB 0x01,0xc0,0x80,0x41
000020 01c08041 DCB 0x01,0xc0,0x80,0x41
000024 00c18140 DCB 0x00,0xc1,0x81,0x40
000028 00c18140 DCB 0x00,0xc1,0x81,0x40
00002c 01c08041 DCB 0x01,0xc0,0x80,0x41
000030 00c18140 DCB 0x00,0xc1,0x81,0x40
000034 01c08041 DCB 0x01,0xc0,0x80,0x41
000038 01c08041 DCB 0x01,0xc0,0x80,0x41
00003c 00c18140 DCB 0x00,0xc1,0x81,0x40
000040 01c08041 DCB 0x01,0xc0,0x80,0x41
000044 00c18140 DCB 0x00,0xc1,0x81,0x40
000048 00c18140 DCB 0x00,0xc1,0x81,0x40
00004c 01c08041 DCB 0x01,0xc0,0x80,0x41
000050 00c18140 DCB 0x00,0xc1,0x81,0x40
000054 01c08041 DCB 0x01,0xc0,0x80,0x41
000058 01c08041 DCB 0x01,0xc0,0x80,0x41
00005c 00c18140 DCB 0x00,0xc1,0x81,0x40
000060 00c18140 DCB 0x00,0xc1,0x81,0x40
000064 01c08041 DCB 0x01,0xc0,0x80,0x41
000068 01c08041 DCB 0x01,0xc0,0x80,0x41
00006c 00c18140 DCB 0x00,0xc1,0x81,0x40
000070 01c08041 DCB 0x01,0xc0,0x80,0x41
000074 00c18140 DCB 0x00,0xc1,0x81,0x40
000078 00c18140 DCB 0x00,0xc1,0x81,0x40
00007c 01c08041 DCB 0x01,0xc0,0x80,0x41
000080 01c08041 DCB 0x01,0xc0,0x80,0x41
000084 00c18140 DCB 0x00,0xc1,0x81,0x40
000088 00c18140 DCB 0x00,0xc1,0x81,0x40
00008c 01c08041 DCB 0x01,0xc0,0x80,0x41
000090 00c18140 DCB 0x00,0xc1,0x81,0x40
000094 01c08041 DCB 0x01,0xc0,0x80,0x41
000098 01c08041 DCB 0x01,0xc0,0x80,0x41
00009c 00c18140 DCB 0x00,0xc1,0x81,0x40
0000a0 00c18140 DCB 0x00,0xc1,0x81,0x40
0000a4 01c08041 DCB 0x01,0xc0,0x80,0x41
0000a8 01c08041 DCB 0x01,0xc0,0x80,0x41
0000ac 00c18140 DCB 0x00,0xc1,0x81,0x40
0000b0 01c08041 DCB 0x01,0xc0,0x80,0x41
0000b4 00c18140 DCB 0x00,0xc1,0x81,0x40
0000b8 00c18140 DCB 0x00,0xc1,0x81,0x40
0000bc 01c08041 DCB 0x01,0xc0,0x80,0x41
0000c0 00c18140 DCB 0x00,0xc1,0x81,0x40
0000c4 01c08041 DCB 0x01,0xc0,0x80,0x41
0000c8 01c08041 DCB 0x01,0xc0,0x80,0x41
0000cc 00c18140 DCB 0x00,0xc1,0x81,0x40
0000d0 01c08041 DCB 0x01,0xc0,0x80,0x41
0000d4 00c18140 DCB 0x00,0xc1,0x81,0x40
0000d8 00c18140 DCB 0x00,0xc1,0x81,0x40
0000dc 01c08041 DCB 0x01,0xc0,0x80,0x41
0000e0 01c08041 DCB 0x01,0xc0,0x80,0x41
0000e4 00c18140 DCB 0x00,0xc1,0x81,0x40
0000e8 00c18140 DCB 0x00,0xc1,0x81,0x40
0000ec 01c08041 DCB 0x01,0xc0,0x80,0x41
0000f0 00c18140 DCB 0x00,0xc1,0x81,0x40
0000f4 01c08041 DCB 0x01,0xc0,0x80,0x41
0000f8 01c08041 DCB 0x01,0xc0,0x80,0x41
0000fc 00c18140 DCB 0x00,0xc1,0x81,0x40
000100 00c0c101 DCB 0x00,0xc0,0xc1,0x01
000104 c30302c2 DCB 0xc3,0x03,0x02,0xc2
000108 c60607c7 DCB 0xc6,0x06,0x07,0xc7
00010c 05c5c404 DCB 0x05,0xc5,0xc4,0x04
000110 cc0c0dcd DCB 0xcc,0x0c,0x0d,0xcd
000114 0fcfce0e DCB 0x0f,0xcf,0xce,0x0e
000118 0acacb0b DCB 0x0a,0xca,0xcb,0x0b
00011c c90908c8 DCB 0xc9,0x09,0x08,0xc8
000120 d81819d9 DCB 0xd8,0x18,0x19,0xd9
000124 1bdbda1a DCB 0x1b,0xdb,0xda,0x1a
000128 1ededf1f DCB 0x1e,0xde,0xdf,0x1f
00012c dd1d1cdc DCB 0xdd,0x1d,0x1c,0xdc
000130 14d4d515 DCB 0x14,0xd4,0xd5,0x15
000134 d71716d6 DCB 0xd7,0x17,0x16,0xd6
000138 d21213d3 DCB 0xd2,0x12,0x13,0xd3
00013c 11d1d010 DCB 0x11,0xd1,0xd0,0x10
000140 f03031f1 DCB 0xf0,0x30,0x31,0xf1
000144 33f3f232 DCB 0x33,0xf3,0xf2,0x32
000148 36f6f737 DCB 0x36,0xf6,0xf7,0x37
00014c f53534f4 DCB 0xf5,0x35,0x34,0xf4
000150 3cfcfd3d DCB 0x3c,0xfc,0xfd,0x3d
000154 ff3f3efe DCB 0xff,0x3f,0x3e,0xfe
000158 fa3a3bfb DCB 0xfa,0x3a,0x3b,0xfb
00015c 39f9f838 DCB 0x39,0xf9,0xf8,0x38
000160 28e8e929 DCB 0x28,0xe8,0xe9,0x29
000164 eb2b2aea DCB 0xeb,0x2b,0x2a,0xea
000168 ee2e2fef DCB 0xee,0x2e,0x2f,0xef
00016c 2dedec2c DCB 0x2d,0xed,0xec,0x2c
000170 e42425e5 DCB 0xe4,0x24,0x25,0xe5
000174 27e7e626 DCB 0x27,0xe7,0xe6,0x26
000178 22e2e323 DCB 0x22,0xe2,0xe3,0x23
00017c e12120e0 DCB 0xe1,0x21,0x20,0xe0
000180 a06061a1 DCB 0xa0,0x60,0x61,0xa1
000184 63a3a262 DCB 0x63,0xa3,0xa2,0x62
000188 66a6a767 DCB 0x66,0xa6,0xa7,0x67
00018c a56564a4 DCB 0xa5,0x65,0x64,0xa4
000190 6cacad6d DCB 0x6c,0xac,0xad,0x6d
000194 af6f6eae DCB 0xaf,0x6f,0x6e,0xae
000198 aa6a6bab DCB 0xaa,0x6a,0x6b,0xab
00019c 69a9a868 DCB 0x69,0xa9,0xa8,0x68
0001a0 78b8b979 DCB 0x78,0xb8,0xb9,0x79
0001a4 bb7b7aba DCB 0xbb,0x7b,0x7a,0xba
0001a8 be7e7fbf DCB 0xbe,0x7e,0x7f,0xbf
0001ac 7dbdbc7c DCB 0x7d,0xbd,0xbc,0x7c
0001b0 b47475b5 DCB 0xb4,0x74,0x75,0xb5
0001b4 77b7b676 DCB 0x77,0xb7,0xb6,0x76
0001b8 72b2b373 DCB 0x72,0xb2,0xb3,0x73
0001bc b17170b0 DCB 0xb1,0x71,0x70,0xb0
0001c0 50909151 DCB 0x50,0x90,0x91,0x51
0001c4 93535292 DCB 0x93,0x53,0x52,0x92
0001c8 96565797 DCB 0x96,0x56,0x57,0x97
0001cc 55959454 DCB 0x55,0x95,0x94,0x54
0001d0 9c5c5d9d DCB 0x9c,0x5c,0x5d,0x9d
0001d4 5f9f9e5e DCB 0x5f,0x9f,0x9e,0x5e
0001d8 5a9a9b5b DCB 0x5a,0x9a,0x9b,0x5b
0001dc 99595898 DCB 0x99,0x59,0x58,0x98
0001e0 88484989 DCB 0x88,0x48,0x49,0x89
0001e4 4b8b8a4a DCB 0x4b,0x8b,0x8a,0x4a
0001e8 4e8e8f4f DCB 0x4e,0x8e,0x8f,0x4f
0001ec 8d4d4c8c DCB 0x8d,0x4d,0x4c,0x8c
0001f0 44848545 DCB 0x44,0x84,0x85,0x45
0001f4 87474686 DCB 0x87,0x47,0x46,0x86
0001f8 82424383 DCB 0x82,0x42,0x43,0x83
0001fc 41818040 DCB 0x41,0x81,0x80,0x40
AREA ||.data||, DATA, ALIGN=2
modbus_rtu_host_step
000000 00 DCB 0x00
modbus_rtu_host_response
000001 00 DCB 0x00
modbus_rtu_host_address
000002 0000 DCW 0x0000
modbus_rtu_host_num
000004 00000000 DCB 0x00,0x00,0x00,0x00
modbus_rtu_host_start_time
DCD 0x00000000
|symbol_number.139|
DCD 0x00000000
000010 0000 DCB 0x00,0x00
;*** Start embedded assembler ***
#line 1 "..\\..\\User\\user_modbus.c"
AREA ||.rev16_text||, CODE
THUMB
EXPORT |__asm___13_user_modbus_c_77db2521____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___13_user_modbus_c_77db2521____REV16| PROC
#line 130
rev16 r0, r0
bx lr
ENDP
AREA ||.revsh_text||, CODE
THUMB
EXPORT |__asm___13_user_modbus_c_77db2521____REVSH|
#line 144
|__asm___13_user_modbus_c_77db2521____REVSH| PROC
#line 145
revsh r0, r0
bx lr
ENDP
AREA ||.rrx_text||, CODE
THUMB
EXPORT |__asm___13_user_modbus_c_77db2521____RRX|
#line 300
|__asm___13_user_modbus_c_77db2521____RRX| PROC
#line 301
rrx r0, r0
bx lr
ENDP
;*** End embedded assembler ***