From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract data from data file, put in 3D array.

I have a data file of a particular format that I would like to put into a 3D array, but I don't know the best way to do this. I'd like to resulting data to have a 3D array with the first dimension = scans, second dimension=voltage, third dimension = current. It seems like a nested for loop would work but I can't get the results the way I'd like.

I am using LabVIEW 2010.

 

Thanks.

 

Here is a sample of the data file format, though the actual file has hundreds of scans and hundreds of voltages.

 

Scan 1
Voltage, Current
1,0.167
1.1,0.637
1.2,0.462
Scan 2
Voltage, Current
1,0.608
1.1,0.631
1.2,0.303
Scan 3
Voltage, Current
1,0.544
1.1,0.838
1.2,0.772

 

 

0 Kudos
Message 1 of 4
(2,569 Views)

Post your VI so we can see what you've done so far.  It will make it easier to help us help you get from where you are with results you don't like, to where you want to be with results you do like.

0 Kudos
Message 2 of 4
(2,565 Views)

Here is what I have so far.

 

Format into 3D Array.png

0 Kudos
Message 3 of 4
(2,546 Views)

I mean the actual .VI file, not a picture that is a bit undersized to read except for the tremendous amount of white space around it that wasn't cropped out.

 

If you could attach an example data file as well, (or embed the string data on the block diagram as constant or control with the data saved as default), then it would also be possible to poke at the VI and see what it is doing.

0 Kudos
Message 4 of 4
(2,532 Views)