MODBUS Issue

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

Re: MODBUS Issue

Postby dezsoe » Wed Mar 31, 2021 9:52 pm

For experiments: OK. But for production I'd never replace an Ethernet gadget with an USB. :)

However, my big "NO" was for the suggestion to set Modbus TCP in the plugin and for that ModbusEZ cannot work with this USR module. While this module cannot talk Modbus TCP, it works as a local serial port if the VCOM driver is installed. And then both the Modbusmaster and ModbusEZ plugin will work.
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: MODBUS Issue

Postby Soler » Wed Mar 31, 2021 10:02 pm

Agreed, I was not aware the USR was not able to speak Modbus IP, therefore to use this it will need the Virtual comm port installed.
Soler
 
Posts: 32
Joined: Sun Feb 02, 2020 12:20 am

Re: MODBUS Issue

Postby Parkgrr » Wed Mar 31, 2021 10:43 pm

I can't thank you guys enough for the help, sincerely.

Luckily the USR virtual com software has been straightforward and I've been using their monitor to see what's up
Andy thanks very much for the step-by-step. I followed very closely and am not getting good talk back and forth. All I've seen received from the VFD is the following:

Screen1.png


My settings

Screen2.png

I've tried the RS485 box checked and unchecked

Screen3.png

I tried both write single register and write multiple registers

Would you expect to see different hex coming from the VFD besides this 'FF' when it's waiting for commands even if I'm not commanding it correctly?
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: MODBUS Issue

Postby Soler » Thu Apr 01, 2021 10:43 am

In the VFD drive itself what have you selected for the baud rate and parity?

I presume the serial port is correct for the Vcom port installed?
Parameter H5-02 should be set to 3 for 9600
Parameter H5-03 should be set to 0 for no parity
Parameter B1-01 should be set to 2 for modbus control

If still no joy I suggest i cheap USB Modbus to test around the USR.
Soler
 
Posts: 32
Joined: Sun Feb 02, 2020 12:20 am

Re: MODBUS Issue

Postby Parkgrr » Fri Apr 02, 2021 3:17 am

Yeah all my settings are lined up on both sides. Seems wise, going to grab a usb adapter to rule that out.
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: MODBUS Issue

Postby Battwell » Fri Apr 02, 2021 11:11 am

i had a lot of trouble with usb adapters.
i went with com port adapters instead and they have been rock solid.
i did buy some ethernet type too but never got around to testing them properly. - didnt come with setup instructions!
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 819
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: MODBUS Issue

Postby Parkgrr » Wed Apr 07, 2021 10:50 pm

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

Re: MODBUS Issue

Postby dezsoe » Thu Apr 08, 2021 7:13 am

You didn't mention version numbers and there were some issues in the past, so first update the Modbusmaster plugin.

The other thing I noticed on one of your screenshots is that your network to the USR is not configured:

Screen1a.png

That IP address is an APIPA address.
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: MODBUS Issue

Postby Parkgrr » Thu Apr 08, 2021 6:03 pm

Good looking out, I didn’t know about APIPA addresses. I was having trouble getting these addresses to stick so I allowed it to DHCP its own addresses and then I set fixed addresses based on what it assigned automatically.
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: MODBUS Issue

Postby Parkgrr » Thu Apr 08, 2021 6:09 pm

(Modbus master is the latest)
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

PreviousNext

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: BJB and 14 guests