monthop / pymodbus

Automatically exported from code.google.com/p/pymodbus
0 stars 0 forks source link

read_holding_registers returns 'None' on correct data received #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi.
I noticed subj, after some tens of requests via serial sync client.

I modified client to print debug data (patch is attached), and I saw strange 
thing: response is correct, but read_holding_registers returns None.
Here is log for this case:

Write: 0x02 0x03 0x00 0x00 0x00 0x00 0x08 0x44 0x3f
Read: 0x02 0x03 0x10 0x00 0x00 0x78 0x37 0x00 0x00 0x18 0x6f 0x00 0x00 0x63 
0x2c 0x00 0x0e 0x70 0x3a 0xa7 0x1a

Also, 2nd request after it returns same result.

I use multiprocessing, so in one process there is only one simultaneous request.

Where can be trouble, or where I should look to debug it deeper?

Original issue reported on code.google.com by nitr0man...@gmail.com on 12 Aug 2013 at 6:21

Attachments:

GoogleCodeExporter commented 9 years ago
P.S. when logging is enabled, I've got strange thing: when there is an error, 
there is no pymodbus.factory response into log.

Original comment by nitr0man...@gmail.com on 12 Aug 2013 at 7:15

GoogleCodeExporter commented 9 years ago
Is there any chance I can see your client code?  It would be helpful in 
debugging your issue.

Original comment by Bashw...@gmail.com on 13 Aug 2013 at 5:06

GoogleCodeExporter commented 9 years ago
There isn't non-trivial things into code. Code is in attach (serial-related 
part). Trouble happens even in debug mode, when process pool isn't used.

Serial port closing after each requests batch was made for simultaneously usage.
'Client' class instance was re-initialized each time because earlier sometimes 
instance 'hangs' and stops to process requests.

Original comment by nitr0man...@gmail.com on 14 Aug 2013 at 7:08

Attachments:

GoogleCodeExporter commented 9 years ago
I found that there's some issue in class<ModbusRtuFramer> in 
function<checkFrame>...

if a resolved please share the solution for this issue.....

Original comment by rushabh....@gmail.com on 9 Dec 2013 at 10:09

GoogleCodeExporter commented 9 years ago
I'm having the issue too on my BeagleBone Black. The code runs fine on windows, 
but when I put it on my BBB I have this same problem.

the port opens but I don't get anything. the timeout exception is not throw 
either.

Original comment by ben.newm...@gmail.com on 12 Sep 2014 at 4:47