LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a progress bar showing status on timeout of TCP Read function

Is there any way of creating a progress bar showing the status of a 'TCP Read timeout' time ... ?

I'm sending a data request to an intranet server via TCP Write, and then using TCP Read with a 2 min. timeout to receive the requested data. During this time i want to show the actual progress of the timeout in a progress bar.
Can this be done?
And do i have to implement some kind of multitasking to make it happen?

TIA
0 Kudos
Message 1 of 4
(2,876 Views)
Soulstorm wrote:

> Is there any way of creating a progress bar showing the status of a
> 'TCP Read timeout' time ... ?
>
> I'm sending a data request to an intranet server via TCP Write, and
> then using TCP Read with a 2 min. timeout to receive the requested
> data. During this time i want to show the actual progress of the
> timeout in a progress bar.
> Can this be done?
> And do i have to implement some kind of multitasking to make it
> happen?

It can be done and you need to do some multitasking yes, but that is
quite easy in LabVIEW. A separate loop or subVI with loop will be
responsible for the progress bar. Set its scale to 0 and the number of
seconds of your timeout. In parallel to the TCP Read let this loop or VI
execute reading the time every few
seconds and calculating the
difference to its start time, passing this value to the progress bar
slider. Have an extra boolean global which aborts the loop and set this
boolean to FALSE before starting the loop/VI and TCP Read and setting it
to TRUE on return of the TCP Read.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 2 of 4
(2,876 Views)

Hi,

       I am also trying to implement the same logic. In my application i may need to show the progress bar for 40 minutes. I have already implemented the progress bar seperately but the thing is i should know the status of network because if the network is failed & still i am progressing till 40 min than after that i am showing that network fail..Not a good option..

Hence i want to know the following.

1. How to implement the progress bar in TCP when the number of bytes to be read is unknown.

2. How to check whether network communication is OK.

3. How to read the number of byte read so far.

 

If you all implemented this than this will be great.

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 4
(2,345 Views)

@Ranjeet_Singh wrote:

Hi,

       I am also trying to implement the same logic. In my application i may need to show the progress bar for 40 minutes. I have already implemented the progress bar seperately but the thing is i should know the status of network because if the network is failed & still i am progressing till 40 min than after that i am showing that network fail..Not a good option..

Hence i want to know the following.

1. How to implement the progress bar in TCP when the number of bytes to be read is unknown.

2. How to check whether network communication is OK.

3. How to read the number of byte read so far.

 

If you all implemented this than this will be great.

 


This has been reposted as its own question: http://forums.ni.com/t5/LabVIEW/TCP-progress-bar/td-p/2163742

0 Kudos
Message 4 of 4
(2,310 Views)