LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search for duplicate

hi there.

i am running though an issue with looking for duplicates.

right now. my vi is searching for the duplicate, once it is found, it will display "duplicate found".

i am facing a new problem. lets say i have 10 devices and 10 positions those devices goes into my test box.

position 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

the device that read position 0, and 2 is close to one another. so when a device is put into position 0, it can be read on position 2. 

and 2 can be read on position 4, 

and 4 can be read on position 6,

so then 1,3 --- and 3,5 ---- and 5,7 

and so forth.

thats because the hardware i designed didn't take into that consideration. 

so now i think its best to fix the  software.

does anyone have an idea of how to get rid of the DUPLICATE if the position is 2 positions away?

i have created a vi that generated what i started. 

 

 

Message Edited by krispiekream on 08-18-2008 06:00 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 1 of 7
(2,790 Views)

i think this is it

Message Edited by krispiekream on 08-18-2008 06:54 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 2 of 7
(2,779 Views)

nope..yeah..

i need help..

Message Edited by krispiekream on 08-18-2008 07:05 PM
Best regards,
Krispiekream
0 Kudos
Message 3 of 7
(2,774 Views)
  • Your description makes very little sense. Your example has a 2D array, so "position" is not unique. Are you talking exclusively about the second column (index=1)?
  • SInce you seem to only deal with the second column, it would make sense to index it out before the loop and simply operate on the resulting 1D array inside the loop.
  • You circled a few duplicate elements on the picture, but not all are two apart.
  • What do you want to do with the duplicates?
  • Why is your shift register not initialized?
  • Code look extremely convoluted. Why do you use a WHILE loop. a FOR loop would be correct because you know the number of iterations (maxpos) before the loop starts.
  • ...

 

Message 4 of 7
(2,769 Views)

KK,

This is a very confusing question.  Are you looking to make an alert if there are any duplicates?  Output a count of any number that has a duplicate?  Also you talk about duplicate positions that are 2 positions away, yet not all of your 42329 entries that your VI identifies are seperated by 2 positions.  Please clarify.  I can't run it because I only have 8.0. 

Jim

LV 2020
Message 5 of 7
(2,760 Views)

i think you are right. a while loop would be better. i guess i am use to the while loop so i use it in my logic quite often. 

i did this and it seems to be working.

my search will look for mainly in index 1.

but once it find it. it will replace whatever serial number it has with -99 for col index 0 and 1.

 

 

 


Message Edited by krispiekream on 08-18-2008 08:08 PM
Best regards,
Krispiekream
0 Kudos
Message 6 of 7
(2,759 Views)

i think this is what i have in mind.

 

 

Message Edited by krispiekream on 08-18-2008 08:27 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 7 of 7
(2,750 Views)