11-14-2010 04:04 AM
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.
Solved! Go to Solution.
11-14-2010 04:53 AM
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.
11-14-2010 06:11 AM
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?
11-14-2010 07:25 AM
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?
11-14-2010 08:04 AM
0 miliseconds: on
500 miliseconds: off
1000 miliseconds: on
1500 miliseconds: off
2000 miliseconds: on
2500 miliseconds: off
...
11-14-2010 08:49 AM
Well 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.
11-14-2010 08:58 AM
I came up with this real quick. I am sure there are much elegant ways to do this.
11-14-2010 09:04 AM - edited 11-14-2010 09:05 AM
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)
11-14-2010 09:54 AM
thank you guys! you're the best 🙂
11-14-2010 12:11 PM - edited 11-14-2010 12:12 PM
Here are two simpler versions that don't involve any "math" and operate "in place". Pick one! 😄