Industrial communication toolbox (R2022a): function code for Modbus multiple holding registers write
Show older comments
I wish to write an uint16 integer value to Fanuc CNC controller using the ModBus write function of the industrial communcation toolbox.
The FANUC controller only accepts 'multiple holding register write' (modbus function code 16).
If I run
m = modbus('tcpip', '192.168.1.10');
write(m,'holdingregs', 2, 100, 'uint16'); % other 'precision' formats, uint64, not work neither.
a communication error will occur.
Using other modbus program to issue the 'multiple register write' command work just fine.
How to force the matlab modbus write function to generate a function-code-16 write ?
Accepted Answer
More Answers (0)
Categories
Find more on Modbus Communication in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!