LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array disposition

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?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 11 of 23
(825 Views)

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?

0 Kudos
Message 12 of 23
(820 Views)

If you read data from multiple daily files, you simply accumulate data in a shift register before sorting:


Sort XY data.png

 

Is this what you are trying to do?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 13 of 23
(806 Views)

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?

0 Kudos
Message 14 of 23
(803 Views)

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).

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 15 of 23
(799 Views)

I attach the image of your pattern applied to my VI.
There is something wrong ... Can you tell me where I'm wrong?

0 Kudos
Message 16 of 23
(788 Views)

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.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 17 of 23
(762 Views)

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?

Download All
0 Kudos
Message 18 of 23
(757 Views)

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.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 19 of 23
(729 Views)

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 ...

0 Kudos
Message 20 of 23
(705 Views)