Hi
I think your modules are self contained ModBus RTU's and are half-duplex, so would it not handle direction automatically? You would (presumably) send a read command and it would do the rest. Do you have a link to the datasheet / manual for setting up the RTU's?
Regards
Ethernet RS232 / 485
-
- Valued Contributor
- Posts: 1313
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 317 times
- Been thanked: 458 times
Re: Ethernet RS232 / 485
Hi,
You are right that you send a read command and the RTU device replies but I think this is where the issue is going to be. (BTW, there is virtually no information on the modules but I did get one to work with the ESP32, the issue I had then was to change the address).
From what I read you send to the message port 10001 but then it has settings for the response which will be the IP/port of the Pi so will need a channel for that.
I hope to have the USB/serial for the weekend so can play around with 232 serial as there is no point trying Modbus until I get that working. I will probably just use a serial terminal program first to simplify it further.
Bob
You are right that you send a read command and the RTU device replies but I think this is where the issue is going to be. (BTW, there is virtually no information on the modules but I did get one to work with the ESP32, the issue I had then was to change the address).
From what I read you send to the message port 10001 but then it has settings for the response which will be the IP/port of the Pi so will need a channel for that.
I hope to have the USB/serial for the weekend so can play around with 232 serial as there is no point trying Modbus until I get that working. I will probably just use a serial terminal program first to simplify it further.
Bob
-
- Valued Contributor
- Posts: 1313
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 317 times
- Been thanked: 458 times
Re: Ethernet RS232 / 485
Hi
Between the gadget and your Pi it's tcp/ip so bidirectional. It's only half-duplex between gadget and RTU, well unless I've missed something (easily done)
Regards
Between the gadget and your Pi it's tcp/ip so bidirectional. It's only half-duplex between gadget and RTU, well unless I've missed something (easily done)
Regards
-
- Valued Contributor
- Posts: 1313
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 317 times
- Been thanked: 458 times
Re: Ethernet RS232 / 485
Here's hoping for a snap postal strike then......Could be a beer free weekend if it arrives on time.
Re: Ethernet RS232 / 485
Hi,
It definitely seems I was reading the manual wrong, I put a link between Tx/Rx on the serial connector and using a terminal program (CoolTerm) it seems to work as you said. Also only need 4 channels (for 2 UDS devices) so I miss interpreted that as well.
Got to find the Modbus modules now.
Bob
It definitely seems I was reading the manual wrong, I put a link between Tx/Rx on the serial connector and using a terminal program (CoolTerm) it seems to work as you said. Also only need 4 channels (for 2 UDS devices) so I miss interpreted that as well.
Got to find the Modbus modules now.
Bob