10-16-2007 05:09 PM
![]() |
tcp.vi (31 kb) |
10-16-2007 06:47 PM
I would highly recommend looking at the Example Finder and look at the TCP communication examples. Also look at the context and labview help for the TCP functions.
With your TCP read, the defaults (since none of the control inputs are wired up) cause it to read in all bytes present after the timeout of 25 seconds occurs. That means it will take a long time to get data. It may be incomplete, or it may be getting multiple data points (depending how the other device is sending data). And the code you have only handles one point at a time.
Another thing I'm not sure about, and someone with more TCP communication experience should answer, is whether you can read and write to the some open port connection.
I would also recommend cleaning up the code by straightening wires, set up data flow from left to write. Replace the False constant in you main loop with a stop button control. As you have it now, the only way the code will stop is if you hit the abort button. When that happens, the TCP close command that occurs after the loop cannot execute.
10-17-2007 08:58 AM