LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read public IP with labview?

Then i think is my laptop, i dont know why IE doesnt open that particular page.... I have IE7.
Maybe i try on another computer and then i tell you the results
0 Kudos
Message 11 of 19
(1,732 Views)
Remember that you can always use the standard TCP/IP functions to get the HTML directly. The attached is an example (LabVIEW 8.0) using whatismyip.org.
Message 12 of 19
(1,717 Views)
Thank you Mercurio, your the hero Smiley Wink

It worked ok and it is much simple than using ActiveX objects. Yes i know because of you that i could have used HTML but i have no expertise in HTML basics or programming guides that could help me to understand how it works and how i could extract an exact string out of it. Did you made that VI? it is very helpfull and educational.

I will use it to aquire my IP from time to time and if i detect a diferent IP than the last one then i will send the new IP to a remote modem in order to make him comunicate with me. Thank you very much again.
0 Kudos
Message 13 of 19
(1,708 Views)
Yes, I made that VI. It simply sends the HTTP "GET" command, which is exactly what a browser does, and then reads back the returned text. The response from the server consists of a header part, which is what the loop in my example reads out. One of the lines in this header indicates the number of bytes that make up the textual response from the server. Usually this is the HTML. In the case of whatismyip.org, the server simply returns the IP address with no HTML tag "flowering".

The HTTP 1.1 specification is fully defined here.
Message 14 of 19
(1,702 Views)
Hi, smercurio!
 
Could you please post your VI as LabView 7.1? or an image of block diagram ??
 
Thanks in advance !!
0 Kudos
Message 15 of 19
(1,680 Views)
Attached is the 7.0 version.

The important bit to remember is that HTTP uses CRLF (carriage return+linefeed) to terminate lines, so when you create the string constants in LabVIEW you need to use CRLF. LabVIEW will use just LF by default. You can switch a string to display '\" codes and insert the \r code to insert CR characters, which is what I did.
Message 16 of 19
(1,664 Views)
Thank you !!
0 Kudos
Message 17 of 19
(1,653 Views)

Very helpful vi. 

Thanks smercurio 

0 Kudos
Message 18 of 19
(1,637 Views)


smercurio_fc wrote:
Remember that you can always use the standard TCP/IP functions to get the HTML directly. The attached is an example (LabVIEW 8.0) using whatismyip.org.



I love learning new stuff like this... Smiley Happy
SteveA
CLD

-------------------------------------
FPGA/RT/PDA/TP/DSC
-------------------------------------
0 Kudos
Message 19 of 19
(1,631 Views)