08-13-2009 06:53 PM
I'm new to TCP communications, so please correct me if you see mistakes.
I'm trying to read analog voltages and send the data out as a TCP packet. I've successfully done this.
However, I want to also be able to read an incoming TCP packet and generate a digital signal. I'm not sure how to do this.
I've attached the files below. I simply tried to use the same connection ID and a TCP Read.vi. This portion of the code is located at the lower left corner of the timed-loop.
Does this look correct? I am not convinced this will work.
08-16-2009 03:35 AM
Hi FLng,
you can read and write simultanelously. You can build a connection from client to server, then you can write from client to server and from server to client. In you case i don't see the second writer. Where do you get the data from which you want to read in your timed loop?
Mike
08-16-2009 05:56 AM
I have a blog post (link below) which covers this - look for "Beginner's Guide to TCP".
In short, a TCP connection is like a telephone connection: you can send both ways without problems.
You use the same CONN ID to go both ways.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-03-2009 11:18 AM
MikeS81,
You were right. I forgot to include the other TCP write. I've figured out the communication. Thanks for the response.
09-03-2009 11:22 AM
Steve,
Thanks for the response. I've figured out the TCP communication, but read your link anyways. I think you did a really good job breaking the TCP communication down to simple basics.
To all readers who came to this posting trying to learn about TCP communication,
Read Steve's description at http://tipsandtricks.culverson.com/?p=8