LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Blinking LED without property node

Solved!
Go to solution

Hey!

I am familiar with property node blinking but I want to make a LED blink because of a timer interfering with a FOR cycle. I have almost made a VI that compares timer value to y value. When timer value is larger than y, then my LED should shine. When timer value is smaller than y then it should turn off. Something is wrong, maybe someone could help me.

0 Kudos
Message 1 of 17
(13,810 Views)

What exactly are you trying to do over here?

- You have enabled indexing on the output index of the for loop; which means that you are comparing the timer value with an array of 50 elements. The output of the greater than function is an array of 50 booleans. You will not be able to wire that to an indicator.

- What is the 'i' variable in your formula node? You haven't defined that as an input.

 

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 17
(13,800 Views)

1) My idea is that every 500 miliseconds timer value is compared to some y value. I think it should work if timer everytime starts from value "0".

2) Yes, I meant this i from FOR cycle. I guess I haven't connected it anywhere.

 

Adnan, maybe you have other ideas, how to create blinking?

0 Kudos
Message 3 of 17
(13,791 Views)

We could help you but you need to help us understand what exactly you are trying to achieve. From what I understand, you just want to turn the boolean indicator on and off to simulate blinking. But, can you explain the idea of when to turn the indicator on and off?

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 17
(13,777 Views)

0 miliseconds: on

500 miliseconds: off

1000 miliseconds: on

1500 miliseconds: off

2000 miliseconds: on

2500 miliseconds: off

...

0 Kudos
Message 5 of 17
(13,770 Views)

Well Smiley Indifferent if it's based on nothing, then put the Express VI "Elapsed Time" wired to 0.5 seconds and a LED on the output "Time has Elapsed" in a while loop and away it goes.

Richard






0 Kudos
Message 6 of 17
(13,764 Views)
Solution
Accepted by topic author kukonens

I came up with this real quick. I am sure there are much elegant ways to do this.

 

example.png

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 17
(13,761 Views)

If the OP's loop if 500mS, which, after looking at the code, I think maybe it will be once it is fixed, then this is all we need... (also note that he wants to start High)

 

BLINK.jpg

Richard






0 Kudos
Message 8 of 17
(13,758 Views)

thank you guys! you're the best 🙂

0 Kudos
Message 9 of 17
(13,743 Views)

Here are two simpler versions that don't involve any "math" and operate "in place". Pick one! 😄

 

0 Kudos
Message 10 of 17
(13,727 Views)