LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with duration of timed while loop!!

hi attached is my vi.
I want to control the duration of timed while loop with the control named duration, as can be seen in my vi.
But problem with this is, as soon as I change the value in my duration box, the duration of the loop doesnt get updated at that time. Like If the loop is currently running at 2000ms duration , if I wanna change it to 1000 I've to abort the execution of  the program,change the control value and than run the code again. Isn't it possible that just by changing the value in my duration box, I can change the time duration of my timed loop, without aborting the execution.
Looking for help,
.Regards

0 Kudos
Message 1 of 6
(3,301 Views)
The problem is that the inner loop parameters are set outside that loop so the only time the inner loop gets reinitialized is when it stops and the outer loop restarts it. However your code as written doesn't provide a way to stop the inner loop so it can be reinitialized...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 6
(3,293 Views)

To change the period while it is running, you should wire the timed loop as shown below. What you've done is the equivalent of wiring a value from outside a while loop and expecting something inside to read it once the loop starts.

Message Edited by Dennis Knutson on 06-27-2007 06:16 PM

0 Kudos
Message 3 of 6
(3,290 Views)
Learning the basics of dataflow is easy if you simply watch your diagram in highlight execution mode. Try it!
 
In this particular case, the outer loop serves no purpose at all, all you need is the timed loop.
 
 
 

Message Edited by altenbach on 06-27-2007 05:24 PM

0 Kudos
Message 4 of 6
(3,288 Views)
Great! That works cool...
Please could you clarify it,what is highlighted execution mode...I really wanna know it???
Looki8ng for reply
Rohit
0 Kudos
Message 5 of 6
(3,281 Views)
On the diagram, press the button with the lightbulb on it to turn it on. Now run your VI. Everything will happen in slowmotion and you see how the data "flows" along the wires and in what order things execute. Operate the FP controls etc. and keep watching the diagram. 😄
0 Kudos
Message 6 of 6
(3,278 Views)