Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModbusRTUclient ReadHoldingRegister error System.TimeoutException: 'The operation has timed out.' #106

Open
bobfri opened this issue Jan 19, 2024 · 2 comments

Comments

@bobfri
Copy link

bobfri commented Jan 19, 2024

if i only read a register once i don't get any issue but when i try to read for a second time i get the error.
this is my current test code:

  static void Main(string[] args){
          Console.WriteLine("Hello, World!");
          ModbusRtuClient m = new ModbusRtuClient()
          {
              BaudRate = 115200,
              Parity = System.IO.Ports.Parity.None,
          };
          m.Connect("COM7");
          var t = m.ReadHoldingRegisters(1, 0x0070, 2);
          var tt = m.ReadHoldingRegisters(1, 0x0070, 2);
   }
}
@Apollo3zehn
Copy link
Owner

I am sorry, I have no RS232 hardware available and Modbus RTU implementation was tested once via a virtual COM bridge. Is it working with other Modbus RTU tools? I suspect the problem being in the device but I cannot be sure.

@bobfri
Copy link
Author

bobfri commented Jan 22, 2024

My setup runs RS485 and i have managed to get it working with sevral other Modbus RTU tools so i dont think its a device issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants