相关文章推荐
腹黑的松鼠  ·  php ...·  1 年前    · 
爱笑的草稿本  ·  用WPS ...·  1 年前    · 
开朗的眼镜  ·  ue4版本不同打不开-掘金·  2 年前    · 
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.
What I have tried:
string ipAddress = " 10.100.10.80" ; int tcpPort = 30000 ; TcpClient tcpClient = new TcpClient(); // Create a new TcpClient object. tcpClient.Connect(ipAddress, tcpPort); ModbusIpMaster modmaster = ModbusIpMaster.CreateIp(tcpClient); modmaster.Transport.ReadTimeout = 5000 ; modmaster.Transport.WriteTimeout = 5000 ; byte slaveID = 1 ; ushort sstartAddress = 1 ; ushort numOfPoints = 10 ; ushort[] holding_register = modmaster.ReadHoldingRegisters(slaveID, sstartAddress, numOfPoints);
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •