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

边栏推荐
- Smart Trash Can (8) - Infrared Tube Sensor (Raspberry Pi pico)
- 6. 使用 Postman 工具高效管理和测试 SAP ABAP OData 服务
- 无主复制系统(1)-节点故障时写DB
- Golang 小数操作之判断几位小数点与四舍五入
- 利用PHP开发具有注册、登陆、文件上传、发布动态功能的网站
- After Effects 教程,如何在 After Effects 中调整过度曝光的快照?
- 宁波大学NBU IT项目管理期末考试知识点整理
- C language - function
- Implementing distributed locks based on Redis (SETNX), case: Solving oversold orders under high concurrency
- MySQL multi-table union query
猜你喜欢

Dialogue with Zhuang Biaowei: The first lesson of open source

Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?

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

智能垃圾桶(九)——震动传感器(树莓派pico实现)

动态规划(一)

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

二分查找的细节坑

Unity 之 图集属性详解和代码示例 -- 拓展一键自动打包图集工具

i.MX6ULL驱动开发 | 33 - NXP原厂网络设备驱动浅读(LAN8720 PHY)
How Redis handles concurrent access
随机推荐
Design and Implementation of Compiler Based on C Language
【TypeScript】深入学习TypeScript类型操作
Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?
牛客网刷题(二)
Flutter gets the height of the status bar statusbar
百度网盘网页版加速播放(有可用的网站吗)
【C语言】LeetCode27.移除元素
【源码解析】BeanFactory和FactoryBean
Intelligent bin (9) - vibration sensor (raspberries pie pico implementation)
AcWing 1282. 搜索关键词 题解((AC自动机)Trie+KMP)+bfs)
6-22漏洞利用-postgresql数据库密码破解
牛客 HJ16 购物单
How to install CV2 smoothly in Anaconda
无主复制系统(1)-节点故障时写DB
MySQL多表联合查询
Replication Latency Case (1) - Eventual Consistency
多主复制的适用场景(1)-多IDC
C语言-函数
基于C语言的编译器设计与实现
How to switch remote server in gerrit