07-09-2010 10:32 AM
How do I comare elements in an array and output a T/F? I want to stop my while loop IF two elements in the array are equal.
Solved! Go to Solution.
07-09-2010 10:49 AM - edited 07-09-2010 10:49 AM
Like this with a equal and OR Array Elements function. Make sure the Equal function is set to compare elements and make sure the data type you are comparing is an integer type.
07-09-2010 10:55 AM
what is the second compare? i cant find it?
07-09-2010 11:00 AM
OR Array Elements like I said.
See the 'Search' button on the Functions palette? You can use that. It also seems that you are using LabVIWE 2009. That image is a 'snippet'. You just have to drag it to a block diagram.
07-09-2010 11:11 AM
I found it! Thanks!
07-09-2010 11:17 AM
Now my next question is related but more involved. How do I do a bitwise compare within the element? Maybe a bit mask of some sort?
07-09-2010 11:20 AM
Yes, you can use a mask..
I'm a little confused... Do you want to implement that as part of the code example Denis provided? Or is it a different topic?
07-09-2010 11:52 AM
The code works for the hex compares. Now I have to use the same code modified for bit compares. How do I implement a bit mask?
07-09-2010 12:04 PM
Here is an example of how to do several things concerning bit masking.
07-09-2010 12:06 PM