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: 

Interpolating 2D array

Solved!
Go to solution

Hello! I`m in process to create a programm including interpolating 2D array. I have some trouble with it. Data source is read from TXT file,after this I need to do interpolate between two adjacent columns in my array wich was automaticly created when file was read. Finally i need to create new file with new interpolated data for other values of voltage to use it in future. 

 

When I use block "Read from file",data source correctly reading only in type 'STRING' whithout losing signs after dimentional point. But interpolated block only use format DBL and when I use DBL format,it shows just first sing in array. 

 

Screenshots of program and file I`ll attach later.

0 Kudos
Message 1 of 49
(3,257 Views)

@HoloYolo wrote:

Screenshots of program and file I`ll attach later.


OK, we'll wait for that then. 😉

 

(We prefer VIs over screenshots though. We cannot run or debug pictures...)

0 Kudos
Message 2 of 49
(3,247 Views)

Hi Yolo,

 


@HoloYolo wrote:

When I use block "Read from file",data source correctly reading only in type 'STRING' whithout losing signs after dimentional point. … when I use DBL format,it shows just first sing in array. 


Then you also need to read the help for the FileRead functions.

Maybe you should use ReadDelimitedFile instead of "Read from file" with some proper format codes and delimiter char as inputs?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 49
(3,223 Views)

So that`s it. I need to do automatic interpolate between this two files and create new,as I`ve read eralier. 

 

But I cant attach here TXT files to interpolate it :(. It looks like this. Maybe you know,that it is Touchstone file for different currents.

 

I can share TXT files in other source If it possible for you

HoloYolo_1-1587398948038.png

HoloYolo_2-1587398974452.png

 

0 Kudos
Message 4 of 49
(3,190 Views)

Hi Yolo,

 


@HoloYolo wrote:

But I cant attach here TXT files to interpolate it :(. It looks like this. Maybe you know,that it is Touchstone file for different currents.

I can share TXT files in other source If it possible for you


You can attach TXT files here in the forum. In case of trouble you can also ZIP all files into just one ZIP file!

You also should use filenames with just English chars as "standard" Windows applications often have problems with Unicode filenames…

 

You also should simplify your block diagram:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 49
(3,180 Views)

That`s it. Thank you

0 Kudos
Message 6 of 49
(3,178 Views)

Hi Yolo,

 

when you are asked to provide a ZIP files, then you should attach a ZIP file. A RAR file apparently is not a ZIP file! (ZIP files can be handled by Windows while you need an additional proprietary application to handle RAR files! Not everybody will or can do this…)

Why are you naming those files as "LVM": they are simple CSV files (using a TAB as delimiter), so yoou should call them TXT or CSV…

 


@HoloYolo wrote:

I need to do automatic interpolate between this two files and create new,as I`ve read eralier.


How do you want to interpolate "between files"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 49
(3,172 Views)

Is there any difference in LabView if i`ll just change expansion of this files?

I need to interpolate between two adjacent coloumns in final array which was created from this 2 files as it shown on block diagramm. So I think to use block 2D interpolate,but I laso have know ideas how to realize this in it,also because of wrong reading Interpolating block of data this files.

0 Kudos
Message 8 of 49
(3,168 Views)

So,is it possible to do DBL paramater in reading block,without losing signs after delimetr point?

0 Kudos
Message 9 of 49
(3,164 Views)

so what you have there is a tab separated text file.

Frozen_0-1587410645649.png

Use the the appropriate read file utility to get a 2D array.

Frozen_1-1587410762312.png

 

 

 

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 10 of 49
(3,155 Views)