LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow execution

Hello,
This VI is suppost to ping three ip every 10mins and open a web browser when the bottom is clicked. I'm having a problem of delay when the bottoms are clicked it takes a while for execution. Is there anything I can do about this? Thank you!
 
-Than  
0 Kudos
Message 1 of 5
(2,957 Views)

Hi Guber,

the for loop in your timed loop, get every iteration of the timed loop a bigger loop count number. so it could be that this is the problem. Why do you have so much loops? I´m not sure if you ever leave the timed loop.

I think your code is very complex for what you describes.

Mike

0 Kudos
Message 2 of 5
(2,942 Views)
You code is very bizarre.
 
Since there is a data dependency, the lower loop can not start until the upper loop has finished, at which point the lower loop stops after one iteration.
 
You seem to abuse FOR loops as a poor man's case structure via the iteration count. As I said, very bizarre!
 
If you want to read the terminal of the refresh button inside the time loop, ther terminal belongs inside the loop.
 
Can you explain the bitwise logical operation of the loop couter with the 0|1 I16 from the button????
 
How do you stop the timed loop?
 
 
To have everything responsive, use an event structure with a long timeout case for the stuff that should happen at long intervals. Make events for the other buttons so they can immediately override.

All you need is a single loop and a single event structure!

Message Edited by altenbach on 02-21-2008 10:06 AM
0 Kudos
Message 3 of 5
(2,931 Views)
?The time loop is to execute the ip ping every 10 mins. Would the VI work better with a seq loop?
0 Kudos
Message 4 of 5
(2,911 Views)


Guber wrote:
?The time loop is to execute the ip ping every 10 mins. Would the VI work better with a seq loop?

No!!!! Whenever you sequence things, your code becomes even more constipated. LabVIEW works best if things can happen in parallel! 😄
 
You need to familiariize yourself with dataflow. Run your code with execution highlighting for some clues.
 
A timed loop is for precision timing and I don't think that your 10mins need to be accurate down to milliseconds.
 
If you trap the code in a slow loop, it cannot do other things (e.g. respond to a button press, etc.)
 
As I said, use an event structure with a 10minute timeout case where you place your ping code. You might want to recalulate the timeout whenever other events occur.
 
For a related discussion, have a look at my old example here:
 


Message Edited by altenbach on 02-21-2008 11:11 AM
0 Kudos
Message 5 of 5
(2,908 Views)