Communication errors

Forum Home Forums Communicating with Devices Modbus Communication errors

This topic contains 24 replies, has 2 voices, and was last updated by Avatar MarCus0 2 years, 3 months ago.

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #2178
    Avatar
    MarCus0
    Participant

    Hi
    I trying to setup comunication with AirCon modbus gate.
    On pics I’m showing log from Communicator with error http://i67.tinypic.com/24e583r.png .
    When I try to read the same ModbusPoll is working properly .
    Can any body help please?
    Regards
    Marek

    #2179
    Mikhail
    Mikhail
    Moderator

    Hi,
    The device sends not enough bytes: Receive (4/5). 5 bytes expected in the second part of package according to Modbus standard.
    You can analyze packages using http://modbus.rapidscada.net/
    If ModbusPoll can show communication protocol, let’s compare with Communicator.

    #2180
    Avatar
    MarCus0
    Participant

    Hi

    Thanks for Your interesting with my problem.

    See ModbusPoll transmision log.
    In Communicator polls are OK but ansver are divided in to two lines. In ModbusPoll all is OK? I’m not sure how to interpret this, and where problem is.
    In parser Communicator question is OK and answer give an error that data should contain at last 8 bytes, as well.

    Regards
    Marek

    #2181
    Avatar
    MarCus0
    Participant

    Log 🙂
    http://pl.tinypic.com/view.php?pic=zn4ln6&s=9#.WShqatwwiHs

    Marek

    • This reply was modified 2 years, 5 months ago by Avatar MarCus0.
    • This reply was modified 2 years, 5 months ago by Avatar MarCus0.
    #2184
    Avatar
    MarCus0
    Participant

    Hi Again

    I checked Gate ansvers wchich get ModbusPoll. http://modbus.rapidscada.net/ give error with bytes quantity? Is strange because ansvers are interpreted by softare properly? I can compare it by web interface where are coil state.
    Coil state representation on web interface is the same as in ModbusPoll?

    When I have access I will try different software to find which where is problem.

    Regards
    Marek

    #2185
    Avatar
    MarCus0
    Participant

    Hi again

    I tried Simply Modbus http://www.simplymodbus.ca/SimplyModbusTCPclient7.1.2Install.zip
    Results You can see here http://i66.tinypic.com/jac09w.png. It seems that Gate answer properly.
    I tried always read the same 10 coils from 00641 address.
    For request: 00 00 00 00 00 06 02 01 02 80 00 0A, answer: 00 01 00 00 00 06 02 01 02 88 02 is proper in ModbusPoll and in Simly Modbus software but Communicator and online http://modbus.rapidscada.net/ is generating error.

    Can You check where is problem, please?

    Regards
    Marek

    #2192
    Mikhail
    Mikhail
    Moderator

    Hi,

    Unfortunately, the link to the image you provided doesn’t work. Can you post the correct link?

    #2196
    Avatar
    MarCus0
    Participant

    Hi
    See this one
    https://ibb.co/bZUbLv
    Regards
    Marek

    #2204
    Mikhail
    Mikhail
    Moderator

    Hi,
    According to the Modbus specification, in the response
    00 00 00 00 00 06 02 01 02 88 02
    06 is “Number of following bytes”. You can see only 5 bytes after 06. So the response is not correct.

    The correct response would be 00 00 00 00 00 05 02 01 02 88 02
    I think, Simply Modbus doesn’t validate the incoming data.
    Do you have any idea why the device sends incorrect Modbus packages?

    #2205
    Mikhail
    Mikhail
    Moderator
    #2207
    Mikhail
    Mikhail
    Moderator

    Try requesting 8 coils.

    #2208
    Avatar
    MarCus0
    Participant

    Hi

    It is nothing change. What ever I try is error about communication error but Mikhail answers in comunicator are the same then other softaware?
    Just Communicator expect additional bytes which are not send by Gate than we get immediately is error.
    It is funny but on http://www.simplymodbus.ca/TCP.htm page is protocol explanation and their software not follow them. 06 mean that we should expect 6 bytes. In answers are 4 and every other software(Simlymodbus and Modpoll) accept it properly.

    I’m tried manually on (http://modbus.rapidscada.net/) modify Gate answers but without luck. Later I will try to look for where is truth with protocol and possible problem explanation.

    Perhaps You know how to solve it? I cant modify any Gate settings(there is nothing to set about communication as is closed solution) as is comply with popular software I cant claim it.
    Is a first time with You get such error? Is any body implement TCP(instead Modbus over TCP) protocol on Communicator? My problem is first?

    Regards
    Marek

    #2209
    Avatar
    MarCus0
    Participant

    Hi

    See this from Communicator when I set 32 coils to read.
    https://ibb.co/e7MJiF
    There are messages about Incorrect MBAP Header data.

    There is correct answer from SimplyModbus https://ibb.co/fgr13F

    Regards
    Marek

    • This reply was modified 2 years, 5 months ago by Avatar MarCus0.
    #2211
    Avatar
    MarCus0
    Participant

    Hi
    Finding continued.
    In spec http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf page 11 about functions
    You can find PDU from last readings:
    Request
    01 – fuction code
    02 80 – starting adress
    00 20 – quantity of coils(32dec)
    Response
    01 – function code
    04 – byte count
    88 04 01 00 – Coil status

    And MBAP Header:
    00 02(01) – transaction identifier. In communicator it seems not implemented and can make some problem as TCP is not direct query/answer. Datagrams can be send in different order(http://modbus.org/docs/Modbus_Messaging_Implementation_Guide_V1_0b.pdf page 16).
    00 00 – protocol identifier. Always 00 00 for modbus.
    00 06 – it should be PDU+UnitIdendifier byte but ?! it is not in gate answer. I will look for explanation but this field in all examples are 00 06 and unfortunately all examples match this number. I don’t know why Gate not calculate message length and why it is OK. for other software’s?
    02 – Unit identifier(address)

    It seems that only problem is in lenght PDU+UI byte. When I change response manually(lenght) answer is OK in Your parser and will be probably OK. in Communicator.

    Is any other chance to solve it than contact Bosch? Can we omit this length control as other software do?

    Regards
    Marek
    Re

    #2212
    Avatar
    MarCus0
    Participant

    Hi

    It is looking as monologue :).

    Is possible because that:
    “Response
    01 – function code
    04 – byte count
    88 04 01 00 – Coil status”
    other software don’t care about 00 06 – following byte length?

    Regards
    Marek

Viewing 15 posts - 1 through 15 (of 25 total)

You must be logged in to reply to this topic.