Modbus stops responding after a while

Started by stephendv, September 23, 2012, 02:45:30 AM

Previous topic - Next topic

stephendv

Hi all,

I have a datalogger running which retrieves some values over modbus every 10 seconds.  After leaving it running for a day or two, the classic stops responding to modbus requests.  Same with the localapp, it responds with "Busy" when trying to connect to the classic.
I can still make TCP connections to port 502, it just doesn't respond to modbus requests.  Have to turn the controller off and on again to get it back up and running.

Any ideas?


Halfcrazy

I have forwarded this to Andrew our Guru Engineer on the App and Networking the Classic. This is something we have seen on a few rare occasions but only to certain networks. That is to say if I was to take your Classic here it would be fine and if you took mine it would do this. The Problem is for sure in the Classic but it has been a little stubborn to chase down do to the lack of it showing in engineering.

Ryan
Changing the way wind turbines operate one smoke filled box at a time

boB


Can you try connecting the ethernet directly up to your computer/laptop/pc instead of
a router and see if this still happens ??    Or, is this already connected that way ?

This may be important information.

boB


K7IQ 🌛  He/She/Me

stephendv

Yep it's currently connected to an ethernet switch.  I'll connect it directly to the logger and leave it running for the day tomorrow and see what happens.

rosebudd

Sticky problem, but I am sure the answer is there....

I use Modpoll and bash scripting to pull in the data via a router (TCP). It has been running continuous for about three weeks. The crontab runs once a minute and gets values from three registers. The app. is off.

I did have to adjust the time on the Classic (up to 2012) this week, not sure why? Modpoll did not care, just kept on pumping out data.

hang in there,
steve

http://sunenr.homedns.org/cgi-bin/modclsc150.pl
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

boB

Quote from: rosebudd on September 23, 2012, 04:22:21 PM
Sticky problem, but I am sure the answer is there....

I use Modpoll and bash scripting to pull in the data via a router (TCP). It has been running continuous for about three weeks. The crontab runs once a minute and gets values from three registers. The app. is off.

I did have to adjust the time on the Classic (up to 2012) this week, not sure why? Modpoll did not care, just kept on pumping out data.

hang in there,
steve

http://sunenr.homedns.org/cgi-bin/modclsc150.pl


awesome page you have there !!

Yes, I'm sure that  the answer is just a few bytes away !

boB
K7IQ 🌛  He/She/Me

rosebudd

....teach me not to boast..

The script stopped this morning, not sure why. Bash said "timed out" ?

I shut down the little pc, then the Classic and pc together for a minute or so. Rebooted both and all is back on....I did wiggle the router cables...(?) Could have been a connection...check the simple things first.

back in the saddle, all running again,

fog lifted in eastern Canada, sun is back on,
steve
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

boB

Quote from: rosebudd on September 24, 2012, 09:45:09 AM
....teach me not to boast..

The script stopped this morning, not sure why. Bash said "timed out" ?

I shut down the little pc, then the Classic and pc together for a minute or so. Rebooted both and all is back on....I did wiggle the router cables...(?) Could have been a connection...check the simple things first.

back in the saddle, all running again,

fog lifted in eastern Canada, sun is back on,
steve

OK, just keep watching it and report back weird things.

No fog here...  Just smoke from forest fires.

Other than that in eastern Washington, nice day here in Arlington.

boB


K7IQ 🌛  He/She/Me

rosebudd

boB, stephendv,

little update,

Modbus is dropping out about every 12-13 hours. A quick on/off of the CC fixes it.
The script says "Reply time-out!"

Modpoll/Bash is reading two registers, once a minute.

I did not update the firmware's last release...that may help? Just a little bug somewhere, software is like that.

tks,
steve
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

stephendv

Quote from: rosebudd on September 26, 2012, 08:35:33 AM
boB, stephendv,

little update,

Modbus is dropping out about every 12-13 hours. A quick on/off of the CC fixes it.
The script says "Reply time-out!"

Modpoll/Bash is reading two registers, once a minute.

I did not update the firmware's last release...that may help? Just a little bug somewhere, software is like that.

tks,
steve

Hi steve, yep that's exactly what I'm seeing, and I'm doing something very similar, cron job every minute to grab 3 values.  Unfortunately "a quick on-off" is a 500m hike down to where my array is.

I have the latest firmware and am still seeing this.  Have you tried boB's suggestion of connecting directly to the classic without a switch in between? (I haven't yet).

rosebudd

stephen,

I have a slight advantage re the 500 mile jaunt, my gear is in the basement.....but the software is challenging (for me)...and fun.

I am using TCP via a Linksys router. Suspect the bug is in the CC, because it ran for ~3 weeks flawlessly...then started to hiccup? Per boB, I am watching and experimenting. Bypassing the router is an idea, but may try a couple easier things first.
Thinking of slowing down the crontab to see if that changes the drop interval? Is it time or a number of executions?

will share observations, the Classic works great,

steve

ps logging helps with trouble shooting.
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

boB


FYI, We are working on the TCP/IP  issue here.

Also, you are both talking about modbus over TCP/IP, right ?  And not the RS-232 modbus ?
I have not heard of any issues with the RS-232 operation which is also modbus.



Instead of powering down and on again is to go to TWEAKS, MORE, MORE2 and set A-RST
to ON.

Then, go to LOGS, DAILY and then hold down the LEFT-ARROW key and tap the ENTER key.
This will force a new day, save the logging information and then reboot the Classic because
A-RST is set. 

If you pressed enter after turning A-RST to ON, the Classic will remember this
and reset itself every night at midnight.  I realize this will not help if it is in the middle
of the day and you wanted to see or control the Classic remotely, but at least if you
do have to walk up to the Classic, it won't lose what power production it has made
that day as far as data logging goes.  The 5 or 10 minute data will of course
be logged in either case.

Now, if there were only a way to do this remotely after it stopped talking.

Anyhow, we're working on fixing this TCP/IP stack issue.

Thanks,
boB

K7IQ 🌛  He/She/Me

rosebudd

thanks boB,

Yes, I am using TCP/IP for communications to the Classic.

I followed your instructions and a quick reboot....up and running again.

at the bottom of the page, the month graph shows what is happening:
http://sunenr.homedns.org/cgi-bin/modbattvlt.pl

If I can help troubleshoot at this end, let me know.....

steve
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

stephendv

Thanks boB, I've made those changes last night and so far it's been running without a problem (10 hours and counting).
Yes, I've only ever used modbus tcp because it's easier to use it remotely over my wifi.

Steve, you might be interested in cosm.com, a free data logging service, saves generating and hosting your own graphs ;)
https://cosm.com/feeds/75889

rosebudd

amigos,

Waited to see how long Modbus would stay up.....made it til 14.5 hours.

I doubled the time between samples, to see if it changes anything?

interesting stuff,

stephendv..thanks for the link

steve
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"