LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP Com Basic Question

I have never been successful in using the TCP/IP functions to open a session to even so much as get content from a website.

Does anyone have an example. I think I am missing some very key elements, and the examples database isn't much help.

In answering, please keep in mind that I have NEVER done anything with TCP/IP. Datasocket is not what I am looking for, because I want to do things more detailed, such as port scanning and listening, etc.

Thank you,
0 Kudos
Message 1 of 5
(2,437 Views)
Hi,

to get a content from a website check out:

http://www.mooregoodideas.com/Downloads/Downloads.htm

(or http://www.mooregoodideas.com press MGI Free Downloads)


The WebINet Driver does exactly this. Also lots of other interresting code
on this site...

Regards,

Wiebe.


"Labviewguru" wrote in message
news:50650000000800000079370000-1007855737000@exchange.ni.com...
> I have never been successful in using the TCP/IP functions to open a
> session to even so much as get content from a website.
>
> Does anyone have an example. I think I am missing some very key
> elements, and the examples database isn't much help.
>
> In answering, please keep in mind that I have NEVER done anything with
> TCP/IP. Datasocket is not what I am looking for, because I want to
do
> things more detailed, such as port scanning and listening, etc.
>
> Thank you,
0 Kudos
Message 2 of 5
(2,437 Views)
Cool! A chance to help the Guru.

Check-out the Jeffrey Travis book. The sample CD came with examples to access web-pages. The book was a great read with lots of background info and examples.

I hope this helps,

Ben

P.S. Thanks for your frequent answers on this forum.
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(2,437 Views)
Ben,

I have the book here, I guess I should sit down and read it.

Thanks for the help.
0 Kudos
Message 4 of 5
(2,437 Views)
Probably the AppNote 160 ("Using LabVIEW with TCP/IP and UDP" [http://zone.ni.com/devzone/conceptd.nsf/webmain/BA7F1D7CE009BE7686256A5B004F335D?OpenDocument]) will be a good companion for tcpex.llb (in lv\examples\comm\ folder).

Generally, is something like this ...

- a TCP communication is between two IP addresses, each one of them having a port assigned for a specific connection (you can do it on the same machine, using as address "localhost" or "127.0.0.1" and two DIFFERENT ports). Try to use port numbers greater then 1024

- the one playing the server role has to LISTEN on a port in order to detect possible incoming communication requests

- the other one (the client) has to CONNECT to server's address and port

- after the communication is estab
lished, each one can send characters to the other (here you should have your own protocol implemented or a standard one (depends what you are trying to do) like HTTP, FTP ... it's something like a little language (for example, if you want to post some data on a web server, you will send a string like "POST something"))

- both client and server can CLOSE the communication at any time

Hope this helps somehow ...
0 Kudos
Message 5 of 5
(2,437 Views)