09-24-2023 07:12 PM
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
09-28-2023 09:46 AM
can you explain where do you need help with ?
09-29-2023 08:21 AM
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?
09-29-2023 10:47 AM
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.
10-10-2023 01:15 AM
. 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
10-10-2023 03:22 AM
here is one quick solution for one channel