Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCPbufferdPort do not recive data if length exceeds 123 registers #569

Open
MarkusBeer opened this issue Nov 28, 2024 · 0 comments
Open

Comments

@MarkusBeer
Copy link

If I try to get more than 123 registers using readInputRegisters() on a TcpRTUBuffered port the package do not receive valid response. On wireshark i can see this valid modus response. Also a modbus poll tool for this request is working fine.

Here is a short js code to reproduce (you need to change 'x.x.x.x' to a slave which returns a valid result to reading input registers 1 to 126) :

const ModbusRTU = require('modbus-serial')
const testClient = new ModbusRTU();

async function test() {
try {
await testClient.connectTcpRTUBuffered('x.x.x.x', { port: 502 });
testClient.setTimeout(5000)
const result = await testClient.readInputRegisters(1, 125);
console.log( result);
} catch (e) {
console.log(e);
}
}
test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant