LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Managing Multiple TCP Callbacks/Interrupts

I have 2 identical embedded devices from which I am attempting to acquire data using TCP/IP and write this data to file. Each sample I'm attempting to acquire is 312bytes and in this development phase I would like to acquire at 100Hz for each device.
 
Using ConnectToTCPServer (...) I establish two independent connections which point to the same TCPCallback function. (I manage which TCP Handle invoked the callback in this function). The problem is that one connection seems to take dominance over the other thus hindering any data transfer from one of the devices. 
 
How can I fix this issue and pay an equal amount of attention both device's TCP calls?
 
Thank you,
Craig
0 Kudos
Message 1 of 2
(2,765 Views)
Hey Craig,

I think it's best if you take a look at the MultiClientServer or the MultiThreading examples included with LabWindows/CVI.  You can find these examples by going to Help»Find Examples and searching for TCP/IP.  This is the appropriate way to handle multiple clients using TCP communication; if you architect your program this way, it should clear up your issue with the blocking.

Hope this helps!
Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 2 of 2
(2,717 Views)