11-28-2020 02:03 PM
I am trying to build an LED control which is part of a security system. The idea is that when the switch is turned on or off(depending which one) the LED will change colour accordingly. It is supposed to communicate between client and server using TCP. But I keep getting an error 60 for the server portion. I have tried changing the ports but the issue seems to persist. Can anyone please help me? I need this done in 2 weeks
Untitled 1 is my client
Untitled 2 is my server
11-28-2020 03:03 PM
Why do you need so many connections? Why don't you use one connection, keep it open while the VIs are running and close connection before the VI finishes. When one switch changes its state, you can send a message containing 2 bytes: first byte with the index of the switch and second byte with the value. Use a greater value for the port: eg 64000.
11-28-2020 03:32 PM
Your server VI is a 1-shot VI. It will sit there waiting for connections at each of those listens, but once it happens, that line of code executes, you'll never be able to open a connection on port again unless you stop and restart your VI.