v1.2118 Modbus bug

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

v1.2118 Modbus bug

Postby iOne » Tue Mar 25, 2025 9:44 pm

Hi CNCDrive,

I recently started using a USB to RS485 adapter to control the spindle. Since I cannot understand yet how the modbusmaster plugin works I managed to make it work with the "ModbusEZ" plugin.
It works very well and reliably in version 1.2115. Just occasionally UCCNC would not connect to the USB adapter on starting up UCCNC but it gets quickly sorted by restarting UCCNC again and it would connect reliably again.

I know when it is working because as soon as UCCNC finish the startup "loading" screen the Tx light on the adapter starts blinking immediately (as per attached photo) independently if the VDF is powered on or off.

Now with version 1.2118 it randomly connects, theres is no real pattern for in what situations it would connect. If it does, if I close UCCNC and I open again it may work a second time but the 3rd time would not connect again. Sometimes restarting the PC or resetting the adapter appears to help but most of the time it doesn't. Also having the VFD on or off or the cable connected does not appear to make any difference either. I had a play with all the advance settings in the adapter driver (latency, buffers turning on and off legacy options, etc) and nothing appears to help unless I comeback to version 1.2115 so I think I narrowed it down to a UCCNC problem.

Any idea of what may be causing this?

IMG_4640 Large.jpeg
iOne
 
Posts: 34
Joined: Fri Sep 02, 2022 4:56 am

Re: v1.2118 Modbus bug

Postby cncdrive » Tue Mar 25, 2025 11:22 pm

The Modbus EZ Plugin does not use our ModBus plugin, it uses it's own code, so I think the issue should be somewhere in the plugin or maybe between the plugin and the UCCNC modbus register communication.
Pleas ask the author of the plugin to debug the issue, because we do not have the source code of that plugin.
cncdrive
Site Admin
 
Posts: 5115
Joined: Tue Aug 12, 2014 11:17 pm

Re: v1.2118 Modbus bug

Postby iOne » Wed Mar 26, 2025 1:07 am

Did the UCCNC modbus register changed in anyway between the 2 versions? Because now I have to write "1000" in the "Max HZ" field of the ModbusEZ plugin instead of a "100" on the v1.2115 for the same plugin file to get the same result with the VFD.
iOne
 
Posts: 34
Joined: Fri Sep 02, 2022 4:56 am

Re: v1.2118 Modbus bug

Postby cncdrive » Wed Mar 26, 2025 1:30 am

No, we did not change that.
We only made changes on the Modbus Master plugin, but the changes were done by my collegue (Dezsoe) who dies in December, so I will have to look up what changes exactly he made on the plugin.
However I don't think the ModbusEZ plugin uses the ModbusMaster plugin at all.
I think it is uses it's own code, so it should not influence the working at all.
cncdrive
Site Admin
 
Posts: 5115
Joined: Tue Aug 12, 2014 11:17 pm

Re: v1.2118 Modbus bug

Postby cncdrive » Wed Mar 26, 2025 1:31 am

Can you give any more information about how the issue happens and how to reproduce it?
cncdrive
Site Admin
 
Posts: 5115
Joined: Tue Aug 12, 2014 11:17 pm

Re: v1.2118 Modbus bug

Postby iOne » Wed Mar 26, 2025 1:56 am

Thanks again for replying. Yes, I read about Dezsoe, my condolences to you, the team and the family.

RE the USB adapter, it is pretty much what I wrote in the first post. At UCCNC startup it is a lottery if it connects to the USB adapter or not (on version 1.2118). On version 1.2115 as soon as UCCNC shows the main screen the USB adapter starts blinking the TX light (so I know that UCCNC is linked with the USB adapter and sending a signal to the VFD). Once the Tx light blinks I know that I would get a reliable signal sent to the VFD. It never fails or loses connection once UCCNC communicates with the USB adapter. This does not relate to the VFD, spindle or cable being connected (I have tried the USB adapter without a cable to ensure that it is not a noise issue). I also run UCCNC in demo mode...same thing...sometimes links to the USB adapter and sometimes it doesn't. Because the modbusEZ plugin does not have a "connect" or reset button the only option is restarting UCCNC again and see if it connects again (unlike modbus master pluging, which I can start and stop the loop any time to test the connection).

So I am not sure what more details to give you to try to help, I changed drivers, I played with all the advance options of the driver, there is no apparent pattern...in 1.2118 sometimes connects and most of the time doesn't specially if I restart UCCNC immediately after seeing it working. Could it be the order that the plugins gets loaded and something is not ready before the modbuzEZ try to connect to the usb adapter? (I also tried turning off all macroloops to ensure that I was not overwhelming the system at startup)

(UCCNC version 1.2118 and modbusEZ 1.6)
iOne
 
Posts: 34
Joined: Fri Sep 02, 2022 4:56 am

Re: v1.2118 Modbus bug

Postby cncdrive » Sun Mar 30, 2025 11:52 pm

Can you please ask the author (Eric) of the plugin to possibly check and debug what the issue is?
Only he has the source code and he probably also has a VFD at hands to test with.
cncdrive
Site Admin
 
Posts: 5115
Joined: Tue Aug 12, 2014 11:17 pm


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 2 guests