Modbus资料

1、

 1.1、百度搜"modbus通讯协议"

  (1)、简单粗暴的理解 MODBUS通信协议.html(https://baijiahao.baidu.com/s?id=1586302823192131962&wfr=spider&for=pc

  (2)、10分钟掌握modbus485通讯协议一招区分dtu rtu_百度经验.html(https://jingyan.baidu.com/article/ff42efa9dda5fcc19e220292.html

  (3)、Modbus通讯协议原来是这么回事!看完秒懂了.html(https://www.sohu.com/a/230628953_315598

 1.2、百度搜“modbus4j”

  (1)、modbus4j,rtu,ascii,tcp_ip传输模式 - 狂野的河 - CSDN博客.html(https://blog.csdn.net/u013150916/article/details/78065479?locationNum=9&fps=1

  (2)、modbus tcp通讯 modbus4j java实现 - 秀秀 - CSDN博客.html(https://blog.csdn.net/qq_35638499/article/details/81300574

  (3)、modbus4j初次使用总结 - 简书.html(https://www.jianshu.com/p/32575c9c4e54

2、

3、

4、

5、下载的资料:

  5.1、modbus4j-master.zip(https://github.com/infiniteautomation/modbus4j)  [ modbus4j-2.0.2.jar ]

  5.2、seroUtils.jar(https://sourceforge.net/projects/modbus4j/)  [ SerialParameters ]

6、例子:

  modbus4j串口通讯 - u010655348的博客 - CSDN博客.html(https://blog.csdn.net/u010655348/article/details/52665228

 6.1、报错:一直 报错 找不到类 SerialPortOutputStream

  搞半天 原来是 seroUtils.jar 和 modbus4J.jar 不匹配,后来 我发现 https://sourceforge.net/projects/modbus4j/files/modbus4j/1.1/ 里面有一起的下载,于是下载了 这里的文件,没有 这个错误报出来了...

  ZC:这里下载的是 1.1 的版本的,网页的上级目录中可以看到 还有 1.02和1.01版本的可供下载

 6.2、seroUtils.jar 的源码

  我是在这里:mlohbihler _ sero-utils _ source _ — Bitbucket.html(https://bitbucket.org/mlohbihler/sero-utils/src/0b14066efbbc03b745139f1b66abcd927ee88455/?at=default)下载的源码(mlohbihler-sero-utils-0b14066efbbc.zip)

   ZC:直接点 “Check out in Sourcetree”没反应,估计要装什么 管理源码的软件,就没在这里下载。找到有 "Downloads"的标签,里面下载到了 “mlohbihler-sero-utils-0b14066efbbc.zip”

   ZC:但是 不知道 这里的源码 是不是 和 6.1 中下载的 seroUtils.jar是同一个版本... 但是 至少 Eclipse中 源码关联过去是OK的...

7、例子:(百度搜"modbus4j rtu")

 7.1、modbus4j,rtu,ascii,tcp_ip传输模式 - 狂野的河 - CSDN博客.html(https://blog.csdn.net/u013150916/article/details/78065479?locationNum=9&fps=1#commentBox

  ZC:貌似 6中 用的 匹配的 modbus4j.jar和seroUtils.jar,在这个例子中不适用

    

 7.2、查半天,查到 一些东西:

  (1)、Mango Automation _ SCADA Software _ HMI Software.html(https://store.infiniteautomation.com/module/modbus/1.5.4;jsessionid=17BE7635803E3C1611444246E1A3E249

  (2)、Mango Automation _ SCADA Software _ HMI Software.html(https://store.infiniteautomation.com/core

  (3)、Mango Automation _ SCADA Software _ HMI Software.html(https://store.infiniteautomation.com/module/modbus

  (4)、Mango Automation _ SCADA Software _ HMI Software.html(https://store.infiniteautomation.com/modules

  ZC:没找到 独立的 seroUtils的节点...

 7.3、排错

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
需要:commons-logging-1.1.1.jar

Exception in thread "main" java.lang.NoClassDefFoundError: jssc/SerialPortException
需要:jssc-2.8.0.jar

Exception in thread "main" java.lang.NoClassDefFoundError: com/serotonin/timer/TimeSource
需要:serotonin-timer-2.0.7.jar

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/ArrayUtils
需要:commons-lang3-3.0.jar

  ZC:这里的 jar 都是从 "...Mango Automationm2m2-modbus-1.5.4lib"中得到的

8、资料:

  8.1、modbus tcp通讯modbus4j使用说明-java编程-Leftso(左搜).html(http://www.leftso.com/blog/83.html

  8.2、modbus tcp 通讯modbus-master-tcp Java使用说明-Leftso(左搜).html(http://www.leftso.com/blog/310.html

9、

10、

11、

12、

13、

14、

15、

原文地址:https://www.cnblogs.com/codeskilla/p/9998416.html