LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Output Led sequence

Hi all,

 

I have an output array  with number of leds, which will blink according to the input which taken from My DAQ. Each led in a array blinks for  4 times as 0,1,0,1 . I have an PASS array also. 

So if the first led from output array blinks in 0101 sequence , the first led In PASS array should turn green otherwise red.  like wise go on with second and third row.....etc.

 

 Similarly  I have a Numeric indicator. if the indicator displays 0 then 5 then 0 then 5 alternatively the Led has to turn green. If its false turn Red.

 

I have attached a Vi just for a showing up my output array and PAss array. Can anyone help on this please.

Thanks 

0 Kudos
Message 1 of 6
(755 Views)

can you explain where do you need help with ? 

 

0 Kudos
Message 2 of 6
(685 Views)

if your input pattern for one LED is 01010101010101...  and your pass pattern is 0101 , your red/green indicator will alternate at each new sample. is that the function you need?

 

store the last n (n= PASS array length) samples and compare?

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 6
(658 Views)

You need to be significantly more clear.

 

So you have an array of LEDs where each LED can blink and you want to find the ones that blink exactly four times at a given point in time. This is a PASS. Do they all blink at the same time? What is the definition of a failure? if an LED blinks less than four times? Does not blink at all? Blinks five or more times? Blinks at the wrong rate?

 


@RRBB wrote:

 Similarly  I have a Numeric indicator. if the indicator displays 0 then 5 then 0 then 5 alternatively the Led has to turn green. If its false turn Red. 


So it alternates between 0 and 5? What are the timing requirements? What if it alternates once per day? Is that still a PASS? You could probably just do a "!=0" to turn it into a boolean, and then use the solution to the first problem. 

0 Kudos
Message 4 of 6
(643 Views)

. Thank you for your responses. If the  first led in the output array  ON , OFF , ON, OFF, ( if the first led satisfies this sequence) , Then the first led in the PASS array has to turn green.  In all other situations led has to turn red to say its fail. and then second led Pass/ Fail . Then 3rd led so on. ( not all the leds at the same time. ). Timing doesn't a matter. Just the sequence matter. 

 

 Thanks

0 Kudos
Message 5 of 6
(582 Views)

here is one quick solution for one channel

pass phrase.vi.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 6
(575 Views)