VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)

VB爱好者乐园(VBGood)

 找回密码
 立即注册
搜索
楼主: shenlili

发一个电表业的抄表程序(Dlt645规约)--更新版

[复制链接]
发表于 2009-12-9 20:10:11 | 显示全部楼层
本帖最后由 VBProFan 于 2009-12-9 20:22 编辑

最近做这个通信管理机(规约转换机)的项目才知道这是什么意思。原来 DTL645 俗称 102。格式如图1,我用如图2的那个鬼东西来查看华立电表的地址。

102.JPG ui.JPG

公用B段的一段通信代码如下:

  1. 2009-11-27
  2. Received 16 Bytes:16:25:37
  3. 68 96 01 00 00 00 00 68 81 04 45 E9 37 39 8A 16
  4. Send 17 Bytes:16:25:37
  5. FE FE FE 68 96 01 00 00 00 00 68 01 02 46 E9 99 16
  6. Received 16 Bytes:16:25:38
  7. 68 96 01 00 00 00 00 68 81 04 46 E9 37 39 8B 16
  8. Send 17 Bytes:16:25:38
  9. FE FE FE 68 96 01 00 00 00 00 68 01 02 63 E9 B6 16
  10. Received 17 Bytes:16:25:38
  11. 68 96 01 00 00 00 00 68 81 05 63 E9 33 33 33 D2 16
  12. Send 17 Bytes:16:25:38
  13. FE FE FE 68 96 01 00 00 00 00 68 01 02 73 E9 C6 16
  14. Received 16 Bytes:16:25:39
  15. 68 96 01 00 00 00 00 68 81 04 73 E9 33 33 AE 16
  16. Send 17 Bytes:16:25:39
  17. FE FE FE 68 96 01 00 00 00 00 68 01 02 83 E9 D6 16
  18. Received 16 Bytes:16:25:39
  19. 68 96 01 00 00 00 00 68 81 04 83 E9 33 33 BE 16
  20. Send 17 Bytes:16:25:39
  21. FE FE FE 68 96 01 00 00 00 00 68 01 02 97 E9 EA 16
  22. Received 16 Bytes:16:25:39
  23. 68 96 01 00 00 00 00 68 81 04 97 E9 CC 37 6F 16
  24. Send 17 Bytes:16:25:39
  25. FE FE FE 68 81 01 00 00 00 00 68 01 02 63 E9 A1 16
  26. Send 17 Bytes:16:25:40
  27. FE FE FE 68 81 01 00 00 00 00 68 01 02 43 C3 5B 16
  28. Send 17 Bytes:16:25:41
  29. FE FE FE 68 82 01 00 00 00 00 68 01 02 43 C3 5C 16
  30. Received 18 Bytes:16:25:41
  31. 68 82 01 00 00 00 00 68 81 06 43 C3 75 49 33 33 04 16
  32. Send 17 Bytes:16:25:41
  33. FE FE FE 68 82 01 00 00 00 00 68 01 02 63 E9 A2 16
  34. Received 17 Bytes:16:25:41
  35. 68 82 01 00 00 00 00 68 81 05 63 E9 57 35 33 E4 16
  36. Send 17 Bytes:16:25:41
  37. FE FE FE 68 83 01 00 00 00 00 68 01 02 43 C3 5D 16
  38. Received 18 Bytes:16:25:42
  39. 68 83 01 00 00 00 00 68 81 06 43 C3 4A 48 34 33 DA 16
  40. Send 17 Bytes:16:25:42
  41. FE FE FE 68 83 01 00 00 00 00 68 01 02 63 E9 A3 16
  42. Received 17 Bytes:16:25:42
  43. 68 83 01 00 00 00 00 68 81 05 63 E9 35 34 33 C2 16
  44. Send 17 Bytes:16:25:42
  45. FE FE FE 68 84 01 00 00 00 00 68 01 02 43 C3 5E 16
  46. Received 18 Bytes:16:25:43
  47. 68 84 01 00 00 00 00 68 81 06 43 C3 C3 38 33 33 43 16
  48. Send 17 Bytes:16:25:43
  49. FE FE FE 68 84 01 00 00 00 00 68 01 02 63 E9 A4 16
  50. Received 17 Bytes:16:25:43
  51. 68 84 01 00 00 00 00 68 81 05 63 E9 46 33 33 D3 16
  52. Send 17 Bytes:16:25:43
  53. FE FE FE 68 85 01 00 00 00 00 68 01 02 43 C3 5F 16
  54. Received 18 Bytes:16:25:43
  55. 68 85 01 00 00 00 00 68 81 06 43 C3 3C 57 33 33 DC 16
  56. Send 17 Bytes:16:25:43
  57. FE FE FE 68 85 01 00 00 00 00 68 01 02 63 E9 A5 16
  58. Received 17 Bytes:16:25:44
  59. 68 85 01 00 00 00 00 68 81 05 63 E9 46 33 33 D4 16
  60. Send 17 Bytes:16:25:44
  61. FE FE FE 68 86 01 00 00 00 00 68 01 02 43 C3 60 16
  62. Send 17 Bytes:16:25:44
  63. FE FE FE 68 86 01 00 00 00 00 68 01 02 63 E9 A6 16
  64. Send 17 Bytes:16:25:45
  65. FE FE FE 68 87 01 00 00 00 00 68 01 02 43 C3 61 16
  66. Received 18 Bytes:16:25:45
  67. 68 87 01 00 00 00 00 68 81 06 43 C3 CC 37 33 33 4E 16
  68. Send 17 Bytes:16:25:45
  69. FE FE FE 68 87 01 00 00 00 00 68 01 02 63 E9 A7 16
  70. Received 17 Bytes:16:25:46
  71. 68 87 01 00 00 00 00 68 81 05 63 E9 34 34 33 C5 16
  72. Send 17 Bytes:16:25:46
  73. FE FE FE 68 89 01 00 00 00 00 68 01 02 43 C3 63 16
  74. Received 18 Bytes:16:25:46
  75. 68 89 01 00 00 00 00 68 81 06 43 C3 36 33 33 33 B6 16
  76. Send 17 Bytes:16:25:46
  77. FE FE FE 68 89 01 00 00 00 00 68 01 02 63 E9 A9 16
  78. Received 17 Bytes:16:25:47
  79. 68 89 01 00 00 00 00 68 81 05 63 E9 49 33 33 DB 16
  80. Send 17 Bytes:16:25:47
  81. FE FE FE 68 90 01 00 00 00 00 68 01 02 43 C3 6A 16
  82. Received 18 Bytes:16:25:47
  83. 68 90 01 00 00 00 00 68 81 06 43 C3 A4 85 36 33 80 16
  84. Send 17 Bytes:16:25:47
  85. FE FE FE 68 90 01 00 00 00 00 68 01 02 63 E9 B0 16
  86. Received 17 Bytes:16:25:47
  87. 68 90 01 00 00 00 00 68 81 05 63 E9 99 47 33 46 16
  88. Send 17 Bytes:16:25:47
  89. FE FE FE 68 91 01 00 00 00 00 68 01 02 43 C3 6B 16
  90. Received 18 Bytes:16:25:48
  91. 68 91 01 00 00 00 00 68 81 06 43 C3 A6 45 33 33 40 16
  92. Send 17 Bytes:16:25:48
  93. FE FE FE 68 91 01 00 00 00 00 68 01 02 63 E9 B1 16
  94. Received 17 Bytes:16:25:48
  95. 68 91 01 00 00 00 00 68 81 05 63 E9 33 33 33 CD 16
  96. Send 17 Bytes:16:25:48
  97. FE FE FE 68 94 01 00 00 00 00 68 01 02 54 E9 A5 16
  98. Received 16 Bytes:16:25:49
  99. 68 94 01 00 00 00 00 68 81 04 54 E9 33 33 8D 16
  100. Send 17 Bytes:16:25:49
  101. FE FE FE 68 94 01 00 00 00 00 68 01 02 55 E9 A6 16
  102. Received 16 Bytes:16:25:49
  103. 68 94 01 00 00 00 00 68 81 04 55 E9 33 33 8E 16
  104. Send 17 Bytes:16:25:49
  105. FE FE FE 68 94 01 00 00 00 00 68 01 02 56 E9 A7 16
  106. Received 16 Bytes:16:25:49
  107. 68 94 01 00 00 00 00 68 81 04 56 E9 33 33 8F 16
  108. Send 17 Bytes:16:25:49
  109. FE FE FE 68 94 01 00 00 00 00 68 01 02 44 E9 95 16
  110. Received 16 Bytes:16:25:50
  111. 68 94 01 00 00 00 00 68 81 04 44 E9 38 39 88 16
  112. Send 17 Bytes:16:25:50
  113. FE FE FE 68 94 01 00 00 00 00 68 01 02 45 E9 96 16
  114. Received 16 Bytes:16:25:50
  115. 68 94 01 00 00 00 00 68 81 04 45 E9 38 39 89 16
  116. Send 17 Bytes:16:25:50
  117. FE FE FE 68 94 01 00 00 00 00 68 01 02 46 E9 97 16
  118. Received 16 Bytes:16:25:51
  119. 68 94 01 00 00 00 00 68 81 04 46 E9 39 39 8B 16
  120. Send 17 Bytes:16:25:51
  121. FE FE FE 68 94 01 00 00 00 00 68 01 02 63 E9 B4 16
  122. Received 17 Bytes:16:25:51
  123. 68 94 01 00 00 00 00 68 81 05 63 E9 33 33 33 D0 16
  124. Send 17 Bytes:16:25:51
  125. FE FE FE 68 94 01 00 00 00 00 68 01 02 73 E9 C4 16
  126. Received 16 Bytes:16:25:51
  127. 68 94 01 00 00 00 00 68 81 04 73 E9 33 33 AC 16
  128. Send 17 Bytes:16:25:51
  129. FE FE FE 68 94 01 00 00 00 00 68 01 02 83 E9 D4 16
  130. Received 16 Bytes:16:25:52
  131. 68 94 01 00 00 00 00 68 81 04 83 E9 33 33 68 81
  132. Send 17 Bytes:16:25:52
  133. FE FE FE 68 94 01 00 00 00 00 68 01 02 97 E9 E8 16
  134. Received 16 Bytes:16:25:52
  135. 68 94 01 00 00 00 00 68 81 04 97 E9 34 38 D6 16
  136. Send 17 Bytes:16:25:52
  137. FE FE FE 68 96 01 00 00 00 00 68 01 02 54 E9 A7 16
  138. Received 16 Bytes:16:25:53
  139. 68 96 01 00 00 00 00 68 81 04 54 E9 33 33 8F 16
  140. Send 17 Bytes:16:25:53
  141. FE FE FE 68 96 01 00 00 00 00 68 01 02 55 E9 A8 16
  142. Received 16 Bytes:16:25:53
  143. 68 96 01 00 00 00 00 68 81 04 55 E9 33 33 90 16
  144. Send 17 Bytes:16:25:53
  145. FE FE FE 68 96 01 00 00 00 00 68 01 02 56 E9 A9 16
  146. Received 16 Bytes:16:25:53
  147. 68 96 01 00 00 00 00 68 81 04 56 E9 33 33 91 16
  148. Send 17 Bytes:16:25:53
  149. FE FE FE 68 96 01 00 00 00 00 68 01 02 44 E9 97 16
  150. Received 16 Bytes:16:25:54
  151. 68 96 01 00 00 00 00 68 81 04 44 E9 37 39 89 16
  152. Send 17 Bytes:16:25:54
  153. FE FE FE 68 96 01 00 00 00 00 68 01 02 45 E9 98 16
  154. Received 16 Bytes:16:25:54
  155. 68 96 01 00 00 00 00 68 81 04 45 E9 39 39 8C 16
  156. Send 17 Bytes:16:25:54
  157. FE FE FE 68 96 01 00 00 00 00 68 01 02 46 E9 99 16
  158. Received 16 Bytes:16:25:55
  159. 68 96 01 00 00 00 00 68 81 04 46 E9 38 39 8C 16
  160. Send 17 Bytes:16:25:55
  161. FE FE FE 68 96 01 00 00 00 00 68 01 02 63 E9 B6 16
  162. Received 17 Bytes:16:25:55
  163. 68 96 01 00 00 00 00 68 81 05 63 E9 33 33 33 D2 16
  164. Send 17 Bytes:16:25:55
  165. FE FE FE 68 96 01 00 00 00 00 68 01 02 73 E9 C6 16
  166. Received 16 Bytes:16:25:55
  167. 68 96 01 00 00 00 00 68 81 04 73 E9 33 33 AE 16
  168. Send 17 Bytes:16:25:55
  169. FE FE FE 68 96 01 00 00 00 00 68 01 02 83 E9 D6 16
  170. Received 16 Bytes:16:25:56
  171. 68 96 01 00 00 00 00 68 81 04 83 E9 33 33 BE 16
  172. Send 17 Bytes:16:25:56
  173. FE FE FE 68 96 01 00 00 00 00 68 01 02 97 E9 EA 16
  174. Received 16 Bytes:16:25:56
  175. 68 96 01 00 00 00 00 68 81 04 97 E9 34 38 D8 16
  176. Send 17 Bytes:16:25:56
  177. FE FE FE 68 81 01 00 00 00 00 68 01 02 63 E9 A1 16
  178. Send 17 Bytes:16:25:57
  179. FE FE FE 68 81 01 00 00 00 00 68 01 02 43 C3 5B 16
  180. Send 17 Bytes:16:25:57
  181. FE FE FE 68 82 01 00 00 00 00 68 01 02 43 C3 5C 16
  182. Received 18 Bytes:16:25:58
  183. 68 82 01 00 00 00 00 68 81 06 43 C3 75 49 33 33 04 16
  184. Send 17 Bytes:16:25:58
  185. FE FE FE 68 82 01 00 00 00 00 68 01 02 63 E9 A2 16
  186. Received 17 Bytes:16:25:58
  187. 68 82 01 00 00 00 00 68 81 05 63 E9 58 35 33 E5 16
  188. Send 17 Bytes:16:25:58
  189. FE FE FE 68 83 01 00 00 00 00 68 01 02 43 C3 5D 16
  190. Received 18 Bytes:16:25:59
  191. 68 83 01 00 00 00 00 68 81 06 43 C3 4A 48 34 33 DA 16
  192. Send 17 Bytes:16:25:59
  193. FE FE FE 68 83 01 00 00 00 00 68 01 02 63 E9 A3 16
  194. Received 17 Bytes:16:25:59
  195. 68 83 01 00 00 00 00 68 81 05 63 E9 34 34 33 C1 16
  196. Send 17 Bytes:16:25:59
  197. FE FE FE 68 84 01 00 00 00 00 68 01 02 43 C3 5E 16
  198. Received 18 Bytes:16:25:59
  199. 68 84 01 00 00 00 00 68 81 06 43 C3 C3 38 33 33 43 16
  200. Send 17 Bytes:16:25:59
  201. FE FE FE 68 84 01 00 00 00 00 68 01 02 63 E9 A4 16
  202. Received 17 Bytes:16:26:00
  203. 68 84 01 00 00 00 00 68 81 05 63 E9 46 33 33 D3 16
  204. Send 17 Bytes:16:26:00
  205. FE FE FE 68 85 01 00 00 00 00 68 01 02 43 C3 5F 16
  206. Received 18 Bytes:16:26:00
  207. 68 85 01 00 00 00 00 68 81 06 43 C3 3C 57 33 33 DC 16
  208. Send 17 Bytes:16:26:00
  209. FE FE FE 68 85 01 00 00 00 00 68 01 02 63 E9 A5 16
  210. Received 17 Bytes:16:26:01
  211. 68 85 01 00 00 00 00 68 81 05 63 E9 46 33 33 D4 16
  212. Send 17 Bytes:16:26:01
  213. FE FE FE 68 86 01 00 00 00 00 68 01 02 43 C3 60 16
  214. Send 17 Bytes:16:26:01
  215. FE FE FE 68 86 01 00 00 00 00 68 01 02 63 E9 A6 16
  216. Send 17 Bytes:16:26:02
  217. FE FE FE 68 87 01 00 00 00 00 68 01 02 43 C3 61 16
  218. Received 18 Bytes:16:26:02
  219. 68 87 01 00 00 00 00 68 81 06 43 C3 CC 37 33 33 4E 16
  220. Send 17 Bytes:16:26:02
  221. FE FE FE 68 87 01 00 00 00 00 68 01 02 63 E9 A7 16
  222. Received 17 Bytes:16:26:03
  223. 68 87 01 00 00 00 00 68 81 05 63 E9 CC 33 33 5C 16
  224. Send 17 Bytes:16:26:03
  225. FE FE FE 68 89 01 00 00 00 00 68 01 02 43 C3 63 16
  226. Received 18 Bytes:16:26:03
  227. 68 89 01 00 00 00 00 68 81 06 43 C3 36 33 33 33 B6 16
  228. Send 17 Bytes:16:26:03
  229. FE FE FE 68 89 01 00 00 00 00 68 01 02 63 E9 A9 16
  230. Received 17 Bytes:16:26:03
  231. 68 89 01 00 00 00 00 68 81 05 63 E9 98 33 33 2A 16
  232. Send 17 Bytes:16:26:03
  233. FE FE FE 68 90 01 00 00 00 00 68 01 02 43 C3 6A 16
  234. Received 18 Bytes:16:26:04
  235. 68 90 01 00 00 00 00 68 81 06 43 C3 A4 85 36 33 80 16
  236. Send 17 Bytes:16:26:04
  237. FE FE FE 68 90 01 00 00 00 00 68 01 02 63 E9 B0 16
  238. Received 17 Bytes:16:26:04
  239. 68 90 01 00 00 00 00 68 81 05 63 E9 A7 47 33 54 16
  240. Send 17 Bytes:16:26:04
  241. FE FE FE 68 91 01 00 00 00 00 68 01 02 43 C3 6B 16
  242. Received 18 Bytes:16:26:05
  243. 68 91 01 00 00 00 00 68 81 06 43 C3 A6 45 33 33 40 16
  244. Send 17 Bytes:16:26:05
  245. FE FE FE 68 91 01 00 00 00 00 68 01 02 63 E9 B1 16
  246. Received 17 Bytes:16:26:05
  247. 68 91 01 00 00 00 00 68 81 05 63 E9 33 33 33 CD 16
  248. Send 17 Bytes:16:26:05
  249. FE FE FE 68 94 01 00 00 00 00 68 01 02 54 E9 A5 16
  250. Received 16 Bytes:16:26:05
  251. 68 94 01 00 00 00 00 68 81 04 54 E9 33 33 8D 16
  252. Send 17 Bytes:16:26:05
  253. FE FE FE 68 94 01 00 00 00 00 68 01 02 55 E9 A6 16
  254. Received 16 Bytes:16:26:06
  255. 68 94 01 00 00 00 00 68 81 04 55 E9 33 33 8E 16
  256. Send 17 Bytes:16:26:06
  257. FE FE FE 68 94 01 00 00 00 00 68 01 02 56 E9 A7 16
  258. Received 16 Bytes:16:26:06
  259. 68 94 01 00 00 00 00 68 81 04 56 E9 33 33 8F 16
  260. Send 17 Bytes:16:26:06
  261. FE FE FE 68 94 01 00 00 00 00 68 01 02 44 E9 95 16
  262. Received 16 Bytes:16:26:07
  263. 68 94 01 00 00 00 00 68 81 04 44 E9 37 39 87 16
  264. Send 17 Bytes:16:26:07
  265. FE FE FE 68 94 01 00 00 00 00 68 01 02 45 E9 96 16
  266. Received 16 Bytes:16:26:07
  267. 68 94 01 00 00 00 00 68 81 04 45 E9 38 39 89 16
  268. Send 17 Bytes:16:26:07
  269. FE FE FE 68 94 01 00 00 00 00 68 01 02 46 E9 97 16
  270. Received 16 Bytes:16:26:07
  271. 68 94 01 00 00 00 00 68 81 04 46 E9 38 39 8A 16
  272. Send 17 Bytes:16:26:07
  273. FE FE FE 68 94 01 00 00 00 00 68 01 02 63 E9 B4 16
  274. Received 17 Bytes:16:26:08
  275. 68 94 01 00 00 00 00 68 81 05 63 E9 33 33 33 D0 16
  276. Send 17 Bytes:16:26:08
  277. FE FE FE 68 94 01 00 00 00 00 68 01 02 73 E9 C4 16
  278. Received 16 Bytes:16:26:08
  279. 68 94 01 00 00 00 00 68 81 04 73 E9 33 33 AC 16
  280. Send 17 Bytes:16:26:08
  281. FE FE FE 68 94 01 00 00 00 00 68 01 02 83 E9 D4 16
  282. Received 16 Bytes:16:26:09
  283. 68 94 01 00 00 00 00 68 81 04 83 E9 33 33 BC 16
  284. Send 17 Bytes:16:26:09
  285. FE FE FE 68 94 01 00 00 00 00 68 01 02 97 E9 E8 16
  286. Received 16 Bytes:16:26:09
  287. 68 94 01 00 00 00 00 68 81 04 97 E9 35 38 D7 16
  288. Send 17 Bytes:16:26:09
  289. FE FE FE 68 96 01 00 00 00 00 68 01 02 54 E9 A7 16
  290. Received 16 Bytes:16:26:09
  291. 68 96 01 00 00 00 00 68 81 04 54 E9 33 33 8F 16
  292. Send 17 Bytes:16:26:09
  293. FE FE FE 68 96 01 00 00 00 00 68 01 02 55 E9 A8 16
  294. Received 16 Bytes:16:26:10
  295. 68 96 01 00 00 00 00 68 81 04 55 E9 33 33 90 16
  296. Send 17 Bytes:16:26:10
  297. FE FE FE 68 96 01 00 00 00 00 68 01 02 56 E9 A9 16
  298. Received 16 Bytes:16:26:10
  299. 68 96 01 00 00 00 00 68 81 04 56 E9 33 33 91 16
  300. Send 17 Bytes:16:26:10
  301. FE FE FE 68 96 01 00 00 00 00 68 01 02 44 E9 97 16
  302. Received 16 Bytes:16:26:11
  303. 68 96 01 00 00 00 00 68 81 04 44 E9 37 39 89 16
  304. Send 17 Bytes:16:26:11
  305. FE FE FE 68 96 01 00 00 00 00 68 01 02 45 E9 98 16
  306. Received 16 Bytes:16:26:11
  307. 68 96 01 00 00 00 00 68 81 04 45 E9 38 39 8B 16
  308. Send 17 Bytes:16:26:11
  309. FE FE FE 68 96 01 00 00 00 00 68 01 02 46 E9 99 16
  310. Received 16 Bytes:16:26:11
  311. 68 96 01 00 00 00 00 68 81 04 46 E9 38 39 8C 16
  312. Send 17 Bytes:16:26:11
  313. FE FE FE 68 96 01 00 00 00 00 68 01 02 63 E9 B6 16
  314. Received 17 Bytes:16:26:12
  315. 68 96 01 00 00 00 00 68 81 05 63 E9 33 33 33 D2 16
  316. Send 17 Bytes:16:26:12
  317. FE FE FE 68 96 01 00 00 00 00 68 01 02 73 E9 C6 16
  318. Received 16 Bytes:16:26:12
  319. 68 96 01 00 00 00 00 68 81 04 73 E9 33 33 AE 16
  320. Send 17 Bytes:16:26:12
  321. FE FE FE 68 96 01 00 00 00 00 68 01 02 83 E9 D6 16
  322. Received 16 Bytes:16:26:12
  323. 68 96 01 00 00 00 00 68 81 04 83 E9 33 33 BE 16
  324. Send 17 Bytes:16:26:12
  325. FE FE FE 68 96 01 00 00 00 00 68 01 02 97 E9 EA 16
  326. Received 16 Bytes:16:26:13
  327. 68 96 01 00 00 00 00 68 81 04 97 E9 35 38 D9 16
  328. Send 17 Bytes:16:26:13
  329. FE FE FE 68 81 01 00 00 00 00 68 01 02 63 E9 A1 16
  330. Send 17 Bytes:16:26:13
  331. FE FE FE 68 81 01 00 00 00 00 68 01 02 43 C3 5B 16
  332. Send 17 Bytes:16:26:14
  333. FE FE FE 68 82 01 00 00 00 00 68 01 02 43 C3 5C 16
  334. Received 18 Bytes:16:26:14
  335. 68 82 01 00 00 00 00 68 81 06 43 C3 75 49 33 33 04 16
  336. Send 17 Bytes:16:26:14
  337. FE FE FE 68 82 01 00 00 00 00 68 01 02 63 E9 A2 16
  338. Received 17 Bytes:16:26:15
  339. 68 82 01 00 00 00 00 68 81 05 63 E9 57 35 33 E4 16
  340. Send 17 Bytes:16:26:15
  341. FE FE FE 68 83 01 00 00 00 00 68 01 02 43 C3 5D 16
  342. Received 18 Bytes:16:26:15
  343. 68 83 01 00 00 00 00 68 81 06 43 C3 4A 48 34 33 DA 16
  344. Send 17 Bytes:16:26:15
  345. FE FE FE 68 83 01 00 00 00 00 68 01 02 63 E9 A3 16
  346. Received 17 Bytes:16:26:16
  347. 68 83 01 00 00 00 00 68 81 05 63 E9 34 34 33 C1 16
  348. Send 17 Bytes:16:26:16
  349. FE FE FE 68 84 01 00 00 00 00 68 01 02 43 C3 5E 16
  350. Received 18 Bytes:16:26:16
  351. 68 84 01 00 00 00 00 68 81 06 43 C3 C3 38 33 33 43 16
  352. Send 17 Bytes:16:26:16
  353. FE FE FE 68 84 01 00 00 00 00 68 01 02 63 E9 A4 16
  354. Received 17 Bytes:16:26:16
  355. 68 84 01 00 00 00 00 68 81 05 63 E9 46 33 33 D3 16
  356. Send 17 Bytes:16:26:16
  357. FE FE FE 68 85 01 00 00 00 00 68 01 02 43 C3 5F 16
  358. Received 18 Bytes:16:26:17
  359. 68 85 01 00 00 00 00 68 81 06 43 C3 3C 57 33 33 DC 16
  360. Send 17 Bytes:16:26:17
  361. FE FE FE 68 85 01 00 00 00 00 68 01 02 63 E9 A5 16
  362. Received 17 Bytes:16:26:17
  363. 68 85 01 00 00 00 00 68 81 05 63 E9 46 33 33 D4 16
  364. Send 17 Bytes:16:26:17
  365. FE FE FE 68 86 01 00 00 00 00 68 01 02 43 C3 60 16
  366. Send 17 Bytes:16:26:18
  367. FE FE FE 68 86 01 00 00 00 00 68 01 02 63 E9 A6 16
  368. Send 17 Bytes:16:26:19
  369. FE FE FE 68 87 01 00 00 00 00 68 01 02 43 C3 61 16
  370. Received 18 Bytes:16:26:19
  371. 68 87 01 00 00 00 00 68 81 06 43 C3 CC 37 33 33 4E 16
  372. Send 17 Bytes:16:26:19
  373. FE FE FE 68 87 01 00 00 00 00 68 01 02 63 E9 A7 16
  374. Received 17 Bytes:16:26:19
  375. 68 87 01 00 00 00 00 68 81 05 63 E9 C7 33 33 57 16
  376. Send 17 Bytes:16:26:19
  377. FE FE FE 68 89 01 00 00 00 00 68 01 02 43 C3 63 16
  378. Received 18 Bytes:16:26:20
  379. 68 89 01 00 00 00 00 68 81 06 43 C3 36 33 33 33 B6 16
  380. Send 17 Bytes:16:26:20
  381. FE FE FE 68 89 01 00 00 00 00 68 01 02 63 E9 A9 16
  382. Received 17 Bytes:16:26:20
  383. 68 89 01 00 00 00 00 68 81 05 63 E9 87 33 33 19 16
  384. Send 17 Bytes:16:26:20
  385. FE FE FE 68 90 01 00 00 00 00 68 01 02 43 C3 6A 16
  386. Received 18 Bytes:16:26:21
  387. 68 90 01 00 00 00 00 68 81 06 43 C3 A4 85 36 33 80 16
  388. Send 17 Bytes:16:26:21
  389. FE FE FE 68 90 01 00 00 00 00 68 01 02 63 E9 B0 16
  390. Received 17 Bytes:16:26:21
  391. 68 90 01 00 00 00 00 68 81 05 63 E9 B6 47 33 63 16
  392. Send 17 Bytes:16:26:21
  393. FE FE FE 68 91 01 00 00 00 00 68 01 02 43 C3 6B 16
  394. Received 18 Bytes:16:26:21
  395. 68 91 01 00 00 00 00 68 81 06 43 C3 A6 45 33 33 40 16
  396. Send 17 Bytes:16:26:21
  397. FE FE FE 68 91 01 00 00 00 00 68 01 02 63 E9 B1 16
  398. Received 17 Bytes:16:26:22
  399. 68 91 01 00 00 00 00 68 81 05 63 E9 33 33 33 CD 16
  400. Send 17 Bytes:16:26:22
  401. FE FE FE 68 94 01 00 00 00 00 68 01 02 54 E9 A5 16
  402. Received 16 Bytes:16:26:22
  403. 68 94 01 00 00 00 00 68 81 04 54 E9 33 33 8D 16
  404. Send 17 Bytes:16:26:22
  405. FE FE FE 68 94 01 00 00 00 00 68 01 02 55 E9 A6 16
  406. Received 16 Bytes:16:26:22
  407. 68 94 01 00 00 00 00 68 81 04 55 E9 33 33 8E 16
  408. Send 17 Bytes:16:26:22
  409. FE FE FE 68 94 01 00 00 00 00 68 01 02 56 E9 A7 16
  410. Received 16 Bytes:16:26:23
  411. 68 94 01 00 00 00 00 68 81 04 56 E9 33 33 8F 16
  412. Send 17 Bytes:16:26:23
  413. FE FE FE 68 94 01 00 00 00 00 68 01 02 44 E9 95 16
  414. Received 16 Bytes:16:26:23
  415. 68 94 01 00 00 00 00 68 81 04 44 E9 37 39 87 16
  416. Send 17 Bytes:16:26:23
  417. FE FE FE 68 94 01 00 00 00 00 68 01 02 45 E9 96 16
  418. Received 16 Bytes:16:26:24
  419. 68 94 01 00 00 00 00 68 81 04 45 E9 38 39 89 16
  420. Send 17 Bytes:16:26:24
  421. FE FE FE 68 94 01 00 00 00 00 68 01 02 46 E9 97 16
  422. Received 16 Bytes:16:26:24
  423. 68 94 01 00 00 00 00 68 81 04 46 E9 37 39 89 16
  424. Send 17 Bytes:16:26:24
  425. FE FE FE 68 94 01 00 00 00 00 68 01 02 63 E9 B4 16
  426. Received 17 Bytes:16:26:24
  427. 68 94 01 00 00 00 00 68 81 05 63 E9 33 33 33 D0 16
  428. Send 17 Bytes:16:26:24
  429. FE FE FE 68 94 01 00 00 00 00 68 01 02 73 E9 C4 16
  430. Received 16 Bytes:16:26:25
  431. 68 94 01 00 00 00 00 68 81 04 73 E9 33 33 AC 16
  432. Send 17 Bytes:16:26:25
  433. FE FE FE 68 94 01 00 00 00 00 68 01 02 83 E9 D4 16
  434. Received 16 Bytes:16:26:25
  435. 68 94 01 00 00 00 00 68 81 04 83 E9 33 33 BC 16
  436. Send 17 Bytes:16:26:25
  437. FE FE FE 68 94 01 00 00 00 00 68 01 02 97 E9 E8 16
  438. Received 16 Bytes:16:26:26
  439. 68 94 01 00 00 00 00 68 81 04 97 E9 35 38 D7 16
  440. Send 17 Bytes:16:26:26
  441. FE FE FE 68 96 01 00 00 00 00 68 01 02 54 E9 A7 16
  442. Received 16 Bytes:16:26:26
  443. 68 96 01 00 00 00 00 68 81 04 54 E9 33 33 8F 16
  444. Send 17 Bytes:16:26:26
  445. FE FE FE 68 96 01 00 00 00 00 68 01 02 55 E9 A8 16
  446. Received 16 Bytes:16:26:26
  447. 68 96 01 00 00 00 00 68 81 04 55 E9 33 33 90 16
  448. Send 17 Bytes:16:26:26
  449. FE FE FE 68 96 01 00 00 00 00 68 01 02 56 E9 A9 16
  450. Received 16 Bytes:16:26:27
  451. 68 96 01 00 00 00 00 68 81 04 56 E9 33 33 91 16
  452. Send 17 Bytes:16:26:27
  453. FE FE FE 68 96 01 00 00 00 00 68 01 02 44 E9 97 16
  454. Received 16 Bytes:16:26:27
  455. 68 96 01 00 00 00 00 68 81 04 44 E9 37 39 89 16
  456. Send 17 Bytes:16:26:27
  457. FE FE FE 68 96 01 00 00 00 00 68 01 02 45 E9 98 16
  458. Received 16 Bytes:16:26:28
  459. 68 96 01 00 00 00 00 68 81 04 45 E9 39 39 8C 16
  460. Send 17 Bytes:16:26:28
  461. FE FE FE 68 96 01 00 00 00 00 68 01 02 46 E9 99 16
  462. Received 16 Bytes:16:26:28
  463. 68 96 01 00 00 00 00 68 81 04 46 E9 39 39 8D 16
  464. Send 17 Bytes:16:26:28
  465. FE FE FE 68 96 01 00 00 00 00 68 01 02 63 E9 B6 16
  466. Received 17 Bytes:16:26:28
  467. 68 96 01 00 00 00 00 68 81 05 63 E9 33 33 33 D2 16
  468. Send 17 Bytes:16:26:28
  469. FE FE FE 68 96 01 00 00 00 00 68 01 02 73 E9 C6 16
  470. Received 16 Bytes:16:26:29
  471. 68 96 01 00 00 00 00 68 81 04 73 E9 33 33 AE 16
  472. Send 17 Bytes:16:26:29
  473. FE FE FE 68 96 01 00 00 00 00 68 01 02 83 E9 D6 16
  474. Received 16 Bytes:16:26:29
  475. 68 96 01 00 00 00 00 68 81 04 83 E9 33 33 BE 16
  476. Send 17 Bytes:16:26:29
  477. FE FE FE 68 96 01 00 00 00 00 68 01 02 97 E9 EA 16
  478. Received 16 Bytes:16:26:29
  479. 68 96 01 00 00 00 00 68 81 04 97 E9 35 38 D9 16
  480. Send 17 Bytes:16:26:29
  481. FE FE FE 68 81 01 00 00 00 00 68 01 02 63 E9 A1 16
  482. Send 17 Bytes:16:26:30
  483. FE FE FE 68 81 01 00 00 00 00 68 01 02 43 C3 5B 16
  484. Send 17 Bytes:16:26:31
  485. FE FE FE 68 82 01 00 00 00 00 68 01 02 43 C3 5C 16
  486. Received 18 Bytes:16:26:31
  487. 68 82 01 00 00 00 00 68 81 06 43 C3 75 49 33 33 04 16
  488. Send 17 Bytes:16:26:31
  489. FE FE FE 68 82 01 00 00 00 00 68 01 02 63 E9 A2 16
  490. Received 17 Bytes:16:26:31
  491. 68 82 01 00 00 00 00 68 81 05 63 E9 58 35 33 E5 16
  492. Send 17 Bytes:16:26:32
  493. FE FE FE 68 83 01 00 00 00 00 68 01 02 43 C3 5D 16
  494. Received 18 Bytes:16:26:32
  495. 68 83 01 00 00 00 00 68 81 06 43 C3 4A 48 34 33 DA 16
  496. Send 17 Bytes:16:26:32
  497. FE FE FE 68 83 01 00 00 00 00 68 01 02 63 E9 A3 16
  498. Received 17 Bytes:16:26:32
  499. 68 83 01 00 00 00 00 68 81 05 63 E9 35 34 33 C2 16
  500. Send 17 Bytes:16:26:32
  501. FE FE FE 68 84 01 00 00 00 00 68 01 02 43 C3 5E 16
  502. Received 18 Bytes:16:26:33
  503. 68 84 01 00 00 00 00 68 81 06 43 C3 C3 38 33 33 43 16
  504. Send 17 Bytes:16:26:33
  505. FE FE FE 68 84 01 00 00 00 00 68 01 02 63 E9 A4 16
  506. Received 17 Bytes:16:26:33
  507. 68 84 01 00 00 00 00 68 81 05 63 E9 46 33 33 D3 16
  508. Send 17 Bytes:16:26:33
  509. FE FE FE 68 85 01 00 00 00 00 68 01 02 43 C3 5F 16
  510. Received 18 Bytes:16:26:33
  511. 68 85 01 00 00 00 00 68 81 06 43 C3 3C 57 33 33 DC 16
  512. Send 17 Bytes:16:26:33
  513. FE FE FE 68 85 01 00 00 00 00 68 01 02 63 E9 A5 16
  514. Received 17 Bytes:16:26:34
  515. 68 85 01 00 00 00 00 68 81 05 63 E9 46 33 33 D4 16
  516. Send 17 Bytes:16:26:34
  517. FE FE FE 68 86 01 00 00 00 00 68 01 02 43 C3 60 16
  518. Send 17 Bytes:16:26:34
  519. FE FE FE 68 86 01 00 00 00 00 68 01 02 63 E9 A6 16
  520. Send 17 Bytes:16:26:35
  521. FE FE FE 68 87 01 00 00 00 00 68 01 02 43 C3 61 16
  522. Received 18 Bytes:16:26:35
  523. 68 87 01 00 00 00 00 68 81 06 43 C3 CC 37 33 33 4E 16
  524. Send 17 Bytes:16:26:35
  525. FE FE FE 68 87 01 00 00 00 00 68 01 02 63 E9 A7 16
  526. Received 17 Bytes:16:26:36
  527. 68 87 01 00 00 00 00 68 81 05 63 E9 CB 33 33 5B 16
  528. Send 17 Bytes:16:26:36
  529. FE FE FE 68 89 01 00 00 00 00 68 01 02 43 C3 63 16
  530. Received 18 Bytes:16:26:36
  531. 68 89 01 00 00 00 00 68 81 06 43 C3 36 33 33 33 B6 16
  532. Send 17 Bytes:16:26:36
  533. FE FE FE 68 89 01 00 00 00 00 68 01 02 63 E9 A9 16
  534. Received 17 Bytes:16:26:37
  535. 68 89 01 00 00 00 00 68 81 05 63 E9 7A 34 33 0D 16
  536. Send 17 Bytes:16:26:37
  537. FE FE FE 68 90 01 00 00 00 00 68 01 02 43 C3 6A 16
  538. Received 18 Bytes:16:26:37
  539. 68 90 01 00 00 00 00 68 81 06 43 C3 A5 85 36 33 81 16
  540. Send 17 Bytes:16:26:37
  541. FE FE FE 68 90 01 00 00 00 00 68 01 02 63 E9 B0 16

