LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCPIP and threading issues

Solved!
Go to solution

I have an application where I use a Listener to make a connection with a board on another machine.  After making the connection I use the reference to send msgs to the other machine with no problem at all.  Now I added another thread and ran the reference also to that thread.  The idea was to send tcpip msgs from one thread and to receive tcpip msgs in the other thread.  I am not worried about collisions since the sent msgs are commands to embedded software which are mainly setup information and occasional commands such as start and stop.  The received msgs are also only occasional and are intended to reflect status of the embedded process when running.

 

The msgs being sent out are OK, but when I made the embedded code an 'echo server', I immediately ran into the problem that the receiving thread does not work at all.  Is there something wrong with using the tcpip reference in two separate loops?  (I would have put a send and receive VI in the original thread is there would always be a send and then a received msg, but that is not the case).  I know the msg is being sent with the correct data as I can monitor the packet sent as well as the tcpip ack msg coming back with a tool called Wire Shark.

 

This may be related to my post regarding TCPIP error checking.

0 Kudos
Message 1 of 4
(2,665 Views)
Solution
Accepted by topic author hounddog

hounddog wrote:

This may be related to my post regarding TCPIP error checking.


And it is here

0 Kudos
Message 2 of 4
(2,663 Views)
I did a lot of experimenting today and found out the faulty checksum does not stop the LabVIEW VI from rcving and decoding the data packet!
0 Kudos
Message 3 of 4
(2,643 Views)
I also found out that the two loops can work from the one reference!  At least at the slow rates that I am using there are no problems now that I have the correct endianess.  Thanks for replies.
0 Kudos
Message 4 of 4
(2,642 Views)