Modbus stops responding after a while

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

Previous topic - Next topic

stephendv

Assuming the controller did a reset at 12 last night, mine's been going for 17 hours now.  1 minute samples.

boB

Quote from: stephendv on September 27, 2012, 02:22:26 AM
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

Yes, I noticed that site you use. 

One of our engineers here used to use pachube (.com ?)  that
evidently turned into cosm.com

Here is another similar type of  site you may be interested in...

http://pvoutput.org/outputs.jsp

boB



K7IQ 🌛  He/She/Me

stephendv

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


This has effectively "fixed" the issue for me, been running for more than 36 hours now without a problem  :)

stephendv

Quote from: stephendv on September 28, 2012, 06:30:52 AM
Instead of powering down and on again is to go to TWEAKS, MORE, MORE2 and set A-RST
to ON.


This has effectively "fixed" the issue for me, been running for more than 36 hours now without a problem  :)

Scratch that, it just fell over. I get a timeout message when trying to connect to the classic.  Let's see if the reset tonight will fix it.

rosebudd

stephen,

I did change the sample rate to once every two minutes....that almost doubled the modbus run time...to just under 24 hours..

Trying for every three minutes, see what that looks like?

gather info,

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

boB


Very good observations and very useful information I think.
Thank you for this.

Stephen, I'm sure that it will fix itself tonight, but the A-RST won't
help you if the communications stopped during the day.
We are working on a permanent solution of course.

Rosebudd, that is also very good information !  Thank you both !

boB
 
K7IQ 🌛  He/She/Me

boB


Hey guys...     What OS are you using ??

Windoze or Linux   ???   Something else ???

Also, are you both using our local app ???   OR, does the classic drop with your own modbus over TCP/IP app ??

boB


K7IQ 🌛  He/She/Me

rosebudd

boB,

I am using Linux (11.1) and your App. is shut off. My understanding is they both can't run at the same time? I have not tried the App. since starting the modbus.

I use modbus software called Modpoll and a bash script to talk to the Classic (TCP/IP). The Classic is connected thru a Linksys router to a small pc (atom ITX).

tks,
steve, alias rosebud.

ps: the 3 min. sample rate made ragged RRD graphs, back to 2 mins., for now.
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

stephendv

I'm using linux too and the phpmodbus library.  So I guess your next question is whether it still stops if we're using the local app and not our own modbus... I'll start running it now to see what happens.  :)

Which reminds me of another issue: a sure way of locking it up is to connect with 2 different modbus requests at the same time.  This I've definitely seen with the local app, where local app is running and as soon as I try to connect with my modbus too the classic stops responding to both and needs a restart.

stephendv

Just ran the localapp only, and it took a few hours before the classic's modbus locked up and stopped responding.

rosebudd

this is a first...?

Modbus stopped after ~24 hours of operation,stayed off for 9 hours, then re-started again....I was away so I did not cycle the power on the Classic. It started again on it's own.

This may come under the weird category?

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

boB

#26
Quote from: rosebudd on September 29, 2012, 08:28:09 PM
this is a first...?

Modbus stopped after ~24 hours of operation,stayed off for 9 hours, then re-started again....I was away so I did not cycle the power on the Classic. It started again on it's own.

This may come under the weird category?

all fun,
steve

Are you continuously accessing the Classic or are you letting it sit for a while and coming back to it ??

My Classic here at home has not crashed at all except in DHCP mode, I see once in a while where my router
will give it a new TCP/IP address in descending numbers.   like,  192.168.1.38, then 192.168.1.37, 192.168.1.36,...
but only when I write to it.

I just tried modpoll while the local app was talking to the Classic, (STATIC IP), and it would not crash.
Just keeps going.  Trying harder...

BTW, the modbus program I usually use is modscan but modpoll is kind of a neat freebie program.
Think I'll see if I can compile it now so I can make it loop, etc.

boB

PS.  I also would like to change modpoll so I can read a 16 bit  int and not just 32 bit (2 registers)

PPS...   I found the include files on a fieldpoint web  site but looks like it isn't going to compile using old VC 6.0 directly anyway.

PPPPPS...
    I am looping modpoll, reading many registers as fast as it will go while running the local app.   Once in a while
the Local app will stop because modpoll will take over for a moment, and then the Local App comes back to
life on its own.  I set Aux 1 and/or aux 2 to Toggle Test  so I can immediately tell if the Local app has got the
connection or I will see the DOS window of modpoll streaming the register contents by.
It won't crash for me.    This is one reason why it is kind of hard to catch this problem.
I know that our network guy can duplicate this so it will get fixed fairly soon I hope.





K7IQ 🌛  He/She/Me

rosebudd

boB,

You are getting close to the "ah-ha" moment.

Yes, I am using the DHCP mode.
The crontab runs currently, once every two minutes...
I have not tried to write to the CC, don't want to mess anything up. The App. is still off.

The router comment may be a factor? I did test a Raspberry Pi connected to the router about the same time this started? ....one time event.

I had been reading three registers, without a problem, but then dropped off one to see if things improved. ....no change.

Things have been good for 11.5 hours since it re started by itself.

thanks for you efforts and insight,
steve
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"

boB

Quote from: rosebudd on September 30, 2012, 07:24:02 AM
boB,

You are getting close to the "ah-ha" moment.

Yes, I am using the DHCP mode.

OK...    Since the Classic has an IP address given to it from the router by DHCP now,
change the Classic to STATIC and see what happens.

One problem I had with DHCP was that it would sometimes change address on me
for no apparent reason.  Even though I think I needed to write to it to get it to
do this, maybe there is something to it for you, too.

With the latest software, you may need to write the password to the Classic to change
registers anyway...  Except for the password of course.

The absolute latest firmware does not require a password if the LOCK jumper is in place.

I'm not sure if that software is released or not ??  If not, it will be in the next one coming up
in a week or less.

boB
K7IQ 🌛  He/She/Me

rosebudd

boB,

Switched the connection over to STATIC, all is well.

I tried running the App in DHCP and STATIC mode, it would run but Modbus stopped. Bash said "TCP/IP connection was closed by remote peer!". Competition for port 502?

I am using the second last firmware update.
I held back on updating because I guessed I would lose the App function under Linux. Hoping to get Modbus working reliably and then keep updating the CC firmware.

Plan to keep monitoring and reporting things back.
One step at a time,

steve

ps just before the switch to Static, modbus had run for 12 hours, down for 2, then back up..by itself.
MS Classic 150, ~1.6kw pv, 500 ah , OB3524, ListerSL1/3kwgenAC .....so far
"retirement projects"