LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

led control

Hello,

 

        I'm a newbie to labview and I'm trying to get the LED come true or false depending upon the counter data. If the data remains the same the led to false and as soon as the counter data increment I would like to trigger the led at every data increment.

 

I'm attaching my code... please show some insight.

 

thanks!

0 Kudos
Message 1 of 7
(4,238 Views)

I don't understand your question.

 

Right now you have a comparison of the previous data to the new data.  So if you put a NOT on that then the LED, if the data is equal, it will set the LED to false, if the data is different, it will set it to true.

 

But you say "as soon as the counter data increment I would like to trigger the led at every data increment".  Whenever the data increments, by definition it will be different, and that will automatically mean the LED becomes true.

0 Kudos
Message 2 of 7
(4,233 Views)

I hope this helps:

 

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 7
(4,222 Views)

Harold,

 

You have a bit of a Rube Goldberg there.

 

Why the case structure?  Just put a NOT function between the equals and the LED.

 

(And of course more direct would be the Not Equals function, but I know the OP was originally using an equals comparison in the VI for other reasons.)

0 Kudos
Message 4 of 7
(4,214 Views)
lol thanks for the catch, I didn't even notice that. it is old code so... I will update it
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 5 of 7
(4,207 Views)
here is it revised without the rube lol;)
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 6 of 7
(4,203 Views)

Hello -

 

       thanks for all your inputs, I did try using a not function after the equal to. As the loop was the running so fast that I couldnt see the trigger. However as soon as I added a wait until ms function and gave it a constant, I could see the Led trigger.

 

thanks for all your help.

 

 

0 Kudos
Message 7 of 7
(4,176 Views)