Modbus_Polling_Stops_Suddenly


polilies

Recommended Posts

Hi DF community,

i have an issue about polling modbus.

i'm tring to poll an remote register via modbus TCP. when i open my project in DF it gives me socket error and timeout alerts. After a

while it starts

suddenly and itself. i've to give you a detail about this situation cause it starts with an income. Something like this :

" Rx (17:05:19.175): \x00\x00\x00\xBA\xDB\xAD "

Did you ever see something like this.?

And sometimes it doesn't start polling. Firstly i closed my windows firewall. Then it works . There was no socket error or timeout problem

but it showed again. Now the situation is like what i told head of this post. post-6691-0-72842700-1363796779_thumb.jppost-6691-0-81225700-1363796796_thumb.jppost-6691-0-35630100-1363796813_thumb.jp

Link to comment
Share on other sites

DAQFactory will continually try and establish the socket, so if it fails at the beginning and whatever caused it to fail went away, it will eventually properly connect and communicate. I believe the retry time is typically 45-60 seconds.

As for why it won't communicate initially, first, unless your firewall is set to block outgoing packets (rare), it shouldn't matter. Firewalls are generally setup to block unsolicited incoming packets, not responses to outgoing packets, otherwise you wouldn't be able to browse the web or check email.

My guess is one of three things:

Many devices only accept one socket connection at a time, as such:

1) if you quit DF and restart and it does this, its possible the first copy of DF hasn't finished shutting down and the socket is still open to the device. This would prevent the new copy from connecting until the old one quit. The quickest way to check is to reboot and see if it does this right away.

2) you have some other software connecting to the device, either on the same PC or another and your device accepts only one connection at a time.

3) you have an IP address conflict on your device which is causing it to lose its IP address and then something happens and the device reclaims it. I've seen this even with PCs. One PC will have the IP, another will come online with the same IP and pop the other one off the network. The other one will hit some sort of timeout in its software and try and grab the IP, popping the other PC off, and back and forth. Of course it might not cycle like this. Some operating systems basically require you to reset networking to reclaim the IP after a conflict.

Link to comment
Share on other sites

you're right Guru! your first guess is true but more then that. When i close DF at the end of "closing" job DF sends a socket termination packet. So communucation

ending properly. But then when i start it again the remote end device doesn't response the socket establishment request. So cause fo that DF gives many socket

error. i recommend my friends in here, it would be better if they use a program to see network movements like "windows's tcpview".

http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

Link to comment
Share on other sites

Thanks for the link. Looks like an interesting program. Wireshark is another good one that will show you actual traffic, but gives a bit more information and can be overwhelming if you don't filter it down. You'd be surprised how many network transmissions come out of your computer when its just sitting there!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.