Modbus RTU Write Simulink Block error
Hi community,
I am starting with the setup of a modbus RTU communication between my matlab simulink model and some surrounding devices. Using the new simulink block "modbus client read", I can read the register of my external device, which shows me, that I’ve created a stable communication. However, if I want to write a register on the device, using the block "modbus client write", I get the following error:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
MATLAB System block ‘untitled/Modbus Client Write/internalModbus’ error occurred when invoking ‘stepImpl’ method of ‘icomm.system.ModbusWrite’. The error was thrown from ‘
‘C:Program FilesMATLABR2024btoolboxicommmodbusmodbusmodbusblks+icomm+systemModbusWrite.p’ at line 0′.
The Modbus server returned an invalid address error. Address + number of values to write is out of range.
The config of the write-block is pictured:
As aforementioned, it’s the same connection as used for the reading process. The model is quite simple and broken down to the minimum, but I get the error anyway:
Now I am struggling how to proceed with this error. Maybe someone can help me out!
Best
MarcoHi community,
I am starting with the setup of a modbus RTU communication between my matlab simulink model and some surrounding devices. Using the new simulink block "modbus client read", I can read the register of my external device, which shows me, that I’ve created a stable communication. However, if I want to write a register on the device, using the block "modbus client write", I get the following error:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
MATLAB System block ‘untitled/Modbus Client Write/internalModbus’ error occurred when invoking ‘stepImpl’ method of ‘icomm.system.ModbusWrite’. The error was thrown from ‘
‘C:Program FilesMATLABR2024btoolboxicommmodbusmodbusmodbusblks+icomm+systemModbusWrite.p’ at line 0′.
The Modbus server returned an invalid address error. Address + number of values to write is out of range.
The config of the write-block is pictured:
As aforementioned, it’s the same connection as used for the reading process. The model is quite simple and broken down to the minimum, but I get the error anyway:
Now I am struggling how to proceed with this error. Maybe someone can help me out!
Best
Marco Hi community,
I am starting with the setup of a modbus RTU communication between my matlab simulink model and some surrounding devices. Using the new simulink block "modbus client read", I can read the register of my external device, which shows me, that I’ve created a stable communication. However, if I want to write a register on the device, using the block "modbus client write", I get the following error:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
MATLAB System block ‘untitled/Modbus Client Write/internalModbus’ error occurred when invoking ‘stepImpl’ method of ‘icomm.system.ModbusWrite’. The error was thrown from ‘
‘C:Program FilesMATLABR2024btoolboxicommmodbusmodbusmodbusblks+icomm+systemModbusWrite.p’ at line 0′.
The Modbus server returned an invalid address error. Address + number of values to write is out of range.
The config of the write-block is pictured:
As aforementioned, it’s the same connection as used for the reading process. The model is quite simple and broken down to the minimum, but I get the error anyway:
Now I am struggling how to proceed with this error. Maybe someone can help me out!
Best
Marco simulink, modbus, modbusrtu, writeregister MATLAB Answers — New Questions