04-20-2011 07:21 AM
Hi,
I would like to make a program that can read a Notepad file that I would make. The file consists of 2 colums, 1 column represents the temperature and the other the time.
The program has to read the file and make 2 different arrays, 1 of the temp and 1 of the time.
Does anyone know how I can make this easily??
Thanks!
04-20-2011 07:29 AM
Use Read from Spreadsheet File.vi from the file palette. This will give you a 2D array of your data. Use the Index Array primitive from the array palette to split the two columns.
04-20-2011 07:30 AM
If you save the file as a plain text file, then Read From Spreadsheet File.vi should do what you want.
Lynn
04-20-2011 07:49 AM
I can read the file with Read from spreadsheet. Buth I can't split it in 2 array's. How do you do it?
04-20-2011 07:51 AM
Use the Index Array function to pull each column out of the 2-D array.
04-20-2011 07:55 AM
Yes I know what you want to say buth how can i program that he first reads the first column and then the second?
04-20-2011 08:08 AM
Use the "all rows" output. That is a 2D array. Then use the Index Array to get the two columns.
Lynn
04-20-2011 08:18 AM