Post anything you want to discuss with others about the software.

Re: MODBUS Issue

Postby Soler » Fri Apr 09, 2021 9:52 am

Parkgrr wrote:I hear ya, I don't have a com port unfortunately so ethernet or USB are what I've got to work with.
Following y'alls advice I grabbed a USB > Modbus adapter and they are now talking correctly, good looking out. Sounds like I had a dud ethernet adapter, or am missing some perfect combination of settings (if anyone has been able to get one of these USR adapters to work I'd be thrilled to see all of your settings in the M0, VCOM, and network adapter settings :).

Working on the next hitch, it seems that whatever function number modbusmaster is sending as its 'write multiple registers' function is not the one my VFD wants to receive. On loop start modbusmaster is throwing

Modbus.SlaveException was thrown. Function code: 134Exception Code:1 - the function code received in the. query is not an allowable action for the server or slave. this may be because the function code is only applicable to newer devices etc etc

My VFD wants hex code '3' for reading, and '10' for writing. Is it possible to dig into this plugin somehow to make sure that's what is being sent and change it if not?

Can you take a screen shot of the function you are sending in Modbus Master, thanks
Modbus Controls for UCCNC and Mach
Wifi Modbus Relay without using pins on your break out board
Posts: 27
Joined: Sun Feb 02, 2020 12:20 am

Re: MODBUS Issue

Postby Parkgrr » Wed Apr 14, 2021 8:09 am

Folks, problem is solved. I can't thank you enough for your help!

I realized I made a rookie mistake and mixed up hex '10' with decimal '10', (I'm new to this). My VFD indeed does listen for modbus function 16, but yet it was still not working. I used a COM port monitor to see the traffic on my modbus port and realized that modbusmaster was sending the incorrect functions through the line that didn't correspond to the function I had chosen in the plugin, rather it was sending seemingly random functions to my VFD (for example it would send function '3' in the command string even when I had 'write multiple regs' selected rather than sending function 16). I had assumed that being that I'd just downloaded the UCCNC software only 2 months ago or so I would have an updated library of plugins but after checking version histories I saw I was given a very old version of modbusmaster. Updating solved literally all the problems I've been battling for a couple of weeks. I even switched back to the Ethernet->modbus adapter and it worked perfectly. Problem solved. Can't thank you all enough for digging into it with me, I'm brand new to this world and it's great to know there are people that are happy to help, I hope I can give back in future. Thank you!
Posts: 18
Joined: Mon Dec 07, 2020 9:12 am


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 5 guests