复制代码
当然不用我们自己解啦,扔进内存(实时数据库RTDB)后,DCS问,我们答就行了,哈哈。
回复 支持 反对

使用道具 举报

发表于 2009-12-10 09:12:37 | 显示全部楼层

RE: 发一个电表业的抄表程序(Dlt645规约)--更新版

发一个测线工具,检测地址和物理层是否通的,哇哈哈~

核心函数:

  1. Private Sub QueryAddr(Addr As Long)
  2.   Dim a(0 To 16) As Byte
  3.   Dim sAddr As String
  4.   Dim s(1 To 6) As String
  5.   Dim i As Byte
  6.   Dim t As Integer
  7.   
  8.   
  9.   a(0) = &HFE
  10.   a(1) = &HFE
  11.   a(2) = &HFE
  12.   a(3) = &H68 '帧起始符
  13.   
  14.   sAddr = Right$(String(11, "0") & CStr(Addr), 12)
  15.   
  16.   For i = 1 To 6
  17.     s(i) = Mid$(sAddr, 13 - i * 2, 2)
  18.     a(i + 3) = Val("&H" & s(i))
  19.   Next i
  20.   
  21.   a(10) = &H68 '帧起始符
  22.   a(11) = &H1 '控制码
  23.   a(12) = &H2 '数据长度
  24.   a(13) = &H97 '数据1
  25.   a(14) = &HE9 '数据2
  26.   
  27.   t = 0
  28.   For i = 3 To 14
  29.     t = t + a(i)
  30.   Next i
  31.   
  32.   a(15) = t Mod 256 '校验和
  33.   a(16) = &H16 '结束符
  34.   
  35.   MSComm1.Output = a
  36. End Sub

