LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timed loop inside a while loop

Hi all,
I want to ask if I have a timed loop inside a  while loop ,  the timed loop  does a certain task  a 100 iteration ( each time loop iteration is 2 second duration) each while loop iteration  , at each  while loop iteration the time loop writes the actual time spent to a text file for this certain task.
 
for the next while loop, the timed loop contiues  to write the time spent from the previous while loop ( ex the first while loop the time loop ends the last results with 200 second for a 100  time 2 second duration ), the second while loop  the time loop starts 202 and so on)
 
I would like for the second time loop to restart  and start  again from 2 second and same for the third and foruth time loop )
 
 
attached is my program
Thanks
 
Maple
 
 
0 Kudos
Message 1 of 5
(2,863 Views)
Hi Maple,

Can you please clarify what you are trying to do?  I am a bit confused by your post.  Maybe a table or a picture will help clarify things for me.

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
Message 2 of 5
(2,823 Views)

Hello

yes , I will

thnaks alot

 

 

Maple

0 Kudos
Message 3 of 5
(2,822 Views)

Hi Ching

let me put my question in this way,

 

I have a timed loop, I want to run this timed loop  to perform an action for 2 seconds 100 times, I want to  write  to a text file the time counter for these  100 action ( i.e.) starting from 2 till 200 , if I will  put this time loop in a while loop to do the action twice, the timed loop starts  writing to the text file from 2 second till 200 for the first  while loop ,  for the second while loop it contiues from 202 till 402,

 

my question is how could I reset the  timed loop to start counting for the second while loop from 2 liked the first one

 

 

Hope I was clear this time

Thanks

Wadah

0 Kudos
Message 4 of 5
(2,814 Views)

Hi Maple,

If I understand the question correctly, what you will need to write to file is not the Actual End [i-1], but rather the Actual End [i-1] minus the Actual Start [i].

Please try this out, and let me know if this is not what you were looking for.  Best of luck on your application, and have a wonderful day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 5 of 5
(2,794 Views)