Tcp Comunication with PC

I always use the Error List in the forums.

The error in your case probably clearly states the problem… You have already opened the comm handle and so when you go to open it again in your code, you get the -17 which says the port already in use and locked to the other comm handle.
Only use one comm handle at a time. Open it, and use it. Only close it when you are done. Don’t open and close it all the time.