ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED Array

Im new at using labView and i have a problem. 

Im trying to create a VI that searches the values of an input array of numbers of a specified value. If the specified value is found in the array the VI shpuld indicate that by turning on an LED and indicating the corresponding index of the array.

 

I would really appreciate if someone could help me with my issue.

 

0 Kudos
Message 1 of 10
(4,844 Views)

Sounds like homework.  Show us your attempt and we'll help you work through it...  Smiley Happy

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 2 of 10
(4,836 Views)

This is what i have, but i dont think it rigth. 

0 Kudos
Message 3 of 10
(4,793 Views)

Nope.  Not right.  You are just determining whether the value you are looking for is equal to the length of your array.

 

Try "Search 1D Array".

0 Kudos
Message 4 of 10
(4,779 Views)

You're not using Search 1D Array Function, rather you're using Array Size function.

Try out attached code, Index of Element output of Search 1D Array Function is -1 if the element is not found in the input array.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


Message 5 of 10
(4,775 Views)

@moderator1983 wrote:

 

Try out attached code,



It's generally better to guide them to the solution rather than giving them the answer to their homework.Smiley Wink

0 Kudos
Message 6 of 10
(4,772 Views)

@RavensFan wrote:

@moderator1983 wrote:

 

Try out attached code,



It's generally better to guide them to the solution rather than giving them the answer to their homework.Smiley Wink


I got it...!! Smiley Happy


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 7 of 10
(4,757 Views)

okay i found the search 1D array. Do i  just add a Equal to function to get to work?

0 Kudos
Message 8 of 10
(4,745 Views)

Yes you need an equal function.  Actually, you could also use <0 function to determine if the element was found or not.

 

If you read the help for Search 1D Array, you'll see that a value of -1 is returned when the element is not found.

0 Kudos
Message 9 of 10
(4,715 Views)

Thanks for the help i got the VI to work.

0 Kudos
Message 10 of 10
(4,684 Views)