x64下封装modbus_tcp库,测试可用!!!附带modbus_tk脚本用于测试
1.该测试模块用于测试上位机使用modbus-tcp协议,对PLC寄存器读写测试; 2.x64下封装modbus协议栈,为modbus协议添加了多线程使用安全; 3.modbus类使用单例模式,CommunicationWithPLC通过静态方法获得modbus类实例: CommunicationWithPLC::CommunicationWithPLC() { mb = Modbus::getInstance(); } 4.单例模式的作用是无论上位机中开多少线程,都表现一个端口与plc通讯。 5.README.py用modbus-tk仿真plc行为。
下载地址
用户评论