Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello, Modbus commands often have 0x00 bytes. How do you send that as a script without it being interpreted as a null terminator?
Thank you, Stuart
Hi Stuart,
The second parameter of the transmit function is the block size (if omitted, strlen will be used, thus cutting the packet at the first 0-byte).
transmit
strlen
0
In your case, simply pass the required size to transmit like this:
transmit(a, sizeof(a));
Hi Vladimir, That's great, thank you for your help. Stuart