01-15-2014 05:14 PM
I want to write data to a c-program and also read data from it right after through a TCP connection. How can I implement both options to a single VI.
I'm sending arrays of pixel values to the -program, then the it will send the arrays back to me. I have made a suggestion, but I don't know whether it is correct or not.
The VI is uploaded and shown in the image below
Solved! Go to Solution.
01-16-2014 12:49 AM - edited 01-16-2014 12:49 AM
Please keep all your related questions in a single thread, and fix your code! We've already explained why you can't read a single byte and typecast it to a 4-byte value for the number of bytes to read, but you keep showing the same image. Also, if you test your code you will probably figure things out much faster than posting here. There's nothing special about putting TCP read and write in the same VI.
01-16-2014 06:04 AM
01-16-2014 08:26 AM
Yes, you can read from and write to the same connection. Why wouldn't it be possible? I don't understand why you're asking the question. Did you try it and have a problem? If you didn't try it, you could at least have opened one of the many TCP examples that ship with LabVIEW and demonstrate this, you don't even need to write any new code to see it. If you do have a problem, then ask specifically about that issue.