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

边栏推荐
- 牛客 HJ19 简单错误记录
- LevelSequence源码分析
- Implementing DDD based on ABP
- Huawei's top engineers lasted nine years "anecdotal stories network protocol" PDF document summary, is too strong
- [pytorch] pytorch automatic derivation, Tensor and Autograd
- T - sne + data visualization parts of the network parameters
- Summary of the implementation method of string inversion "recommended collection"
- 无主复制系统(3)-Quorum一致性的局限性
- Applicable scenario of multi-master replication (2) - client and collaborative editing that require offline operation
- jeecg主从数据库读写分离配置「建议收藏」
猜你喜欢

智能垃圾桶(八)——红外对管传感器(树莓派pico)

宁波大学NBU IT项目管理期末考试知识点整理

6-22 Vulnerability exploit - postgresql database password cracking

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

.NET 20th Anniversary Interview - Zhang Shanyou: How .NET technology empowers and changes the world

Graham‘s Scan法求解凸包问题

EF Core 2.2中将ORM框架生成的SQL语句输出到控制台
![[TypeScript] In-depth study of TypeScript type operations](/img/d9/ee240ccba72e8d3114ee5c52ed0c8f.png)
[TypeScript] In-depth study of TypeScript type operations

C language "the third is" upgrade (mode selection + AI chess)
![[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development](/img/f6/311d5a4c70993df6291250d2025d3f.jpg)
[Meetup Preview] OpenMLDB+OneFlow: Link feature engineering to model training to accelerate machine learning model development
随机推荐
上传图片-微信小程序(那些年的坑记录2022.4)
MySQL常用语句整理
使用互相关进行音频对齐
Website vulnerability repair service provider's analysis of unauthorized vulnerability
tensorflow2.0 cnn(layerwise)
Premiere Pro 2022 for (pr 2022)v22.5.0
GP 6 overall architecture study notes
基于Redis(SETNX)实现分布式锁,案例:解决高并发下的订单超卖,秒杀
Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?
MySQL多表联合查询
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 失败
MySQL multi-table union query
外媒所言非虚,苹果降价或许是真的在清库存
TypeError: unhashable type: ‘list‘
联邦学习:联邦场景下的多源知识图谱嵌入
入职一个月反思
字符指针赋值[通俗易懂]
ML.NET related resources
仿生毛毛虫机器人源码
Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)