LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED

Hi
 
Question on LED, Is it possible to turn on/off based on the comparator value.
 
Actually i have the program, I am running a program in continuos mode and i got a separate switch (start program)to set the condition to Case strucutre.When it is true i have set the LED to turn on based on the comparator output(turns on when true,no light when false). when i try to run the program 2nd time i will press the switch to start,still the LED is ON, i need to turn off when press the switch to start the program further.
 
Thanks
0 Kudos
Message 1 of 9
(3,959 Views)
Well, the obvious question is: what is the comparator comparing?

Also, if by continous run you mean that you're pressing the continuous run button in the toolbar, don't use this. Your code should use a while loop that you stop using a Stop button.
0 Kudos
Message 2 of 9
(3,953 Views)
Comparator is just the counter values, yes i need to continuosly do the measurements so i thought i will put that continuos mode on the tool bar.
0 Kudos
Message 3 of 9
(3,949 Views)
"Comparator is just the counter values" - This doesn't tell me anything. What counter? I can't see your code, nor do I know what you're doing, so please post your code.

As I indicated, you should not use the continuous run button for normal operation. It should be used only for specific debugging situations. This isn't one of them.
0 Kudos
Message 4 of 9
(3,944 Views)

Hai vrk,

Please post ur code or give a screenshot of it.

As smercurio told don't use continuous run button. Use normal run button and use a while loop outside ur code and wire a false constant to it and that will run ur code continuously.

Thanks,

Mathan

Message 5 of 9
(3,899 Views)
Thanks Smercutio and mathan
 
I got the problem sorted,its working good.
 
Thanks
0 Kudos
Message 6 of 9
(3,881 Views)

Dear vrk,

Great to hear that you worked it out.Smiley Wink

If you post how you solve it, it would be better for other people who will search in the forums for the same problem.Smiley Happy

Thanks,

Mathan

Message 7 of 9
(3,876 Views)

@Mathan wrote:

As smercurio told don't use continuous run button. Use normal run button and use a while loop outside ur code and wire a false constant to it and that will run ur code continuously.

I didn't say to use a False constant. In fact, you should not set up the loop this way, as this sets up an infinite loop, and the only way to stop the VI is to use the Abort button, which does not stop a VI in a "clean" manner. You should use a Boolean control, not a constant.


Message Edited by smercurio_fc on 04-25-2008 08:54 AM
0 Kudos
Message 8 of 9
(3,840 Views)

Yes its better to use a stop button(boolean control), rather than the constant.You are absolutely right.

Thanks for the post,

Mathan

Message 9 of 9
(3,835 Views)