Industrial communication toolbox (R2022a): function code for Modbus multiple holding registers write
Mostrar comentarios más antiguos
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 ?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Modbus Communication en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!