From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-23-2009 03:26 PM
Hello,
I have a simple TCP Client (ClientSendRx.vi) which receives string from the server(TCPServer.vi) end and displays the received String. I am facing the following problems:
1. When I press Stop button at ClientSendRx.vi, I get 'Error 1 occurred at TCP Close Connection'. What should have happened is that the 'Stop' button should stop the while loop and the TCP connection should have closed and lit either Boolean or Boolean 2 LED depending upon the error status.
2. Under debug mode, when I hit Stop at ClientSendRx.vi , it changes the value from False to True, but does not stop the while loop as it does when not in debug mode.
Please advise where I may be going wrong.
Thank you.
Regards,
H.
Solved! Go to Solution.
12-23-2009 10:43 PM
12-23-2009 11:35 PM
muks wrote:
check this
Ummm... muks, what in the world do the SMTP VIs have to do with the above issue? Other than the fact it mentions error 1 I see no bearing of that KB article to this issue.
To OP: You have two different problems:
In general, it is not wise to wire a Boolean constant to a loop condition terminal, as you did in the server VI, as this creates an infinite loop. You should wire a Boolean control so you can actually stop the loop without having to resort to the Abort button.
Tip: Use the Empty String/Path? function rather than checking if the string length is zero.
12-23-2009 11:45 PM
From the kb
The internet service provider (ISP) might be blocking the TCP port
12-23-2009 11:53 PM
muks wrote:From the kb
The internet service provider (ISP) might be blocking the TCP port
What does the ISP have to do with a local connection? Sorry, muks, but I think you're really reaching on this one...
12-24-2009 12:33 AM - edited 12-24-2009 12:34 AM
You have a second TCP close behind the while loop. Once the connection is closed once, the connection ID is invalid and the second close will generate an eror.
Press the "clean up diagram" button to move the hidden TCP close to a visible location. Now delete one of the TCP close functions.