Response Length Error: Windows 7

76 views
Skip to first unread message

Aditya Laghate

unread,
Dec 14, 2010, 4:48:28 AM12/14/10
to modbus-tk
Hello,
I am trying to write an application, which reads data over modbus.
The code, when I run in Linux, does not give me this error, but if I
run the code (after required modifications) in Windows 7, I get the
following error.

Any help will be appreciated.

Traceback (most recent call last):
File ".\code.py", line 58, in readModbus
PowerFactor = master.execute(1, cst.READ_HOLDING_REGISTERS, 875,
1)
File "build\bdist.win32\egg\modbus_tk\utils.py", line 26, in new
modbus_tk.modbus.ModbusInvalidResponseError: Response length is
invalid 0

Regards
Aditya

luc

unread,
Dec 14, 2010, 5:17:28 AM12/14/10
to modbus-tk
Hello Aditya,
It seems that you don't get any answer from the controller. Do you use
RTU or TCP communication?
Have you checked that this type of communication is working Ok on this
new machine (firewall, ...)?
Best
luc

आदित्य लघाटे

unread,
Dec 14, 2010, 6:11:42 AM12/14/10
to modb...@googlegroups.com
Hey Luc,

I have tried using a third party tool (modbus-mat, it is a freeware) to
verify the data being sent. It works.

Secondly, even if I try reading the data manually, I can read it.

But, when I try reading the data from modbus-tk, I get the error.

Basically the hardware is working fine.

Using Modbus-tk version 0.4.0 and 0.4.1

Cheers
Aditya


--
"Ship is safe at harbor but it is not made for that."

Reply all
Reply to author
Forward
0 new messages