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();
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.