LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp and udp

hello everyone,
 
I got a question here, while i study the manual inside labview7 i saw about some examples about TCP/IP and UDP client server, i had tried all of it. Suddenly i come out a an idea so i post it up at here, hoping someone can help me to solve about this. The question is about can i enhance those  TCP/IP and UDP client server and make client side can get sources from server side? because what i found is those example are only show out the connection and port number, but not actually working for file transfer. So, is it possible for me to enhance it?
 
Regard
Jaxx
0 Kudos
Message 1 of 11
(4,482 Views)
@,

TCP and UDP are protocols for communication between different applications which can be located on different networkdevices.
Therefore datatransfer is one possible target of this connection.
TCP is a strict Client/Server-relation, UDP can be used in this way as well. Nevertheless, Server means only an "Application which delivers services at request". A Client can request these services from a server. So if your Client send a "Request_Data" (or however you call this in your application), the server will send the appropriate data.
However, i would suggest that you use FTP if you like to transfere a larger amount of data.....

hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 11
(4,484 Views)

Thanks for your reply Norbert J

 

Actually I’m planning to develop a multi protocol server interface that having TCP, UDP and other protocols that can choose by user (and client side too), so user can choose any kind of the protocol they need and make file transfer. But what I found in the manual is only mentioned about TCP and UDP, so I wondering is it possible use labview to develop other kind of protocol such as FTP as client and server to do the file transfer? Sorry if you feel confuse about what I mentioned, because my english is not that good...

 

Regards,

Jaxx

0 Kudos
Message 3 of 11
(4,463 Views)
The LabVIEW TCP/IP functions allow you do to anything you want, but its' probably not worth to reinvent the wheel. Letting the user choose from a smorgasbord of options seems silly. Most end users that I have seen don't even know the difference between TCP and UDP. 😉
 
TCP and UDP have very different purposes, so typically only one is appropriate for a certain application.
 
TCP is connection based. The protocol ensures complete and accurate delivery even in the presence of packet loss, duplicate packets, and packets arriving out of order. Both the server and client are fully aware of the connection state. Once a connetion is established from the clinet side, data can flow in both directions at will.
 
UDP is connectionless and is mostly used for simple one-way communications where packet loss is acceptable. Of course it is possible to use UDP for deterministic transfer, but then you need to do everything in software (packet sequence numbering, packet receipt acknowledgements, retransmission requests, etc.).
 
I'm sure a good programmer could sit down for a few weeks and, using only LabVIEW, write a full featured ftp server and client that supports most popular options (e.g. port mode an passive mode). But why???
 
Have a look at the datasocket tools. They support e.g. ftp transfers directly.

Message Edited by altenbach on 01-24-2007 09:59 AM

0 Kudos
Message 4 of 11
(4,459 Views)
The internet toolkit has FTP functions built into it.
0 Kudos
Message 5 of 11
(4,438 Views)

Thousands thanks for you guys’ reply!!! I think I have a direction to go through. But I think the resource for me to study is not enough, so does anyone know where can I get more resource for developing a FTP client server? if possible, I would like to have some introduction about internet toolkit functions and also about DataSocket, because i not sure i understand all those *.exe inside "National Instruments\DataSocket".

Again thanks you guys, I really appreciate it! 

 

Best regard

Jaxx

Message Edited by @ on 01-25-2007 12:08 AM

Message Edited by @ on 01-25-2007 12:09 AM

0 Kudos
Message 6 of 11
(4,426 Views)

Another question here, is it i have to buy to get the internet toolkit? i mean FTP functions.

0 Kudos
Message 7 of 11
(4,413 Views)

Hi Jaxx,

You can find more information about DataSocket and how to use it with FTP in this Developer's Zone tutorial.  This includes a quick example as well as additional links you may find helpful.  DataSocket is well-suited for simple data retrieval from FTP servers, while the VI's available in the Internet Toolkit allow you better control of your FTP operations.

With regards to the Internet Toolkit, this is an add-on product you can purchase to extend LabVIEW's functionality.  Hopefully that helped clarify things for you, but if not, just let me know!

 
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 8 of 11
(4,394 Views)
hi matt P,
 
Actually, i still a student, studying... so i don't think i can afford 2500 buck for the add-on internet toolkit, so anyone can help me about this? hope to get the reply as soon as possible... thanks!
 
Regard
Jaxx
0 Kudos
Message 9 of 11
(4,365 Views)

I am still not entirely clear what you actually want to do. Why would you need LabVIEW to transfer files at all?

Just enable windows file sharing and share the approriate folders. Now files on the other computer are accessible as easily as local files, even from within LabVIEW. Given proper permission settings, each LabVIEW application can write and read files located on the other computer using plain File I/O functions and using full UNC paths. To move files between computers, use the plain "copy file" functions with approriate source and destination paths. Let the OS do all the dirty work! 🙂

If your LabVIEW programs need to communicate directly via the network, use the datasocket mechanism or the new network shared variables. The plain TCP/IP tools are rarely needed anymore and you definitely don't need the internet toolkit.

What LabVIEW version do you have?

0 Kudos
Message 10 of 11
(4,361 Views)