I am new at using Labview and, although I spent the last 3 weeks reading the manual and playing with functions, I still can't find a way to
generate a square/pulse function that turn on an LED when high, and turns it off when low.
I was able to make a circuit with a blinking LED but it seems to be not in sync with my function. Please help me build this circuit.
Thank you for your reply. I have a little tough time replicating the given code as I am still pretty much a beginner in Labview.
Could you send me the vi file? It might be easier for me this way.
Thank you so much
The approach using a simulated square wave has potentially to many pitfalls.
a) You have two timer, one through the frequency settings of the square wave generator and one for the loop
b) If you convert the dynamic data type (blue wire) from the square wave into a double you only use the last data point.
Especially point b) can cause an issues if you configured the square wave in a way that Frequency (Hz) is an even divider of the Timing value Samples per second (Hz) or Reset Signal is not set to Use continuous generation. Since a square wave is a symmetric pattern the last data point (the one used when converting to DBL) is always the same. If you place the express block for the first time and select square wave you will see that the Frequency is set to 10.1 Hz and the preview shows a "moving" square wave. Set the frequency to 10Hz or change reset signal to Reset phase, seed, and Time stamps and you will see that the wave appears to be standing still since start and end point are always the same.
The easy way to make a Boolean LED blink with a certain clock is to use a shift register and a timer.
I hope I've upload it right. Ingo Foldvari is right, the way he did it it is better (for the case of a blinking LED). I just tryed to correct your vi. It depends on what you wan't to do. In the correction that I've made you don't need the timer (control miliseconds to wait and the delay).
I've not uploaded a vi before therefor I am not sure if it will work and if it it the right way.
PS: This might also help you, (a blinking led on arm) https://www.youtube.com/watch?v=8ksZa0Z-ay4
Message was edited by: Njohuri
Thank you for your reply. Indeed this is a very simple way to make an LED blink with a square wave.
The b) that you mentioned is indeed what I had noticed but I just couldn't find a way to deal with it.
I am glad I can now.
Njohuri's method has the advantage of also giving me a pulse system or should I say the possibility of
changing the duty cycle %. How would you incorporate that in your system, Ingo Foldvari?