Modbus Problems - only wokring when in Reset State

If you have a question about the software please ask it here.

Modbus Problems - only wokring when in Reset State

Postby martinmitchell1 » Sun Oct 08, 2023 7:01 pm

Hello,
I'm really hoping someone can help.

Summary:
Modbus commands to vfd are no longer working, i can get them to execute but only when UCCNC is in the reset state. Modbus master is showing checksum errors which stop once UCCNC is put into reset mode.

Detail:
I've been using UCCNC with a UC300ETH, and VFD (YL-620) which is connected to the laptop via a USB to RS485 (CH340 chip) connector and twisted pair short (1m) wire from laptop to inverter i've been using the modbus ez plugin to date.

Recently it has been a little temperamental with the odd delay in turning off the spindle and today it just refused to turn the spindle on. Switching everything off and back on did not fix it, i changed out the twisted pair wire incase it was an issue there but no luck.

I downloaded a serial port monitor and managed to pass the commands directly to the VFD to turn on and off the spindle with no problem at all. However as soon as i load up UCCNC and try and pass the command I can sometimes get it to turn on or off the spindle but generally i have to send the command about 10 times.

I've tried implementing a macroloop to turn turn the spindle on / off with the use of the modbus master plugin. I can get this to make the changes to the VFD, i can see it passing the data on the serial monitor but the VFD doesnt seem to react until i put UCCNC into reset mode. In the modbus master plugin i can see lots of checksum errors when UCCNC is in normal operational mode, and these stop when it is put into reset mode.

Anyone got any ideas on how to fix this?

Thank you !!

I
martinmitchell1
 
Posts: 4
Joined: Wed Sep 13, 2023 5:43 pm

Re: Modbus Problems - only wokring when in Reset State

Postby dezsoe » Mon Oct 09, 2023 1:34 pm

Please, upload your profile and that (those) macroloop(s) that change anything in the modbus registers.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Modbus Problems - only wokring when in Reset State

Postby martinmitchell1 » Mon Oct 09, 2023 7:08 pm

Hi Dezsoe,

Thanks for the reply - i've popped them on now.

thanks!

also here is an quick screengrab of some of the errors in modbus
error example.png
errors in modbus master
Attachments
M5004.txt
macro loop
(1.67 KiB) Downloaded 203 times
Default.pro
profile
(43.42 KiB) Downloaded 136 times
martinmitchell1
 
Posts: 4
Joined: Wed Sep 13, 2023 5:43 pm

Re: Modbus Problems - only wokring when in Reset State

Postby martinmitchell1 » Tue Oct 10, 2023 4:49 pm

A little further info...

What i've tried:
I've changed the wires out, tried 3 different sets of twisted pair wires now - no change to problem
I've changing the baud rate both up and down on VFD and Adapter & modbus connection settings - no change to problem
I've changing the parity & stop bits of VFD, Adapter & Modbus master connection settings - no change to problem
I've change the buffer settings on the adapter - no change to problem
I've changed the loop interval settings, timout and retry count settings in modbus master - no change to problem
I've checked the macro loop is working fine as its updating the figures in the variables table of Modbus master as soon as i press the inputs, this table updates regardless of whether its in the reset state or not.

I can confirm that its only a problem when not in reset state, when in reset i can adjust the speed via slider on screen and its updating the frequency on the VFD display instantly. But when i'm not in reset i can sometimes get it to follow the command but mostly it wont. Sometimes it will follow the command instantly and other times it will take a minute.

I've got another USB to RS485 adapter on the way so hopefully will be able to rule out a faulty adapter.

Any other ideas on how i can try to fix this ?
martinmitchell1
 
Posts: 4
Joined: Wed Sep 13, 2023 5:43 pm

Re: Modbus Problems - only wokring when in Reset State

Postby valhallaCNC » Tue Oct 10, 2023 6:05 pm

Instead of USB to RS485 adapter, maybe use ethernet to RS485 adapter I believe they are more resistant to noise and more reliable. Also termination resisters at both both ends of twisted pair. Works for me.
valhallaCNC
 
Posts: 81
Joined: Wed Jun 30, 2021 8:04 pm

Re: Modbus Problems - only wokring when in Reset State

Postby martinmitchell1 » Tue Oct 10, 2023 8:30 pm

thanks valhallaCNC!

i dont have any 120ohm resistors to hand but a 100ohm on each end has certainly steadied things (the odd error pops up but generally only when the spindle is running now) and looks like i've re-gained control of the VFD. I'll maybe get one of those ethernet > rs485 adapters ordered incase of future issues.

Thank you very much for your help, its greatly appreciated !!

success image.png
success !
martinmitchell1
 
Posts: 4
Joined: Wed Sep 13, 2023 5:43 pm

Re: Modbus Problems - only wokring when in Reset State

Postby valhallaCNC » Wed Oct 11, 2023 1:54 pm

Glad it worked out for you. Had another thought, check your spindle and machine grounds. I don't know what spindle you have, a lot of them have 4 pin connectors but the GRD pin is not hooked to anything you have to modify it. Google yours to see if that's the case.
valhallaCNC
 
Posts: 81
Joined: Wed Jun 30, 2021 8:04 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 21 guests