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
Sorry, it may be caused by other reasons later, so close this Issue!
.............................................................................................
I use the network to read multiple Modbus devices.
Some devices can connected.
But, no response after calling ReadHoldingRegisters.
And get a exception.
...............................................................................................
ModbusFactory.CreateMaster(TcpClient);
(TcpClient.Connected is true)
Call ReadHoldingRegisters
exception:
System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at Modbus.IO.TcpClientAdapter.Read(Byte[] buffer, Int32 offset, Int32 size)
at Modbus.IO.ModbusIpTransport.ReadRequestResponse(IStreamResource streamResource)
at Modbus.IO.ModbusIpTransport.ReadResponseT
at Modbus.IO.ModbusTransport.UnicastMessage[T](IModbusMessage message)
at Modbus.Device.ModbusMaster.PerformReadRegisters(ReadHoldingInputRegistersRequest request)
at Modbus.Device.ModbusMaster.ReadHoldingRegisters(Byte slaveAddress, UInt16 startAddress, UInt16 numberOfPoints)
at Modbus.Device.ModbusIpMaster.ReadHoldingRegisters(UInt16 startAddress, UInt16 numberOfPoints)
...............................................................................................
After using other Modbus Client tools and comparing packets.
I recompile NModbus so that it can add CRC to the packet.
Confirm that ReadHoldingRegisters can work normally after testing
Not sure if my use of NModbus is correct.
If there is no problem in use.
When NModbus uses Modbus TCP, the function of setting whether CRC is enabled or not needs to be added.
Thank you!
The text was updated successfully, but these errors were encountered:
Sorry, it may be caused by other reasons later, so close this Issue!
.............................................................................................
I use the network to read multiple Modbus devices.
Some devices can connected.
But, no response after calling ReadHoldingRegisters.
And get a exception.
...............................................................................................
ModbusFactory.CreateMaster(TcpClient);
(TcpClient.Connected is true)
Call ReadHoldingRegisters
exception:
System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at Modbus.IO.TcpClientAdapter.Read(Byte[] buffer, Int32 offset, Int32 size)
at Modbus.IO.ModbusIpTransport.ReadRequestResponse(IStreamResource streamResource)
at Modbus.IO.ModbusIpTransport.ReadResponseT
at Modbus.IO.ModbusTransport.UnicastMessage[T](IModbusMessage message)
at Modbus.Device.ModbusMaster.PerformReadRegisters(ReadHoldingInputRegistersRequest request)
at Modbus.Device.ModbusMaster.ReadHoldingRegisters(Byte slaveAddress, UInt16 startAddress, UInt16 numberOfPoints)
at Modbus.Device.ModbusIpMaster.ReadHoldingRegisters(UInt16 startAddress, UInt16 numberOfPoints)
...............................................................................................
After using other Modbus Client tools and comparing packets.
I recompile NModbus so that it can add CRC to the packet.
Confirm that ReadHoldingRegisters can work normally after testing
Not sure if my use of NModbus is correct.
If there is no problem in use.
When NModbus uses Modbus TCP, the function of setting whether CRC is enabled or not needs to be added.
Thank you!
The text was updated successfully, but these errors were encountered: