May 25, 2017 at 3:45 pm #2178
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?
MarekMay 26, 2017 at 11:45 am #2179
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.May 26, 2017 at 6:04 pm #2180
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.
MarekMay 26, 2017 at 6:05 pm #2181
MarekMay 26, 2017 at 6:32 pm #2184
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.
MarekMay 26, 2017 at 9:53 pm #2185
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?
MarekMay 29, 2017 at 5:23 am #2192
Unfortunately, the link to the image you provided doesn’t work. Can you post the correct link?May 29, 2017 at 6:31 am #2196May 29, 2017 at 10:38 am #2204
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?May 29, 2017 at 10:40 am #2205
The official Modbus specifications are here http://modbus.org/specs.php
You need http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf and http://modbus.org/docs/Modbus_Messaging_Implementation_Guide_V1_0b.pdfMay 29, 2017 at 10:44 am #2207
Try requesting 8 coils.May 29, 2017 at 12:55 pm #2208
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?
MarekMay 29, 2017 at 1:25 pm #2209May 29, 2017 at 3:41 pm #2211
In spec http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf page 11 about functions
You can find PDU from last readings:
01 – fuction code
02 80 – starting adress
00 20 – quantity of coils(32dec)
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?
ReMay 29, 2017 at 6:17 pm #2212
It is looking as monologue :).
Is possible because that:
01 – function code
04 – byte count
88 04 01 00 – Coil status”
other software don’t care about 00 06 – following byte length?
You must be logged in to reply to this topic.