Modbus connection settings not saved

If you think you've found a bug post it here.

Modbus connection settings not saved

Postby A_Camera » Sun Sep 25, 2016 1:22 pm

There seems to be a bug in the Modbus handling.

The following is saved in Default.pro file:

[Modbus_connection_0]
Description=EFC 5610
ID=0
Loopinterval=175
Retrycount=10
Type=RTU
Serial_Baudrate=38400
Serial_Comport=COM4
Serial_Databits=8
Serial_Parity=Non
Serial_RS485mode=True
Serial_Stopbits=1

The Timeout value is not saved and is reset every time I restart UCCNC, as a result the Modbus communication is not reliable because the 25ms default value is far too short, so messages simply time out, read values become unreliable and random. Changing timeout to 100ms (even 75ms) solves the problem, but the value is not saved, so next time I restart it is reset to 25ms. This is very annoying. I tried to find out where that 25 comes from so I could manually patch it but it seems impossible.

Is there any possible work-around this? Even if it means some quick and dirty patch, I'd be very happy if this could be fixed somehow.

Also, some times the loaded settings are totally wrong, for example port number field is empty, bps is set to 9600, RS485 is unselected. I don't see a pattern in when this is happening, but there is definitely a pattern in the first part, i.e. the fact that the timeout value is not saved, always reset to 25ms after start of UCCNC.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am

Re: Modbus connection settings not saved

Postby cncdrive » Sun Sep 25, 2016 1:59 pm

I will look after this, probably an issue with saving the Timeout parameter, but will have to check it to see it more clear why it is happing, will let you know the results I will find soon.
cncdrive
Site Admin
 
Posts: 4741
Joined: Tue Aug 12, 2014 11:17 pm

Re: Modbus connection settings not saved

Postby A_Camera » Sun Sep 25, 2016 2:16 pm

Thank you very much. I appreciate it. I have already tried adding different keywords to the [Modbus_connection_0] part, just to see if it has any effect, logically it should look something like this:

[Modbus_connection_0]
Description=EFC 5610
ID=0
Loopinterval=175
Timeout=75
Retrycount=10
Type=RTU
Serial_Baudrate=38400
Serial_Comport=COM4
Serial_Databits=8
Serial_Parity=Non
Serial_RS485mode=True
Serial_Stopbits=1

...but unfortunately it isn't that simple, adding that extra line doesn't help.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am

Re: Modbus connection settings not saved

Postby cncdrive » Mon Sep 26, 2016 12:34 pm

Checked and found the reason for the Timout issue, it was simply not saved in the plugin, corrected the issue now, will be OK in the next release.
cncdrive
Site Admin
 
Posts: 4741
Joined: Tue Aug 12, 2014 11:17 pm

Re: Modbus connection settings not saved

Postby A_Camera » Tue Sep 27, 2016 6:13 am

Thank you very much for confirming what I have seen and for fixing it in the next release, which I hope will be out soon. In the meantime, I will continue testing it. I collected my UC300ETH yesterday but only had a few minutes free time. Connected it for a quick test, and it worked without problems, after I figured out how to set the IP and that the main board was configured for USB, so the power setting was wrong. Took me a few minutes to figure those things out, but after that, no problems. Will continue today or tomorrow, but it looks promising so far.

I hope you don't mind if I get back with a few more comments about Modbus and some other things.
A_Camera
 
Posts: 638
Joined: Tue Sep 20, 2016 11:37 am


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 4 guests