05-18-2006 01:58 PM
05-18-2006 02:33 PM
Are you actually using two seperate loops to talk to the two servers as shown in the example?
If you are then I see no reason one loop should affect the other. If you're not, then a good way of handling different connections in the same loop is by creating an array of refnums and auto-indexing through it or spawning a dynamic VI for each connection (see the example finder).
If this doesn't help you I suggest you explain more clealy what you mean by "picks one". If you want to see a tutorial on using such a communication protocol search the site for "TCP messaging".
05-18-2006 02:38 PM
Do you have a tutorial in mind? Everyone I read talks about one server handling two clients, but not the other way around.
When I say "picks one" I mean that one of the client while loops (which run independently) will communicate normally with its server, and the other does not make the TCP connection at all. It seems whichever while loop the client's processor executes first wins, and the other is shut out. If I delete one of the client while loops, the other will work everytime. Its really frustrating.
05-18-2006 03:40 PM
Although I missed the fact that the FPs are the servers, I don't believe this matters - the client\server part is only about how you establish communication. One of the examples in the example finder should show how to decouple the connection part from the communication part.
In any case, I still don't see why this doesn't work. Unless you're doing something like assigning the same local port to both loops or making them somehow dependant on each other this should work properly. We might need to see an image of your actual code.
BTW, if you're only transferring a single piece of information, you could think about doing this another way, like publishing a data item which you can read with the FP VIs (although I don't remember if you can do strings and complex data types) or the RT comm wizard.