LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problems to remove several elements in array!

Hi,

I have the data from my pic program c++, it saved the data in csv file, delimiter in ','.
1)The first problem is the sync values it is repeat each 240 figures.
I'm removing this sync values but i did it one to one, i tried put a for-loop but it didnt run i dont know why!!..
2) is removed the first capture it easy to remove!. I got it.
3) its the more difficult for me, the pic count until 65535 and when it count more us it start in 0, therefore, if you remove the sync value and first capture i have the values x+65535... i tried to put a loop to find a lot of diference between one value and other and this point i would know there it start the th normal count 0 to..., The only trick is this value
s +65535 are the first numbers always...

I hope you understand 😉 i am spanish guy!.
I would like anyone help me!.
I attached the vi file and 2 examples file with the problems to remove. If any can modified the vi i will be gratefull and i also accept any advise ;).

Thanks and Regards to everybody!.
Download All
0 Kudos
Message 1 of 10
(3,572 Views)
I am not sure that this is what you want, but I attached a modified vi. If you put in data other than 0 in your data file columns 2 and 3, you would see the plots in different colors. All instances of 65535 are removed. If this is not what you want, please try to explain better in English, or post your problem in Spanish. There are Spanish Labview users here who might be able to help you.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 10
(3,572 Views)
Hi tbob,

the first thing, i cant open this file i have lb7.
i dont want to show the differents columns in graph, i only want to remove the syncrone value from pic each 240 figures, the other column are from the other sensors, i only put the graph to show the bad captures and the sincrone values which i want to remove.
I would like to see the way to delete elements from array with loop, since it tried and didnt work, i put in manually element to element.

And the 3º problem, is the initial values.
If you know the pic count until 65535 counts in 16bits, if i count low frequencies the pic turn to 0 the counts and start to count again...
Then in my data if i remove the syncrone values each 240 captures 65535,65535,65535 and remove the first capture
that is error, i have several values which are x + 65535 counts.
Then this values are lower than 2000 or so and when the counter is near to the first 16bits array, it appear bigger values 65000 or so... then i can use any loop to search a high change of number , ie: from 2000 to 62000, the normal thing each value is grow smoothing and not with high increments, then the others values lasted i can know the index and add 65535 to this values, the normal thing is have from 0 to 30 or 50 first captures... You can see in the graph the first values lowers.

The other values which appear only one value in the line is noise, i want to remove these bad elements.
The noise elements are lowers 30,90,...

Thanks, i hope you can help me!.
Regards,Jose.
Look picture
0 Kudos
Message 3 of 10
(3,572 Views)
I have attached a modifed program that removes the syncs in a loop. My guess is that you had a problem with it because either you did not use a shift register for the data or you did not loop enough times. The shift register takes the output of one iteration of the loop and makes it the input to the next iteration.

As for the problem of your data not having enough bits (reduced by 2^16 if over 2^16), It will be very hard to come up with a general solution. For the data that you included, you may want to look at reversing the array, running a threshold of some kind, fixing the problem, and then reversing it back.

I hope that this helps!
Bob Young
0 Kudos
Message 4 of 10
(3,572 Views)
Your picture helped to explain your situation. Look at the attached vi. It converts low values by adding 65535, and it filters out very low level noise and sync signals. You may have to play with the numbers used for upper and lower limits.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 10
(3,572 Views)
Hi Bob,
I cant open this vi in lb7.1, i have 7.0.

I attached the picuture, i am doing anything the bad way...
You can see the manually removing and the loop which i didnt get to run.
Thanks, i would like to see how can i get it with loop?.

Thanks, Fonsi.
0 Kudos
Message 6 of 10
(3,572 Views)
Hi Tbob,

Your vi works, but in this case alone.
If possible the values >65535 appear like 30 counts in the data, and your vi take this values like noise level <100. For get it, i should put anything to differenciate the 30 of noise and 30 of counts >65535, the only KEY an way to go is say to the progam one thing.
The noise figures, ALWAYS are 1 value between correct values. The noise values always are 65000,80,48000, in this case are only one bad value followed
The values <65535 are values that are repeating several times. For example you have 64000,63520,30,90,95,65000,50000, in this case you have 3 values <100 but MUST to be like values >65535 why is repeat 3 times followed. Can you understand me?.
I should to put anything in the p
rogram when detect data >12000 if this values are repeated more time than 2 times are took like >655535 else like noise.But i dont know how can i get that in labview!


Also is possible the pic count exactely 65535, that's why i want to remove the sync signal from INDEX, they are repeating each 240figure, with a loop it easy but i didnt get to run with loop delete from array vi...

I hope you can help me!.
Thanks for your help.
0 Kudos
Message 7 of 10
(3,572 Views)
Sorry about that. Here it is again in 7.0.
0 Kudos
Message 8 of 10
(3,572 Views)
Hi Bob,

thanks, it works!.
I got remove all the errors in data.
Thanks very much a you!
With the 2 examples vi.
I attached the final vi.
0 Kudos
Message 9 of 10
(3,572 Views)
Hi Bob,

thanks, it works!.
I got remove all the errors in data.
Thanks very much to you!
With the 2 examples vi.
I attached the final vi.
0 Kudos
Message 10 of 10
(3,572 Views)