LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean indicator not resetting

I am using Labview 2009 to control an x,y table which moves in a pattern a number of times as selected by the user. The pattern is selected in the case statement and the number of times the pattern is run is set in the For Loop by the value in "GRID" The value of "GRID" is 1-100. I understand that the "i" iteration count is zero for the first time the loop executes.

 

So the Boolean indicator is to show that the For Loop has executed the number of times as set by the value "GRID" I add 1 to i and compare to N which lights up the indicator when the Loop is finished the first time the program is executed, but when I run the program each subseqent time the Boolean indicator remains "ON" and has not reset.

 

Any thoughts about how to solve this?

 

Cheers,

 

Col

0 Kudos
Message 1 of 4
(2,396 Views)

Hi Niloc,

 

 If you just want to reset the indicator you can wire a false boolen constant into the local variable of the indicator by keeping the boolean constand inside the for loop and local variable outside and disabling autoindexing.

Regards,

Nitzz

(Give Kudos to good Answers, Mark it as a Solution if your problem is Solved;)) 

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

Hi,

 

Take a look at the attached example.


Regards,

Nitzz

(Give Kudos to good Answers, Mark it as a Solution if your problem is Solved:smileywink:)  

0 Kudos
Message 3 of 4
(2,384 Views)

Why would you need to update the boolean with the same value N-1 times in a loop??? All you need is update it once before the loop and once more after the loop has completed, right?

 

(With a proper state machine architecture, most likely you don't even need a local variable.)

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