LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Estimate the time delay between two computers

Solved!
Go to solution

Hello, everyone.

 

I want to develop a program for communicating between two ip addresses:

 

IP1: 192.168.1.100

IP2: 192.168.1.101

 

Assume IP1 is the server and IP2 is the viewer, then I want to set up a program for estimating the time elapsed for IP1 to communicate with IP2, but I don't know how to do it.

 

Also, I want to display the elapsed time for the connection (which is varying due to internet fluctuations), by performing actions like continuously "pinging" the receiver from the server. Can anyone show me the way for doing this? Thank you very much.

 

Best Regards,

yukfai88

0 Kudos
Message 1 of 8
(3,774 Views)
Solution
Accepted by topic author yukfai88

please don't shout 😛

 

How about using ping? 

Feed the output  into a scan from string to read the value you need. Sorry my OS is answering in german so you will have to adapt it 😉

ping.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 2 of 8
(3,766 Views)

Hi, Henrik Volkers.

 

Thanks for your help. It may be the subprogram I need, but I want to ask what is the icon that immediately comes after constant "ping -n 127.0.0.1".

 

Regards,

yukfai88

0 Kudos
Message 3 of 8
(3,750 Views)

Hi yukfai,

 

it's called "System Exec" Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,738 Views)

Thanks, GerdW. I can find it now, but I also want to ask what is the format string in the "Scan from string" vi, which is "Mittelwert\s=\s%dms". Thanks a lot.

 

Regards,

yukfai88

0 Kudos
Message 5 of 8
(3,707 Views)

yukfai88 wrote:

Thanks, GerdW. I can find it now, but I also want to ask what is the format string in the "Scan from string" vi, which is "Mittelwert\s=\s%dms". Thanks a lot.

 

Regards,

yukfai88


If I'm reading it right, that will extract the average ping time (using german ping output though, you'd want Average instead of Mittelwert if your ping language is english)

0 Kudos
Message 6 of 8
(3,693 Views)

And it is a useful habit to RTFM ....for the ping command enter "ping -?"  in a cmd-window (I prefer "man ping" ... however that is in another world 😉

 

In my example the "-n 1" tell ping to only use one request so there is no meaningful average 😛

 

Message Edited by Henrik Volkers on 03-24-2010 10:51 AM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 8
(3,675 Views)
Thank you everyone. I am now able to get what I want.
0 Kudos
Message 8 of 8
(3,651 Views)