复制代码

102测线通工具.rar

8.41 KB, 下载次数: 491

回复 支持 反对

使用道具 举报

发表于 2009-12-10 12:23:52 | 显示全部楼层
不好意思,上面发的那个工具是在103协议测线工具的基础上改的,对接收的数据包还没处理,我改好后再把新版发上来。
回复 支持 反对

使用道具 举报

发表于 2009-12-10 15:34:18 | 显示全部楼层
学习,多谢。
回复 支持 反对

使用道具 举报

发表于 2009-12-13 16:38:47 | 显示全部楼层
怎么不能下载呀,权限不够,要几级才能下载呀?我想要这个程序呀,发我一份吧43908752?QQ。COM
回复 支持 反对

使用道具 举报

发表于 2009-12-22 08:33:18 | 显示全部楼层
回帖看看自己的权限.在个人中心里面没找到.呵呵.
回复 支持 反对

使用道具 举报

发表于 2009-12-22 16:31:24 | 显示全部楼层
前来学习
回复 支持 反对

使用道具 举报

发表于 2009-12-22 17:03:57 | 显示全部楼层
re 怎么提升阅读权限?
回复 支持 反对

使用道具 举报

发表于 2009-12-28 15:52:12 | 显示全部楼层
回帖,提升权限
回复 支持 反对

使用道具 举报

发表于 2010-1-2 21:16:03 | 显示全部楼层
怎么下载不了,作者的QQ也联系不了?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

文字版|手机版|小黑屋|VBGood  

GMT+8, 2021-11-28 07:47

VB爱好者乐园(VBGood)
快速回复 返回顶部 返回列表