当前位置:网站首页>[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.

边栏推荐
- 研发过程中的文档管理与工具
- 【Yugong Series】July 2022 Go Teaching Course 020-Array of Go Containers
- tensorflow2.0 cnn(layerwise)
- 阿里三面:MQ 消息丢失、重复、积压问题,如何解决?
- MySQL multi-table union query
- 你辛辛苦苦写的文章可能不是你的原创
- 复制延迟案例(3)-单调读
- 【7.29】Code Source - 【Arrangement】【Stone Game II】【Cow and Snacks】【Minimum Number of Spawns】【Sequence】
- 认识异常 (看完这篇你就懂了)
- 研发过程中的文档管理与工具
猜你喜欢

i.MX6ULL驱动开发 | 33 - NXP原厂网络设备驱动浅读(LAN8720 PHY)

你辛辛苦苦写的文章可能不是你的原创

Automated testing - web automation - first acquaintance with selenium

Qt实战案例(54)——利用QPixmap设计图片透明度

How to switch remote server in gerrit

Graham‘s Scan法求解凸包问题

The 2nd China PWA Developer Day

复杂高维医学数据挖掘与疾病风险分类研究

组合学笔记(六)局部有限偏序集的关联代数,Möbius反演公式

认识异常 (看完这篇你就懂了)
随机推荐
Foreign media right, apple on May be true in inventory
Character pointer assignment [easy to understand]
[pytorch] pytorch automatic derivation, Tensor and Autograd
C language "the third is" upgrade (mode selection + AI chess)
SHELL内外置命令
智能垃圾桶(九)——震动传感器(树莓派pico实现)
GP 6总体架构学习笔记
Handling write conflicts under multi-master replication (4) - multi-master replication topology
JS基础小练习
jeecg主从数据库读写分离配置「建议收藏」
第05章 存储引擎【1.MySQL架构篇】【MySQL高级】
Golang——从入门到放弃
adb shell error error: device unauthorized
牛客 HJ16 购物单
Premiere Pro 2022 for (pr 2022)v22.5.0
[TypeScript]OOP
Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)
多主复制下处理写冲突(3)-收敛至一致的状态及自定义冲突解决逻辑
使用互相关进行音频对齐
多主复制下处理写冲突(1)-同步与异步冲突检测及避免冲突