You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem use this library with Modbus RTU.
I would like to read the data cyclically after a certain period of time (30 seconds), I have problems if I put the time interval greater than or equal to 10 seconds while I have no problems if this is less.
In particular I am using the ReadHoldingRegisters and at the second cycle the application gets stuck on the read and I have a substantial increase cpu use. I tried to set all the client properties (ReadTimeout, Retries ...) but the problem persist.
I have not experienced the same problem with Modbus TCP.
Here is a simple example showing the problem.
I have a problem use this library with Modbus RTU.
I would like to read the data cyclically after a certain period of time (30 seconds), I have problems if I put the time interval greater than or equal to 10 seconds while I have no problems if this is less.
In particular I am using the ReadHoldingRegisters and at the second cycle the application gets stuck on the read and I have a substantial increase cpu use. I tried to set all the client properties (ReadTimeout, Retries ...) but the problem persist.
I have not experienced the same problem with Modbus TCP.
Here is a simple example showing the problem.
`
tcpClient = new TcpClient(hostname, port);
modbusClient = ModbusSerialMaster.CreateRtu(tcpClient);
modbusClient.Transport.ReadTimeout = 1000;
modbusClient.Transport.WriteTimeout = 1000;