08-29-2013 06:48 AM
E' appunto quello che cercavo di suggerirti: come ordinare i dati per tempi crescenti o decrescenti.
In alternativa, basterebbe leggere i file nella sequenza corretta. Immagino che ce ne sia uno per ogni giorno?
08-29-2013 07:08 AM
Ok. Si ce n'è uno per ogni giorno. M a il numero di file ( giorni ) che compongono l'array è variabile.
Altro problema: il mio è un array 2D.
Quindi... come faccio?
08-29-2013 07:45 AM
If you read data from multiple daily files, you simply accumulate data in a shift register before sorting:
Is this what you are trying to do?
08-29-2013 08:15 AM
Ok. Yes, more or less what I want!
I do not understand just in wich part of your scheme I should tie the temperature data. And also, what is the meaning of the numbers that multiply the iterations?
08-29-2013 08:24 AM
Multiplications are there only to fake some data.
You should wire temperature to the second input of the Bundle node (in the example I bundle the iteration count of the inner loop).
08-29-2013 08:42 AM
I attach the image of your pattern applied to my VI.
There is something wrong ... Can you tell me where I'm wrong?
08-29-2013 09:16 AM
What's the added loop for? You are replicating 288 times the very same data! This makes no sense.
Furthermore is useless to graph data at each loop; data should be graphed only once, after reading all files.
Move the data conversion and the graph terminal outside the loop using as input the content of the 2D text array shift register; remove the 288-times loop and restore auto indexing for the cluster array.
08-29-2013 09:32 AM
If I understand it should be like that shown in the image attach.
But even in this case there is some problem ...
I enclose also the graph (incorrectly) that comes out.
What's wrong this time?
08-30-2013 01:46 AM
The inner loop must output an array (the array of converted single file data), so right click the output terminal and select Autoindexing; remove the wire to the N terminal: it's useless and may also hurt; in order to build a 1D array instead of 2D, right click the Build Array node and select "Concatenate inputs". These modifications should make your vi to work.
However, you are filling the table indicator and converting values for each iteration in the file read loop.
This is useless: on the first iteration you will do that on data from file1, on the second iteration on data from file1+file2, on the third from file1+file2+file3, etc...
Only the last iteration will do the complete job, the other are a waste of resources.
So in the read loop you should only read data and accumulate them in the 2D text array shift register.
After the loop (outside it), you will wire the 2D array from the shift register to the table indicator and to the loop where you extract timestamps and temperatures.
09-03-2013 02:39 AM
Hello Paolo,
I'm sorry if I have not answered before, but I unplugged the computer and I have not turned on until now.
Thanks for the reply. I look a bit and let you know ...