Forum Home › Forums › Communicating with Devices › Modbus › Not Receiving Data from Request – Modbus
- This topic has 22 replies, 4 voices, and was last updated 3 years, 3 months ago by Mikhail.
-
AuthorPosts
-
December 19, 2020 at 2:08 pm #7761bbaileyParticipant
Good day all!
I have RapidScada trying to connect to a RS-485 to Ethernet Converter via Modbus TCP (the original device has a port for Modbus RS-485 RTU but apparently it should work the same)Right now I am getting:
2020-12-19 05:40:09 Establish a TCP connection with 172.16.15.150:42069
2020-12-19 05:40:09 Communication session with the Device 1 “ActualModbus”, type: KpModbus, address: 5, call number: 172.16.15.150
Request element group “Analog Levels”
Send (12): A0 C6 00 00 00 06 05 04 00 00 00 28
Receive (0/7):
Communication error!
Request element group “Analog Levels”
Send (12): A0 C7 00 00 00 06 05 04 00 00 00 28
Receive (0/7):
Communication error!
Request element group “Analog Levels”
Send (12): A0 C8 00 00 00 06 05 04 00 00 00 28
Receive (0/7):
Communication error!2020-12-19 05:40:13 Disconnect from 172.16.15.150
The Device’s ModBus ID by default is 5 so I set the address to 5.
The IP address of my RapidSCADA server which I am testing it with is 172.16.15.154 and the converter’s local IP address is 172.16.15.150I have a response from the Converter where it is saying it is receiving instructions from RapidSCADA but there is no transmission, as seen below:
https://imgur.com/m8wME8F WaveShare RS-485 Converter Web Page showing reception but no transmission
I have set the parameters in my RapidSCADA as ModBus TCP, Client Mode pointing to the remote IP and port of the converter.
RapidSCADA parameters:
https://imgur.com/WBeOlITConverter’s parameters:
https://imgur.com/OKm8bqWMy Line state has:
Line 1 “Simulated Line”
———————–
State : running
Action : 19/12/2020 06:05:25 Communication with Device 1 “ActualModbus”Connection Channel
——————
Type: TcpClient
Connection: not established
Custom Parameters
—————–
TransMode = TCPCommon Properties
—————–
Modbus.Templates = Dictionary of 1 templatesActive Devices
————–
1. Device 1 “ActualModbus” : errorALL HELP IS APPRECIATED
I have two theories:
EITHER the ModBus terminals are not communicating
OR
Something is wrong with the configuration.
Appreciate in advance
- This topic was modified 3 years, 4 months ago by Mikhail.
December 19, 2020 at 2:49 pm #7762bbaileyParticipantDecember 19, 2020 at 5:43 pm #7763manjey73ParticipantDoes your converter convert the protocol from Modbus TCP to Modnus RTU ? or is it just an ethernet – rs485 interface converter ? If the latter, then set the transemode RTU mode and remove the callnumber leave only the IP and port communication line settings
December 19, 2020 at 5:50 pm #7764manjey73ParticipantYou have a simple interface converter, not a protocol converter. You configure the communication line as a TCP Client by specifying the IP and port. Scada is configured to work with the RS485 interface. transmode = RTU Address = 5 do not specify a Call Number, leave the field blank
- This reply was modified 3 years, 4 months ago by manjey73.
December 19, 2020 at 7:29 pm #7766bbaileyParticipantHello @manjey73 , thanks for the reply!
OK I have done all the changes you recommended and still having errors (but we are on the right path)
Here is the line log:
2020-12-19 11:14:57 Establish a TCP connection with 172.16.15.150:5022020-12-19 11:14:57 Communication session with the Device 1 “ActualModbus”, type: KpModbus, address: 5
Request element group “Analog Levels”
Send (8): 05 04 00 00 00 28 F1 90
Receive (0/5):
Communication error!
Request element group “Analog Levels”
Send (8): 05 04 00 00 00 28 F1 90
Receive (0/5):
Communication error!
Request element group “Analog Levels”
Send (8): 05 04 00 00 00 28 F1 90
Receive (0/5):
Communication error!2020-12-19 11:15:00 Disconnect from 172.16.15.150
2020-12-19 11:15:00 Establish a TCP connection with 172.16.15.150:502
2020-12-19 11:15:00 Communication session with the Device 1 “ActualModbus”, type: KpModbus, address: 5
Request element group “Analog Levels”
Send (8): 05 04 00 00 00 28 F1 90
Receive (0/5):
Communication error!
Request element group “Analog Levels”
Send (8): 05 04 00 00 00 28 F1 90
Receive (0/5):
Communication error!
Request element group “Analog Levels”
Send (8): 05 04 00 00 00 28 F1 90
Receive (0/5):
Communication error!2020-12-19 11:15:04 Disconnect from 172.16.15.150
AND here is are Configuration settings as per recommendation.
The line state is giving this result:
Line 1 “Actual Line”
——————–
State : running
Action : 19/12/2020 11:18:46 Communication with Device 1 “ActualModbus”Connection Channel
——————
Type: TcpClient
Connection: not established
Custom Parameters
—————–
TransMode = RTUCommon Properties
—————–
Modbus.Templates = Dictionary of 1 templatesActive Devices
————–
1. Device 1 “ActualModbus” : errorIt looks much closer to what it should be reading as seen in this link
Looking forward to your response!
December 20, 2020 at 7:23 am #7768MikhailModeratorHello,
According to the log file, you can connect to the converter, but there is no response from the device.
Check the following:
1. The device ID is correct (is set to 5).
2. RS-485 wires are correct. Try swapping A and B wires.December 20, 2020 at 11:19 am #7773manjey73ParticipantWhy are you using port 502 ? after all, by default, the device Ethernet-RS485 has port 23 when it is configured as a tcp server ?
December 20, 2020 at 11:30 am #7774manjey73ParticipantDecember 20, 2020 at 11:39 am #7775manjey73ParticipantTry reading just one register first and make sure they are readable. and only then add registers to the query group
December 20, 2020 at 4:35 pm #7777bbaileyParticipantHello @manjey73
Changed the Remote Port to 502, because in the tutorial had Port 502 and my team entered it to see if it would make a difference (it did not sadly). Changed it to Port 23 and no difference.I changed the test to look at only one register (Battery Level, as seen in the request frame example given by the manufacturer
.I am getting the following result, which matches the above:
2020-12-20 08:30:44 Establish a TCP connection with 172.16.15.150:232020-12-20 08:30:44 Communication session with the Device 1 “ActualModbus”, type: KpModbus, address: 5
Request element group “Battery Level Level Test”
Send (8): 05 04 00 19 00 01 E1 89
Receive (0/5):
Communication error!
Request element group “Battery Level Level Test”
Send (8): 05 04 00 19 00 01 E1 89
Receive (0/5):
Communication error!
Request element group “Battery Level Level Test”
Send (8): 05 04 00 19 00 01 E1 89
Receive (0/5):
Communication error!2020-12-20 08:30:48 Disconnect from 172.16.15.150
I feel it is either the request is somehow incorrect and thus does not get the a response from the slave.
OR
The RS-485 itself is not working as there is no transmission.
In your expertise what do you think is the best solution?
[NOTE: I am not using a shielded twisted pair, but rather three normal (slightly large) power wires to run the short distance of 6 inches during tests. Do you think this will affect its performance?]
December 20, 2020 at 4:41 pm #7778bbaileyParticipantGreetings @Mikhail, thanks for the response!
The Device ID by default is 5 and so that is my Dev Address in RapidSCADA, along with no call number as recommended for RTU slave devices using this Ethernet-to-RS485 converter.
Regarding the wires used for the RS-485, I am currently using:
three normal (slightly large) power wires to run the short distance of 6 inches during tests. Do you think this will affect its performance?
and not twisted pair as I am in testing. With the terminals: A, B, COM.
Do you think this would cause a problem in communication?
All help is appreciated!
December 20, 2020 at 4:46 pm #7779kumajayaParticipantUsually I use a Modbus tester application to confirm Modbus RTU/TCP communication. You can try https://store.chipkin.com/products/tools/cas-modbus-scanner or https://github.com/ed-chemnitz/qmodbus
December 21, 2020 at 6:28 am #7781manjey73ParticipantHave you tried connecting to the device via USB-RS485 ?
December 21, 2020 at 8:41 am #7783bbaileyParticipantNo as to get it to the country I am in, especially during Christmas time, the package would take take more than a week to two weeks.
My work needs this to work asap, so lots of pressure haha.
But do you think improper cables are to blame?
(Greetings from Jamaica)December 21, 2020 at 12:50 pm #7788MikhailModeratorDo you think this would cause a problem in communication?
It is highly possible. If I were you, I would connect another converter instead of PLC and check if data are received from the 1st converter.
If your converter has more than 1 RS-485 port, you can perform this test using the single converter.
-
AuthorPosts
- You must be logged in to reply to this topic.