Not Receiving Data from Request – Modbus

Forum Home Forums Communicating with Devices Modbus Not Receiving Data from Request – Modbus

Tagged: , , ,

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #7761
    bbailey
    Participant

    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.150

    I 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/WBeOlIT

    Converter’s parameters:
    https://imgur.com/OKm8bqW

    My 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 = TCP

    Common Properties
    —————–
    Modbus.Templates = Dictionary of 1 templates

    Active Devices
    ————–
    1. Device 1 “ActualModbus” : error

    ALL 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.
    #7762
    bbailey
    Participant
    #7763
    manjey73
    Participant

    Does 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

    #7764
    manjey73
    Participant

    You 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.
    #7766
    bbailey
    Participant

    Hello @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:502

    2020-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 = RTU

    Common Properties
    —————–
    Modbus.Templates = Dictionary of 1 templates

    Active Devices
    ————–
    1. Device 1 “ActualModbus” : error

    It looks much closer to what it should be reading as seen in this link

    Looking forward to your response!

    #7768
    Mikhail
    Moderator

    Hello,

    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.

    #7773
    manjey73
    Participant

    Why are you using port 502 ? after all, by default, the device Ethernet-RS485 has port 23 when it is configured as a tcp server ?

    #7774
    manjey73
    Participant

    1

    2

    3

    #7775
    manjey73
    Participant

    Try reading just one register first and make sure they are readable. and only then add registers to the query group

    #7777
    bbailey
    Participant

    Hello @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:23

    2020-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?]

    #7778
    bbailey
    Participant

    Greetings @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!

    #7779
    kumajaya
    Participant

    Usually 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

    #7781
    manjey73
    Participant

    Have you tried connecting to the device via USB-RS485 ?

    #7783
    bbailey
    Participant

    No 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)

    #7788
    Mikhail
    Moderator

    Do 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.

Viewing 15 posts - 1 through 15 (of 23 total)
  • You must be logged in to reply to this topic.