当前位置:网站首页>[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.
边栏推荐
- 智能垃圾桶(八)——红外对管传感器(树莓派pico)
- form 表单提交后,使页面不跳转[通俗易懂]
- C language "the third is" upgrade (mode selection + AI chess)
- Graham's Scan method for solving convex hull problems
- tensorflow2.0 cnn(layerwise)
- 【Yugong Series】July 2022 Go Teaching Course 022-Dictionary of Go Containers
- Mariabackup实现Mariadb 10.3的增量数据备份
- After the form is submitted, the page does not jump [easy to understand]
- 百度网盘网页版加速播放(有可用的网站吗)
- 动态规划之线性dp(下)
猜你喜欢
adb shell error error: device unauthorized
.NET 20th Anniversary Interview - Zhang Shanyou: How .NET technology empowers and changes the world
AcWing 1282. 搜索关键词 题解((AC自动机)Trie+KMP)+bfs)
上传图片-微信小程序(那些年的坑记录2022.4)
2022年整理LeetCode最新刷题攻略分享(附中文详细题解)
[TypeScript] In-depth study of TypeScript type operations
C程序是如何跑起来的01 —— 普通可执行文件的构成
深度学习机器学习理论及应用实战-必备知识点整理分享
i.MX6ULL驱动开发 | 33 - NXP原厂网络设备驱动浅读(LAN8720 PHY)
The new BMW 3 Series is on the market, with safety and comfort
随机推荐
2.索引及调优篇【mysql高级】
【7.28】代码源 - 【Fence Painting】【合适数对(数据加强版)】
Baidu cloud web speed playback (is there any website available)
Website vulnerability repair service provider's analysis of unauthorized vulnerability
【7.29】Code Source - 【Arrangement】【Stone Game II】【Cow and Snacks】【Minimum Number of Spawns】【Sequence】
字符串反转的实现方法总结「建议收藏」
Anaconda如何顺利安装CV2
Implementing distributed locks based on Redis (SETNX), case: Solving oversold orders under high concurrency
并发性,时间和相对性
【网络通信三】研华网关Modbus服务设置
Automated testing - web automation - first acquaintance with selenium
仿生毛毛虫机器人源码
Premiere Pro 2022 for (pr 2022)v22.5.0
2020 WeChat applet decompilation tutorial (can applet decompile source code be used)
Summary of the implementation method of string inversion "recommended collection"
关于柱状图的经典画法总结
The new BMW 3 Series is on the market, with safety and comfort
【愚公系列】2022年07月 Go教学课程 020-Go容器之数组
Qt practical cases (54) - using transparency QPixmap design pictures
多主复制下处理写冲突(3)-收敛至一致的状态及自定义冲突解决逻辑