LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

blinking LED N number of blinks per minute

I am attempting to set a numeric indicator and have the LED blink N number of times per minute. I am not sure exactly where to start. This is what I have so far.

Any help would be greatly appreciated.. Screen Shot 2018-09-15 at 4.48.02 PM.pngScreen Shot 2018-09-15 at 4.44.14 PM.png

0 Kudos
Message 1 of 8
(7,461 Views)

Your code makes no sense.  You take "Blinks per Minute" and divide by 60 which yields blinks per second, then compare that to the iteration count.

Blinks per second will be a constant value, whereas the iteration count will be a number that continuously increases (very rapidly).

Take a look at the functions on the timing palette.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 8
(7,448 Views)

Also make sure to see if you can figure out what would change if you would remove the "select" node. "o

(see also).

 

Your loop spins millions of times per second. Place a suitable wait to pace the loop timing.

 

0 Kudos
Message 3 of 8
(7,433 Views)

Altenbach is referring to our old friend from C

 

X = Bool? TRUE:FALSE;

 

Unless my C is rusty.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(7,407 Views)

Your question is kind of vague. 

 

When you say you want to "blink an LED N times per minute", does that mean:

  1. Blink at a continuous rate?
    • That is blink N times and wait until a minute elapses and blink N times again 
  2. Blink at a variable rate?
    • That is blink faster as N increases so the LED is always blinking 
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 8
(7,375 Views)

I apologize. I need the LED to blink at a variable rate per minute. My numeric control is what changes that rate of the blinking. As I increase the numeric control, the number of blinks per minute increase. I’m just not sure how exactly to control the rate of blinking through a numeric control. 

0 Kudos
Message 6 of 8
(7,370 Views)

@chriscm3 wrote:

I apologize. I need the LED to blink at a variable rate per minute. My numeric control is what changes that rate of the blinking. As I increase the numeric control, the number of blinks per minute increase. I’m just not sure how exactly to control the rate of blinking through a numeric control. 


Start with something like this:

Blink.png

Then change the control to a different type and maybe add some logic that allows you to make a selection based on blink rate not delay time.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 8
(7,367 Views)

Start with RTSLVUs code, but keep a fixed loop rate at a reasonable lower limit (e.g. 100ms). Then just measure elapsed time and "toggle boolean+reset timer" whenever a certain time is reached (based on the desired blink rate). The problem with the current code is that if the wait time gets long, the VI cannot be stopped because the stop button only gets polled very rarely.

 

What duty cycle do you want? "50% off/50% on" or something else?

Message 8 of 8
(7,361 Views)