LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

toggle led

Thanks for the reply so soon! I didn't think anyone was looking at this old post. I'll try the 980 ms wait.

0 Kudos
Message 11 of 21
(3,360 Views)

it were very useful informations i found in your replys guys.

 

i have got a question. what if i want to toggle 2 LEDs using arduino with labview and also use PWM to control the LEDs?

0 Kudos
Message 12 of 21
(2,668 Views)

@koko wrote:

i have got a question. what if i want to toggle 2 LEDs using arduino with labview and also use PWM to control the LEDs?


This is a new question. Please start a new thread. Thanks.

0 Kudos
Message 13 of 21
(2,659 Views)

Sorry, duplicate (forum malfunction)

0 Kudos
Message 14 of 21
(2,658 Views)

This is a smal code that i wrote to blink various led's using an array of numbers.  You dont have to use the array to turn on the LED but, if there is a pattern or sequence you would like to blink the LED

Download All
0 Kudos
Message 15 of 21
(2,586 Views)

This is a thread started 14 years ago, so there might be a better place to continue. 😄

 

Some very quick comments:

 

  1. What's up with the "equal true" statement in the false case. What do you think would be different if you remove it? (study this long thread) 😉
  2. Have you ever looked at the CPU use when [start] is false? Do you really think you need to poll the start button millions of times per second?
  3. Your VI cannot be stopped, only aborted.
  4. What's up with the right-to-left wires in the FOR loop?
  5. Why is N=1000? Shouldn't it stop when it runs out of string?
  6. If you would use the outer while loop for everything, you would not need any local variables or inner FOR loops. (state machine!)
  7. Why is the start button "switch until released" (you changed it from the default action!)??. Latch action would be much more appropriate!
  8. If you would use an array of round colorboxes instead of booleans, you could dramatically simplify the diagram.
  9. Why are you parsing DBLs lf all you have are integers?
  10. Instead of all the equal comparisons, use a case structure with N cases. Send a TRUE to the active LED and use tunnel default for all others.
  11. Why do you use a hardwired path? Nobody else has a folder called C:\Users\mcoursen\Desktop\ ...
  12. ...
  13. ...
0 Kudos
Message 16 of 21
(2,570 Views)

thanks for all the comments.  I have only been using labview for about 2 months now.  I don't know all the ends and outs.  I just try to make things do what i want.  I'm sure there are a lot better ways to do alot of things, but i frankly just dont know until i try.  Anyways, thanks again for your suggestions.  i will look into them.

0 Kudos
Message 17 of 21
(2,541 Views)

@mcoursen wrote:

  I don't know all the ends and outs.


 

It is Ins and outs

0 Kudos
Message 18 of 21
(2,531 Views)

@mcoursen wrote:

I have only been using labview for about 2 months now.  I don't know all the ends and outs.


Yes, that all fine. Your program actually works and that's the main point! 🙂 Some of us have been programming for 20+ years and experience only comes with programming and making mistakes.

 

Now that it works, you should try to improve it. Study my recommendations and soon you'll be a star programmer that can do a much better version of the same program from scratch in a few minues. Good luck! 😄

 

One thing you should focus on is scaleability and that works best if you use an array of colorboxes. A scalable program could be modified within seconds to deal with a slight variation of the task, e.g. if you decide to handle numbers 0..8 or even 0..50 for example). or if you want different colors. Allowing 0..8 in your program would require a lot of additional effort while 0..50 would be almost impossible and would expose the limitations of your approach using explicit scalar code.

0 Kudos
Message 19 of 21
(2,513 Views)

 

progreammer ! bettter !! minues !!! dofferent !!!!

 

Good grief Sir A I think a wheel has come off your keyboard Smiley Very Happy

 

0 Kudos
Message 20 of 21
(2,507 Views)