Industrial communication toolbox (R2022a): function code for Modbus multiple holding registers write
Ältere Kommentare anzeigen
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 ?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Modbus Communication finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!