完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,我使用PIC18F67 J60控制器,尝试实现Modbus TCP/IP。为此,我使用TCP/IP Lite堆栈。该控制器将作为一个远程服务器,并将具有一些DI,其状态将被发送到PC,将充当客户端。最初,我实现了堆栈,并测试了演示服务器和Client。C文件,并能够成功地与TeCPPIPdemo.JAR文件建立通信。NT的Modbus TCP协议,我对TCPyServelDimo.c文件做了微小的更改,而不是回送所接收的任何内容,控制器将返回的响应发送给匹配的Modbus查询。我需要从微控制器查询每200到300毫秒的数据。从最初的响应中,我没有得到来自控制器的响应。只有当我在PC端增加轮询时间(到3秒以上)时,我才能接收到每个查询的连续响应。但是即使在这种情况下,PC在控制器响应之前多次重试(这是使用WiReSARK进行的)。我想知道我的需求是否可以使用这个控制器和这个堆栈来执行,如果需要的话,我需要做什么来加快PIC方面的TCP处理。样例代码,如果需要,WiRESHARK PICS。我现在使用PIC-OLIMEX开发板测试这个。
以上来自于百度翻译 以下为原文 Hi, I'm using PIC18F67J60 controller and trying to implement Modbus TCP/IP. I am using the TCP/IP Lite Stack for this purpose. The controller will act as a Remote Server and will have some DI whose status will be sent to a PC that will act as the Client. Initially I implemented the Stack and tested the demo server and client .c files and was able to successfully establish communication with the TCPIP_Demo.jar file. To implement the Modbus TCP protocol, I made minor changes to the tcp_server_demo.c file and instead of echoing back whatever is received, the controller sends back response to a matching Modbus query. I need to query the data from the microcontroller every 200 - 300 ms. When I poll at this speed from PC, apart from an initial response I get no more responses from the controller. Only when I increase the polling time on PC side (to above 3 seconds) I'm able to receive continuous response for each query. But even in that case, the PC retries multiple times before the controller responds (this was observed using Wireshark). I would like to know if my requirement can be executed using this controller and this stack, and if so what I need to do to speed up the TCP handling on the PIC side. I can provide the sample code, wireshark pics if required. I'm currently testing this using the PIC-OLIMEX development board. |
|
相关推荐
1个回答
|
|
嗨,阿文迪已经在PIC18F67 J60上工作了。如果您正在使用MPLABX开发您的项目,您可以尝试使用我们的最新TCPIP库JAR来重新生成TCP代码:HTTPS://MICCHIP.BOX.COM/S/VI734 CHXBVQM64 O2GJC8JF4SJXDOD6MKSK,请阅读发行说明:HTTPS://MICCHIP.BOX.COM/S/KUZW7A9U2YCY9IQD5ZV6GHJJ8BBN4ILAIF,如果您还有山姆E问题,你可以分享我的项目和WiRESHARK跟踪。
以上来自于百度翻译 以下为原文 Hi ArvindP I've been working on PIC18F67J60. If you are using MPLABx to develop your project, you can try to use our latest tcpip library jar to regenerate your tcp code: https://microchip.box.com/s/vi734chxbvqm64o2gjc8jf4sjxdo6msk Please read the release note: https://microchip.box.com/s/kuzw7a9e2ucy9iqd5zv6ghjj8bbn4ila If you still have the same issue, you can share me your project and wireshark trace. |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2036 浏览 8 评论
1956 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2264 浏览 5 评论
787浏览 1评论
678浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
604浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-27 19:11 , Processed in 1.191909 second(s), Total 46, Slave 40 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号