LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop loop

Hi, i want to stop execution the vi in a loop when it running greater than 5 sec.
 
how can I do it?
 
thanks
0 Kudos
Message 1 of 6
(3,041 Views)
I am assuming that you want to pause your code after 5 seconds of execution. I suggest
 
1. Implement a timer into your code. i.e Elapsed Time = Current Time - Start Time
2. Wire the elasped time result to an indicator or a boolean when its greater than your target time.
3. Place a conditional probe on the wire that has the elasped time and set it to >= 5 or 5000 if you are in ms.
 
Like this
 
Message 2 of 6
(3,031 Views)

David:  I don't know why, but your picture came out looking like this:     

Here is what I believe you intended to convey:

Message Edited by tbob on 10-20-2005 11:09 AM

- tbob

Inventor of the WORM Global
Message 3 of 6
(3,013 Views)

tbob,

Thats odd. It looked ok on my pc at work. Might be doing something daft. I used the "Insert an Image" from the tool bar and supplied the path to jpg in my pictures. Is that right?. I am a newbie to the forum so I might not be getting the "reply to post" message thingy right. Might be safer to stick to attaching vi's.

Your picture is identical. I had conditional probes in the right place to PAUSE the code for debug.

Thanks for the heads up. 

David

Message 4 of 6
(2,997 Views)

Is the path you supplied to your local hard drive?  If so, then maybe that is why you can see it and I can't.  You are supposed to do these steps:

Create your message and attach your picture file using the Browse button below.

Submit the post.

After the post is posted, click the Options menu on the right side above your post.

Select Edit Message.

When the editor comes up, click on the attached file link.  This will open the picture file from NI's website where it was uploaded when you submitted the post.

Click on the URL of the picture and copy it.

Click the back button to get to the editor.  Then click the Insert An Image button and paste the URL there.

Submit the post again.  Now the picture should show up for everyone to see because the URL is from NI's website, not from your local hard drive which we don't have access to.

If you are doing all of the above, then I really don't know what is wrong.

 

- tbob

Inventor of the WORM Global
Message 5 of 6
(2,989 Views)
Thanks tbob. I am not doing as you say. An you are right the picture is local to my pc hard drive. Doh!
 
Take 2.....
 
I am assuming that you want to pause your code after 5 seconds of execution. I suggest
 
1. Implement a timer into your code. i.e Elapsed Time = Current Time - Start Time
2. Wire the elasped time result to an indicator or a boolean when its greater than your target time.
3. Place a conditional probe on the wire that has the elasped time and set it to >= 5 or 5000 if you are in ms.
 
Like this
 
 

Message Edited by David Crawford on 10-21-2005 01:12 AM

Message 6 of 6
(2,986 Views)