I have connected my Omron PLC with my laptop using a USB serial port converter. It gets connected successfully and I am able to read all values of port.
Now while I am trying to read the inputregistor it provides me the following error:
System.TimeoutException
HResult=0x80131505
Message=No Response from Modbus Slave
Source=EasyModbus
StackTrace:
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at ConsoleTest.Program.Main(String[] args) in C:\Users\ARUMAH\source\repos\ConsoleTest\ConsoleTest\Program.cs:line 29
My C# program is like below:
EasyModbus.ModbusClient modbusClient = new EasyModbus.ModbusClient("Com4");
I have connected my Omron PLC with my laptop using a USB serial port converter. It gets connected successfully and I am able to read all values of port.
Now while I am trying to read the inputregistor it provides me the following error:
System.TimeoutException
HResult=0x80131505
Message=No Response from Modbus Slave
Source=EasyModbus
StackTrace:
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at EasyModbus.ModbusClient.ReadHoldingRegisters(Int32 startingAddress, Int32 quantity)
at ConsoleTest.Program.Main(String[] args) in C:\Users\ARUMAH\source\repos\ConsoleTest\ConsoleTest\Program.cs:line 29
My C# program is like below:
EasyModbus.ModbusClient modbusClient = new EasyModbus.ModbusClient("Com4");
Could you please help me to sort out this problem.
Regards
I also have a similar issue. I am trying to read input registers, but have no idea how i shoud do it.
I am doing like this:
Console.WriteLine("Value of Input Reg #10: " + modbusClient.ReadInputRegisters(9, 1)[0].ToString());
But it is giving me the same error: No response from Modbus Slave.
I think the answer is pretty obvious, your Modbus Device is not anwering the request. (I think yo u did not forget to connect first?)