LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I transfer a file through a TCP connection?

What's the fat pink line at the bottom of the TCP symbol in the picture you posted?
0 Kudos
Message 31 of 38
(1,579 Views)
Hi ekarl,
that´s the error cluster, the color has changed with LabView 8.x.

Mike

Message Edited by MikeS81 on 06-14-2008 09:32 AM
0 Kudos
Message 32 of 38
(1,575 Views)
Hi MikeS81,

Thanks for your patience. Smiley Happy I have fixed all the error signals but i'm still having a problem. I think everything after the read from file vi will work fine, but at this point I'm having a problem with the read from file vi itself. I've connected it according to your specifications, and labview does not give me an error before I run the vi, but during (i have the highlight execution on for debugging purposes) it gives me the error 116 I mentioned earlier. The problem is not getting the wiring to the TCP, but the  read from file funtion(the one that should give me a binary string to send) just doesn't  output any data at all (except the first four bytes).  What is going on?
0 Kudos
Message 33 of 38
(1,568 Views)
Hi ekarl,
try this example to read the file.

Mike
0 Kudos
Message 34 of 38
(1,563 Views)
Oh my gosh, THANK YOU so much!!! (It worked). I made it a sub vi and now the TCP sending works greatSmiley Happy One more stupid question and I promise I will leave you alone, I save the data from the recieving TCP as a .JPG file, and it shows up fine in my file browser, as a .jpg file, but when I click on it it thinks a lot but doesn't open. Any ideas?

Again, Thank you a bunch!!!!!Smiley Very HappySmiley Very HappySmiley Very Happy
0 Kudos
Message 35 of 38
(1,558 Views)
Hi ekarl,
now i can open your vi´s. Smiley Happy Try it with following, connect a false constant to the "prepend array or string size" on the write file funcion.

Hope it helps.
Mike

Message Edited by MikeS81 on 06-14-2008 10:39 AM
0 Kudos
Message 36 of 38
(1,553 Views)
TeeHee, you are the BEST!!! Yes, it works quite nicely now. If you have a minute do you mind explaining why the false constant was needed? I'd like to understand what's going on behind the code. But anyways thank you again for putting up with the silly questions and for the VI. Very much appreciated!!!

Thanks Smiley Tongue
0 Kudos
Message 37 of 38
(1,550 Views)
Much of what you're asking is explained in the LabVIEW Help on those functions. Have you tried reading it?

To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
Message 38 of 38
(1,527 Views)