We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With this code:
$startAddress = 0x0000; $registers = array("b0", "x-", "00", "00", "25", " 3"); /** @var WriteMultipleRegistersRequest $packet */ $packet = new WriteMultipleRegistersRequest($startAddress, $registers, 0); var_dump($packet->toHex()); die();
I am getting string
d7f0000000110010000000060c6230782d3030303032352033
which is wrong, there must be length 0x0013, not 0x0011. https://github.com/MightyPork/phpmodbus library did it right
The text was updated successfully, but these errors were encountered:
Fixed that one. Thanks for pointing that out.
by the ways. are trying to send ascii characters? as you see " 3" will be converted to 0x2003
0x2003
There is example in tests to convert integers etc to bytes:
modbus-tcp-client/tests/unit/Packet/ModbusFunction/WriteMultipleRegistersRequestTest.php
Line 30 in 9fdbcbb
Sorry, something went wrong.
No branches or pull requests
With this code:
I am getting string
which is wrong, there must be length 0x0013, not 0x0011.
https://github.com/MightyPork/phpmodbus library did it right
The text was updated successfully, but these errors were encountered: