MODBUS Issue

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
Soler
 
Posts: 32
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!
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: MODBUS Issue

Postby valhallaCNC » Thu Aug 19, 2021 12:48 pm

I'm having trouble setting up my ethernet waveshare, I see you have yours working would you mind posting your waveshare configuration page and your connection settings in modbus. At this point I'm totally confused. Thanks
valhallaCNC
 
Posts: 81
Joined: Wed Jun 30, 2021 8:04 pm

Re: MODBUS Issue

Postby Parkgrr » Tue Aug 24, 2021 6:13 am

Sure, I'm not familiar with waveshare but looked it up and saw its an ethernet to RS485 adapter. I'm using a USRIOT brand adapter. What's your status exactly?
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: MODBUS Issue

Postby valhallaCNC » Fri Aug 27, 2021 4:23 pm

Thanks for the reply, I finally got it working simple address mistake. Module address is the one I needed to get it working.
valhallaCNC
 
Posts: 81
Joined: Wed Jun 30, 2021 8:04 pm

Re: MODBUS Issue

Postby johanbhi » Sat May 27, 2023 9:21 am

I understand your concerns about using USB instead of Ethernet for production purposes. Ethernet gadgets often provide more stability and reliability, making them a preferable choice for long-term use in production environments.

Regarding your objection to setting Modbus TCP in the plugin, I agree that it would not be compatible with the USR module you mentioned. However, if the VCOM driver is installed, the module can function as a local serial port. In this case, both the Modbusmaster and ModbusEZ plugins will work as expected.
johanbhi
 
Posts: 7
Joined: Fri Mar 17, 2023 6:48 am

Previous

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 12 guests