Subject: | RECV bug in transport TCP layer |
Date: | Mon, 12 Nov 2012 09:36:13 +0000 |
To: | "bug-Protocol-Modbus [...] rt.cpan.org" <bug-Protocol-Modbus [...] rt.cpan.org> |
From: | Martin Nørby Nielsen <mnni [...] dtu.dk> |
Hey
I found a data receive limit when I was trying to read more than 46 registers at once the limit should be 123 words.
I debugged the problem to the receive line in \transport\TCP.pm line 71
$sock->recv(my $data, 100);
please correct to: $sock->recv(my $data, 256);
This should make it possible to receive 123 registers including the overhead : maximum according to the TCP modbus standard
thanks for some sweet code I use it to interface with LAB PLC's
kind regards
Martin Nørby Nielsen
Udviklingsingeniør
Department of Energy Conversion and Storage
Danmarks Tekniske Universitet
[dtu]
DTU Risø Campus, P.O. Box 49
Frederiksborgvej 399, P.O. Box 49
Bygning 227
4000 Roskilde
Direkte telefon +45 4677 5634
mobile: + 45 2136 3137
mnni@risoe.dtu.dk<mailto:mnni@risoe.dtu.dk>
www.risoe.dtu.dk<http://www.risoe.dtu.dk/>