LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array

hi,
 
I have a doubt how can i do this.
 
I have a string input like this:
 
Cod 80000000000008080,  from joao 0
Cod 102FED3D03030009, from joao 1
Cod 102FED3D03030003, from joao 1
Cod 102FED3D03030002, from joao 0
 
but i dont know the number of the lines that a have in my input
 
and i want to save in arry eatch code numbers... how can i do this..
 
-than i want search a number in array ... can any people help me...thanks
 
I make some code i hope that somepeople can help me!
 
0 Kudos
Message 1 of 12
(3,448 Views)
Try this. It creates a U64 array that you can use the Search 1D Array on. If you want, you can leave it as a string array.
Message 2 of 12
(3,427 Views)
thanks for all help,
 
now i have other problem that i can solve a have tow arrays, one is my memory other i receicve from serial port data ...in this case is a string constant.
i have to do this, search in enpty array if the data are not there i save in memory and incremente a variable y, and if stay in memory remove data and decremente y;
i have to seach all data that stay in constante string.
 
thanks...
Download All
0 Kudos
Message 3 of 12
(3,391 Views)
I don't understand the question.  You say that you need to search an empty array and if the data is not there save in memory?  The data will always not be there if the array is empty.  I believe we have a communication problem.  Please elaborate.  Perhaps add more data to your examples.
Jim

LV 2020
0 Kudos
Message 4 of 12
(3,386 Views)

the array1 contain the data that i receive the serial port.

-than i want create a array that save this values, (at the first this array are empty, and compary that the index0 that array 1 stay there of course that not stay) than a save this values in other array that i call array memory, but if this data appear again i remove this data from my array memory!

 

I have tow arrays, one is in my memory and the other i receive from serial port data ...in this case is a string constant.

What i want to to is this: when the data is received, i want to search in the array: if the data are not there yet, i want to
save in the memory and incremente a variable; but, if it is already in the memory, i want to remove the data and decremente a varaible.

But, in the beginning, when i receive my first data, the array is empty. it would be filled as time goes by..

I have to search all data that stay in constante string.

0 Kudos
Message 5 of 12
(3,376 Views)
Somebody help me .. i need this for tomorrow and i have try but...
 
thanks
0 Kudos
Message 6 of 12
(3,338 Views)
If I understand you correctly, one of these should do what you need.  The problem with mod2 is that if the incoming data exceeds the size of the initialized array, you will run out of room.  You could add a reshape array.  Mod3 is not a great solution because execution will be slowed by resizing the array each time you add data to it.
Jim

LV 2020
Download All
0 Kudos
Message 7 of 12
(3,330 Views)

Thanks  all help ,

 

but this don´t result because whem teh value is detecet again they showld remove the value from aray .

this is from control of people in a room ... initialy dont have people in room, whem a value is detected i put this value in array ... whem detecetd again remove from array..

my problem is whem i remove i have to order array because miss one element...

 

0 Kudos
Message 8 of 12
(3,315 Views)
Have you tried using "Delete From Array?  Or you could use replace array subset with a 0.

Message Edited by lmtis on 10-24-2007 11:06 AM

Jim

LV 2020
0 Kudos
Message 9 of 12
(3,307 Views)

my code is this,

i try make this with the function node but i don´t know if this funciton..

 

my read string is this type:

 

t
Tag 300833B2DDD9014035050063, from antena 0
Tag 300833B2DDD9014035050043, from antena 0
Tag 000000000000000000000002, from antena 0

 

thanks

0 Kudos
Message 10 of 12
(3,305 Views)