RS485 MODBUS RTU -Unstable communications

Rund um die Software von Revolution Pi
User avatar
nicolaiB
KUNBUS
Posts: 915
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RS485 MODBUS RTU -Unstable communications

Post by nicolaiB »

Hi LEOMENA,

I only had a quick glance at the logfiles and will have a further look tomorrow. I spotted in your kernel log, that lots of entries reporting that something ist blocking / delaying the IO access. Do you have any excessive IO tanks running?

Nicolai
LEOMENA
Posts: 46
Joined: 02 Aug 2021, 21:57

Re: RS485 MODBUS RTU -Unstable communications

Post by LEOMENA »

I do run several python after/ after_cancel functions , that kill themselves and then reinstate themselves for data monitoring and screen refreshing purposes and some threading. Are thinking they collide ?

I never go Modbus other than through the Process Image, though.

I will be on the lookout for your response tomorrow. I am located in Los Angeles area, so we are many hours apart in time zones.

Thanks!
User avatar
nicolaiB
KUNBUS
Posts: 915
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RS485 MODBUS RTU -Unstable communications

Post by nicolaiB »

Hi LEOMENA,

after going through all of your logs I come to the same conclusion as yesterday: Something very IO hungry is blocking the system and therefore lots of things can't access the resources in a timesensitive manner. You can observe the most expensive process (in terms of IO) for example with dstat:

sudo apt-get install dstat
sudo dstat -v --top-bio-adv --top-io-adv

Nicolai
LEOMENA
Posts: 46
Joined: 02 Aug 2021, 21:57

Re: RS485 MODBUS RTU -Unstable communications

Post by LEOMENA »

Hi Nikolai,
Again thanks for your reply..
Any suggestions?
What exactly should I change, my threads are run every second, should I do that less frequently? One second to me is like a pretty normal rate..
I will run the scripts you suggest but, can you be more specific about what I should do to avoid it? I cant think of anything other than the polls frequency or the baud rate..

Thanks
User avatar
nicolaiB
KUNBUS
Posts: 915
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: RS485 MODBUS RTU -Unstable communications

Post by nicolaiB »

Hi, please run dstat in order to find out what process is so IO hungry. Without this kind of information it is not possible to make any meaningful suggestion.

Nicolai
LEOMENA
Posts: 46
Joined: 02 Aug 2021, 21:57

Re: RS485 MODBUS RTU -Unstable communications

Post by LEOMENA »

OK, I will in my next trip to the field.. And get back to you on that..
Thanks
LEOMENA
Posts: 46
Joined: 02 Aug 2021, 21:57

Re: RS485 MODBUS RTU -Unstable communications

Post by LEOMENA »

Hi Nikolai,
I am trying to setup a simulated environment in order to get you the answers you need, because it is uncertain when I will have the unit available.

I managed to do a test run and ran the programs you indicated:

sudo apt-get install dstat
sudo dstat -v --top-bio-adv --top-io-adv

Attached is a quick preliminary screenshot. Please, tell me what exactly do you want me to look at? The matrix is showing any processes that are running, certainly (and I think obviously) the program shows that the most expensive i/o process is some python3 process, which is my program.
However, I am not sure how to interpret these numbers. BTW, I have not had a crash yet.
I will be running some more extensive simulated tests in the next days, But never to the same level that is out at the field, although I will be using the same program.
If there's any guidance you can provide while I am at this to identify the culprit of the loss of communications, I would appreciate it.

Please help.
Thanks
Attachments
SCREENSHOT.png
SCREENSHOT.png (856.27 KiB) Viewed 6287 times
LEOMENA
Posts: 46
Joined: 02 Aug 2021, 21:57

Re: RS485 MODBUS RTU -Unstable communications

Post by LEOMENA »

Hi Nikolai,

I hope everything is well with you..
I am reaching out again to see if you have any answers on our pending issue: Which is the unstable Modbus RTU link.
I still do have this problem and I am lost on what to do to fix it, our customers are starting to complain due to the hassles that this causes every time they need to use their equipment because they have to restart the whole system to regain control of the Modbus RTU slave.

Honestly, I am worried as well, I have been specifying Revpi's for other projects, I don't want to have to look into other equipment for the job.
I really hope that you can help me to find a solution.

This leads me to another question: In my development equipment,
A couple of days ago, I executed the commands in order to later install a library I needed:
sudo apt-get update & sudo apt-get upgrade
This generated a very long process of updates, downloads, removals, etc. that got me worried at the beginning. But fortunately, every thing went OK and I could continue to use my development equipment.
I wonder if this has to do with your recent post announcing a BETA version of your kernel being deployed: [BETA] Kernel 5.10 for testing

Can you please clarify?
Thanks in advance,

Leo Mena
LEOMENA
Posts: 46
Joined: 02 Aug 2021, 21:57

Re: RS485 MODBUS RTU -Unstable communications

Post by LEOMENA »

On the other hand, Do you recommend that I do this in all our Revpi Connects??? Or wait until it is done automatically?
Post Reply