当前位置:网站首页>[Network Communication 3] Advantech Gateway Modbus Service Settings
[Network Communication 3] Advantech Gateway Modbus Service Settings
2022-07-31 16:40:00 【Generous】
Research China gatewayModbus服务设置
1、前言
Recently China gateway to use researchModbus的通信试验,Before attempting to studyModbusCommunication libraries to communicate with each other.
Attempt to exchange the communication,熟悉Advantech EdgeLink StudioThe use of purpose.
关键字如下所示:
- Advantech EdgeLink Studio
- Modbus Tcp
- Socket 阻塞和非阻塞
- IPv4和IPv6区别
Use the related software and tools: - Advanced IP Scanner
- Modbus Poll
- Advantech EdgeLink Studio
2、Advantech EdgeLink Studio使用流程
2.1、总体使用流程
2.2、Important process screenshots



3、试验流程
3.1、使用Modbus Poll进行连接



3.2、libmodbusSince the gateway to write program to connect research China process
# Copy the cloning project,运行脚本生成modbus_poll工具
# clear all exec
if [ ! -d "./bin" ]; then
mkdir bin
else
cd bin
rm -rf ./*
cd ..
fi
if [ ! -d "./build" ]; then
mkdir build
fi
cd build
# build client
rm -rf *
cmake -DCMAKE_BUILD_TYPE=Release -DClient=ON ..
make
cd release
cp modbus_poll ../../bin
cd ../../
# 使用工具进行modbus通信
if [ -f bin/modbus_poll ]; then
cd bin/
# ./modbus_poll --debug -mtcp -t0x01 -r2 -p502 10.0.1.28
./modbus_poll --debug -mtcp -t0x03 -r1 -p502 10.0.1.59 -c4
cd ../
else
echo "不存在相应的modbus_poll工具"
fi
3.3、Since the programming communication test results
Connecting to 10.0.1.59:502
[00][01][00][00][00][06][01][03][00][01][00][04]
Waiting for a confirmation...
<00><01><00><00><00><0B><01><03><08><00><D6><00><33><00><42><00><00>
SUCCESS: read 4 of elements:
Data: 0x00d6 0x0033 0x0042 0x0000
结果说明:
- "./modbus_poll --debug -mtcp -t0x03 -r1 -p502 10.0.1.59 -c4"命令表示从modbus的1地址开始,读取4个寄存器值,At the same time to show.One of the research China gatewayip是10.0.1.59,modbus端口号为502.
- These results and inModbus PollShow in the tool is consistent with the,Communication is success.
4、遇到的问题及解决方法
4.1、问题1
- 现象:自写程序modbus_pollWith the research China gatewayconnect成功,显示"Connect time out"的报错;但是Modbus PollTools can communicate.
- 原因:No China gateway in development"系统设置/网络和Internet/网络设置"中Set up the correspondingIPv4属性
- 解决方法:Set up the correspondingIPv4属性信息,Can be as shown in the following Settings.

边栏推荐
- [TypeScript]OOP
- 研发过程中的文档管理与工具
- 小程序:matlab解微分方程「建议收藏」
- Mariabackup实现Mariadb 10.3的增量数据备份
- Premiere Pro 2022 for (pr 2022)v22.5.0
- 【luogu P8326】Fliper(图论)(构造)(欧拉回路)
- 【愚公系列】2022年07月 Go教学课程 022-Go容器之字典
- 多主复制的适用场景(1)-多IDC
- Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)
- TypeError: unhashable type: ‘list‘
猜你喜欢
随机推荐
牛客 HJ20 密码验证合格程序
使用 Postman 工具高效管理和测试 SAP ABAP OData 服务的试读版
多数据中心操作和检测并发写入
Website vulnerability repair service provider's analysis of unauthorized vulnerability
多主复制的适用场景(2)-需离线操作的客户端和协作编辑
【C语言】LeetCode27.移除元素
EF Core 2.2中将ORM框架生成的SQL语句输出到控制台
flutter设置statusbar状态栏的背景颜色和 APP(AppBar)内部颜色一致方法。
tooltips使用教程(鼠标悬停时显示提示)
Replication Latency Case (3) - Monotonic Read
Masterless Replication System (3)-Limitations of Quorum Consistency
ansible study notes 02
arm按键控制led灯闪烁(嵌入式按键实验报告)
Mariabackup implements incremental data backup for Mariadb 10.3
LevelSequence源码分析
多主复制下处理写冲突(4)-多主复制拓扑
jeecg主从数据库读写分离配置「建议收藏」
动态规划(一)
Applicable scenario of multi-master replication (2) - client and collaborative editing that require offline operation
MySQL multi-table union query








