07-14-2010 09:48 AM
Hey, i'm new to Labview and i have a problem to do... i'm finding a little problem in creating a flashing led :
07-14-2010 09:56 AM
Did you do it like this or is it more complicated?
07-14-2010 09:58 AM
Sounds like homework so I'm hesitant to provide a complete solution. Post whatever attempt you've made so far and we'll help you out.
Hint: A shift register holding a boolean in a while loop is a good place to start.
07-14-2010 10:14 AM
it's a small part of a big problem.... not the whole HW, the only part that is causing me trouble 😛
well my problem is with how to input the time for the on and off phase of the led. should it be using a flat sequence inside a while loop and using a wait block?
07-14-2010 10:16 AM
ty, sorry but i couldnt open it since i'm using the version 8.2
07-14-2010 10:18 AM
If you need to controll the timing then things get more complicated. You will probably need to have the blink feature in a seperate loop and and send an evet that tells it to blink. THen you can set up timing in that loop to handel the different blink time and have the program turn on an off the light.
07-14-2010 10:19 AM
Here is 8.0 version
07-14-2010 11:06 AM
is it possible to do it using a flat sequence containg the wait time ?
07-14-2010 11:34 AM
Why would you ever want to use a Flat Sequence? You don't need one. You should avoid using Flat Sequences. Especially Stacked Sequences.
If you want to swap the While Loop to a Flat Sequence, no you cannot use a Flat Sequence.
07-14-2010 12:38 PM
@Karamdeek wrote:
is it possible to do it using a flat sequence containg the wait time ?
Flat sequences are frowned upon as there's almost always a better way to solve sequencing problems with proper program flow.
I think this part of your problem is to help you learn about shift registers and structures within structures. These basic skill are required when you want to control a logical flow of events.
I'm probably giving away too much here but look at the pic and try to figure out what is in the other cases that make this VI work. Once you do, break it down into small steps or draw a flow chart and see how the labview structures mimic the decisions you have to make to cause the LED to flash as your requirements specify.
Good Luck!