04-21-2018 09:16 AM
Hello Everyone
I need your help in doing a simple project.
I have to turn-on and off a led connected to NI USB-6501 (turning on and off led using this is done), but with variable time duration, and description is as follow.
* Led turned on for 10 seconds
* Led turned off for 50 milli-seconds
* Led turned on for 10 seconds
* Led turned off for 60 milli-seconds
* Led turned on for 10 seconds
* Led turned off for 70 milli-seconds
.
.
* Led turned on for 10 seconds
* Led turned off for 500 milli-seconds
* Go back to step-1
Basically Led will remain On for 10 seconds and will remain off for 50ms + step_count * iteration.
I am new to LabVIEW and really don't understand how to do this.
Right now I am able to turn on/off using fixed delay and the block diagram is as follow.
I didn't have any clue how to implement this step counting and changing the off delay time with iterations.
I am also attaching the VI file.
Thanks in Advance
Solved! Go to Solution.
04-21-2018 10:45 AM
So your off time, you need to start with 50 milliseconds and add 10 milliseconds each time.
Put that integer into a shift register. Wire it through the False case. In the true case, add 10 milliseconds before you put it back in the shift register.
(You can also use a feedback node, then it can be contained withing just the one case and you won't have to feed wires across the loop or through the other case.)
04-22-2018 12:15 AM
Thanks for suggestion, finally I am able to do it.
The Block Diagram is as follow:
Thanks again, i appreciate if you have any other comments on this.
VI is also attached.