LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing dynamic data into arrays

Solved!
Go to solution

Hi,

 

I wish to acquire data in LabVIEW from an external source and store the data in the form of an array. I am able to store data as a spreadsheet and a data file, but I am unable to do so as an array.

 

I have tried using arrays, but the cells are over-written each time an iteration happens. 

 

Please suggest.

 

Thanks.

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 1 of 9
(14,127 Views)

Hi Dheeraj,

 

did you use shiftregisters to hold the array? Can you attach your (stripped-down) VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(14,124 Views)

PFA the VI created so far. I am reading the data into a file, and reading the array from the file.

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 3 of 9
(14,122 Views)

For the time-being, I am generating a signal to store into the array. After this problem is solved, I shall move on to external data acquisition.

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 4 of 9
(14,117 Views)

Hi,

 

This is the simple way to do it. Check out the attached VI.


Regards, 

 

Nitzz

(Give kudos to good Answers, Mark it as a Solution if your problem is Solved:smileywink:

0 Kudos
Message 5 of 9
(14,116 Views)

Hi Dheeraj,

 

so you write a file from simulated data and you read a 2nd file to display it in an array indicator.

In each iteration you read the 2nd file and display it in the indicator. Yes, that will overwrite the previously shown data in the array indicator...

 

What exactly do you want to do?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(14,115 Views)

@Nitzz   I am unable to open your file as I am using LabVIEW 8.5 . Please try sending me a screenshot. Thanks 🙂

 

@GerdW  

 

 I want to write the data from the simulated signal in the form of an array, similar to how it does in a spreadsheet. I was trying to write the data to a file and read the data from the same file into an array.

 

 

Please suggest me how this can be done directly without getting over-written.

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 7 of 9
(14,109 Views)

Hi Dheeraj,

 

the "Write to Spreadsheet" has a "append to file" input, just read the context help...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 9
(14,106 Views)
Solution
Accepted by topic author dheeraj2102

Hi Dheeraj,


This is in 8.5. In this VI the data is accumulated into an array using shiftregister. So later after acquisition you can write it all together into a spreadsheet instead of writing continuously into the spreadsheet and reading. 


Regards,

 

Nitzz

(Give kudos to good Answers, Mark it as a Solution if your problem is Solved:smileywink:

Message 9 of 9
(14,104 Views)