Read from spreadsheet function help

Hi
I have 2 csv files, each with like say 10 rows of numbers in column 1 only.   So its a 10x1 matrix.  I want to plot them using the read from spreadsheet functions (I created two Read from SS icons, each read in numbers from the two csv files.. have transpose to always true... index set to -1 to read whole file).  But the output of that returns a 2d array.  And I have trouble moving forward from that point.  I tried to change the output array dimension from 2 to 1.  Then link up the two 1d arrays to a bundle, then to xy graph.  That didnt work.  Can someone give me a hint on how to move forward from that? 
And is there a big difference between the xy graphs and the waveform graphs?
Thanks a lot in advance.
Jerry

If you have transpose set to true, then you should just use the first row output of the Read From Spreadsheet. This is a 1D array. If you still want to use the 2D array output, then use an index array function and get row 0. You'll get a 1D array. If you don't want to set transpose to true, then use an index array and get column 0. The attachment shows the three different ways. They all produce the same graph.
The difference between a waveform graph and an XY graph is that the waveform graph displays evenly sampled data and the XY graph can display unevenly sampled data. When you create data for a waveform graph, you provide a y array, a t0, and a dt. With an XY graph, you provide a y array and an X array that may or may not contain unevenly spaced points.
Attachments:
Files to XY.JPG ‏27 KB

Similar Messages

  • Read From Spreadsheet File help

    I am saving all my data to a text file (See attached file). The problem is that when I try and use the Read From Spreadsheet File.vi I am unclear on how to make it show all my data.
    Does anyone know a away for me to read the whole file and display it all at once reather than line by line?
    Solved!
    Go to Solution.
    Attachments:
    test data 1.txt ‏6 KB

     The read from spread sheet Vi has two data outputs : the top right retrieves the whole file as a 2D array, if you leave the "number of rows" input on the left unwired.
    Message Edité par chilly charly le 01-07-2009 11:22 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to read two text files using the Read from spreadsheet.vi and then plot it

    I need to read two text files using the read from spreadsheet function and then plot these files over time.
    The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
    I really appreciate any help..thanks
    Attachments:
    RMS.txt ‏1 KB
    FREQUENCY.txt ‏1 KB

    From NI Example Finder:
    Write to Text File.vi
    Read from Text File.vi
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • Error in Reading from spreadsheet tool

    Hi all, 
    In my application I am using a Read from spreadsheet function to display the contents of a txt file saved in my computer continuously every 3 mins. This txt file gets updated once approximately every 3 minutes. Now the problem which I am facing is, If the txt files is getting updated at the exact time when the vi is trying to open the txt file it gives an error saying, "file already open!! Continue or Stop" If I press Continue it misses the values from the file. Is there any alternative to avoid this happening. It happens only once or twice in an hour. But still this error becomes fatal as there is a data loss.
    Can anyone please help find a way to avoid this error.
    Regards,
    Nitz 

    Hi Nitzz,
    If you are accessing the same file frequently in two different places then access it using the low level file IO functions.
    Open the file reference at start and keep that in memry using global variable or functional global then close the same at the end of the application.

  • For Mike Porter: Read from Spreadsheet File.vi" function

    On 2/17/03 you answered my question about reading and viewing a test done last week back into Labview. I can open the "Read from Spreadsheet File.VI" in Labview and read the file "data.txt" into the VI. The data comes back into the rows & cells on the VI screen but I don't know how to open the graph to see the data as curves. I can see about a 3 x 4 array of cells at a time and the correct data is there but I want to plot it. Do I need to create a new block diagram and VI? I apologize for the vagueness of my question - I'm new at Labview.
    Attachments:
    DATA2.TXT ‏183 KB

    Create a VI with a Waveform Graph on the front panel. On the block diagram, insert a Read From Spreadsheet File function. Connect the All Rows output to the Waveform Graph.
    Attachments:
    Graph.jpg ‏3 KB

  • Generate digital waveform form a read from spreadsheet.vi

    Hi, I'm very new to LabView and am having some problems in completing what I believed would be a very simple task.
    I am using the Read from Spreadsheet.vi to read in an Ascii tab delimited file that I created in Matlab (the file is simple a vector of 1's and 0's that represent a binary stream) All that I want to do is take the output from this and generate a digital waveform corresponding to the 1's and 0's in the array but I cannot find a way of doing this.....
    Help much appreciated,
    Thanks.

    You should be able to just run your data straight  in to the digital write function as long as you select the correct port width of your hardware.
    If you want to do it with a digital waveform it's a bit trickier, the digital waveform data type is a surprisingly complex animal.
    There might be a better way to do it, but this is what I've had to do in the past...
    The "build digital data" function needs a 2D array in, so convert your 1D array into a 2D.
    Then the digital data can be input into a Build Digital Waveform.
    Then the digital waveform can be output with the write digital waveform.
    Message Edited by Troy K on 03-23-2008 11:37 AM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Attachments:
    array_to_digital1.png ‏4 KB
    array_to_digital.png ‏9 KB

  • EOF detection in "Read From Spreadsheet File"

    Hi folks, I need help in detecting EOF in a "Read From Spreadsheet File". I' d like to stop a while loop by wiring the EOF? indicator to the stop condition, but this doesn't work. For design resons I can't substitute the while loop with a for loop and I DO need the while loop. I read something about creating custom EOF detection but I'm wondering why the builtin function in the vi doesn' t work and if there isn't some simple solution. Many thanks, hazibuli  

    I'm guessing that you want to process one line at a time from the spreadsheet.  Use Read From Spreadsheet File to read in the entire spreadsheet as Dennis says.  Then wire the 2D output to a For Loop with indexing enabled.  Each iteration of the For Loop will allow you to process one line at a time.  When the last line is processed, the For Loop will exit automatically.  Here is an example to get string length of each element in a spreadsheet. Message Edited by tbob on 03-15-2010 09:46 AM

  • Formating Data for Read from Spreadsheet

    Hello,
    I am trying to read data with the function Read from Spreadsheet. Can I do this with a file in Excel? I saved it as a .csv file, both tab and comma delimited and neither work. Does this function truely read from a spreadsheet, or does it need to be a text file? What is the correct format for this data?
    Thank you!
    Attachments:
    bridge_data_1.csv ‏16 KB
    read_spsheet.vi ‏73 KB

    You need to set the "delimiter" input of the Read from Spreadsheet vi. Wire a string constant with a comma in it and you should be fine. A .csv file is really just a text file anyway.
    The other problem that I saw was that you set the "transpose" input to true, this caused the data to be stored in the array across two rows, when your code was looking for it to be down the two columns. Change that boolean to false and you should be all set, it works on this end at least.
    I hope this helps. Let us know if it doesn't!
    Brian

  • Read from spreadsheet: a way to automatically continue if the file is missing? (Rather than having to push "continue")

    Hi,
    I'm using the "read from spreadsheet file.vi" to read in data from a file that may or may not be present.  The data isn't required - it's optional data; nice to have but not everybody will use it.
    Of course, if the file isn't present, I get an "Error 7 occurred at Open File+.vipen File", and I have the choice of pushing either the "Continue" or "Stop" button.   What I'm wondering is:  is there a way to just have LabVIEW automatically continue if the file is missing?  Perhaps it could alert the user to the missing file, but continue anyway?   Normally I'd handle this by wiring the Error output of the function to an error indicator.  But the "read from spreadsheet file.vi" function doesn't appear to have an error output.
    I think my description of my question is sufficient, but I'm attaching a snippet of my LabVIEW code that shows the read from spreadsheet file function in question, and the error I get when the file is missing.
    Thanks,
    dan
    Solved!
    Go to Solution.
    Attachments:
    labview-read-sprdsht-error.png ‏27 KB

    Dan_the_Clam wrote:
    Why oh why do people hate them so much!  I'm a friend of local variables! 
    1. They use more memory
    2. They require something on the front panel (even if hidden).  So that is yet another copy of your data
    3. They break data flow
    4. RACE CONDITIONS!!!
    Dan_the_Clam wrote:
    my code evolves and tends to sprawl a bit.
    That tells me you do not have a good architecture to begin with.  It also tells me you need to modularize your code more and use subVIs.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Read from spreadsheet file

    Hi! I am a beginner labview user and I have a problem reading data from a
    ..xls file. I have written in columns the data that i want to present in a
    waveform graph through labview. I give the path to the Read From Spreadsheet
    File tool and i connect a true constant in the "transpose" terminal. The Run
    button shows me no error but all I get in my waveform graph is a x-axis
    line. Could someone help me? Thanx

    You say that you want to read data from a .xls file. You use Read From Spreadsheet File to get the data into LV.
    You have mixed some things. A .xls file is NOT a spreadsheet file. It is a file which could be read by MS Excel and some other tools which have import filters for this file. Read from Spreadsheet File is not such a filter.
    A spreadsheet file in the context of LV is a text file where the cells of a row are separeted by a tab and the rows are separated by a end of line.
    A save thing is use Active-X automation to communicate with MS Excel. Let it load the file and read out the cells. The are examples in LV help and in the dev zone. You must have installed and licenced MS Ecxel on your target machine. Maybe someone has written such a fil
    ter for LV but I don't know it.
    The other way will only work if you use US local settings and the data is in one worksheet. Save the file with the extention .txt. So Excel will generate a text file of the correct format. Excel will use the regional settings of your machine. You can read in this file with Read From Spreadsheet File. Unfortunatly this will use fixed settings which are the same as for US regional settings.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Format precision apparently ignored when using read from spreadsheet file

    I hope there is ridiculously simple solution to this problem but so far I can't find it. Using the Read from Spreadsheet File function in LabVIEW7.1, I can't get the floating point format (%f) to work; the decimal (%d) seems to work fine. For example, the first value in the attached file is 399.5853. When I read it in using %.2f format I would think I should get 399.58 but instead I get 399.58529663... Oddly if I use %d as the format, I get an as expected value of 399. Can anyone see what I am missing?
    Attachments:
    ReadFileTEST.vi ‏23 KB
    test.txt ‏1 KB

    The solution to the problem is the internal representation of floating point numbers: with a limited number of bytes only a limited number of the (infinitely many) real numbers can be represented. The nearest representable number to 399.5853 is 399.58529663 if the so-called single precision representation (abbr. SGL in Labview) is used.
    It seems that (ridiculously!) NI has chosen to use SGL as the data format in the Read from Spreadsheet VI which causes the unexpected behaviour you observed.
    You can change the representation from SGL (which uses 4 bytes) to DBL (double precision, using 8 bytes) in the Read from Spreadsheet VI and you will observe a better approximation then, but still not 'exact' since the number now reads 399.585300000000018. (With t
    he EXT representation, 10 bytes, you could go to even higher precision)
    I hope someone from NI reads this and they fix the unnecessary limitation of the precision in the Read from Spreadsheet VI.

  • Read From Spreadsheet File.vi in windows 7

    Hi,
    I use Read From Spreadsheet File.vi in windows 7 to read a table, but when it executes, i get a dialogue box asking for the filename, (The box is properly wired to the path).
    However, when i execute exactly the same programme in windows Xp it works with no problem.
    ¿Any known issues with this vi and xindows 7?
    I am using labview 8.6.
    Thanks for your help.

    I am using a relative path as shown in the figure, files are user1.xls user2.xls .... they all exist.
    I have build the program and instaled on other xp machine, it works. Then installed in a win 7 machine and is not working.
    Maybe there is a problem with ..\..\?
    Any other way to go to a parent folder not using ..\ ?
    Thanks for you help
    Attachments:
    ejemplo.JPG ‏8 KB

  • Is there a file size limit when using Read From Spreadsheet File?

    I'm trying to read in a large file, about 52mb, 525600 lines with 27 fileds in each line using "Read From SpreadsheetFile.vi". I then search the 2D array for -999, which represents bad/no data in that field and total the number of fields with -999 in it. This all works on 3 months worth of data. The program is giving me an out of memory error and stopping in the case where the read takes place on the large one year file. So my question is does the Read from Spreadsheet file have size limitations? Is there a better way to do this? Thanks in advance for the help.
    ssmith
    Solved!
    Go to Solution.

    Camerond--
           Thanks for the help. I recreated the VI you posted and unfortunately it doesnt work. It looks like the index array vi is only looking at the zero index and not the other 26 fields in each row. This would probably require a FOR LOOP to go through each field index. This is what I have and it works on a smaller version of the file. For some reason LV is using up bucket loads of memory to run this smaller file and crashes running the 60MB file. I've attached one of my vi's to solve this problem and the smaller data set. You'll see in the beginning that I trim some columns and rows to leave just the data I want to scan. Thanks again for the help.
        I just tried send 3 months worth of one minute data and it failed. So here is a really small version, 20 minutes worth of data. Does anyone see anything that would cause memory usage issues here?
    ssmith
    Attachments:
    Find-999NoLoops.vi ‏17 KB
    TEST2MET.txt ‏3 KB

  • Wiring write to spreadsheet.vi to read from spreadsheet.vi and plot the data

    I need to plot the data file from the two 'write to spreadsheet.vi' into a graph. Does anyone know how should I connect the 'read from spreadsheet.vi' so that I can plot my data?
    Please refer to the snippets.
    Thanks.
    Attachments:
    read from spreadsheet.png ‏31 KB

    Hi Lynn,
    You're asking the very same question that I've been wondering about because I don't have the time info. I've found an example that have both info, temperature and time in two colums in one file..it uses two Index Array for time and temp, use the bundle feature, display the plot in an XY graph. So, that was an easy one, but apparently my case is different.
    I've a program that collected the data from simulated signals and it is plotted in a waveform graph against time (amplitude vs time), and a power spectrum (amplitude vs frequency). But the data that I collected are the RMS values and power spectrum amplitude...so, I'm not sure where the time data go. I need to figure this out.

  • 求助: 如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi, 并且如何定义它们的路径???

    请问如何使用write to spreadsheet file.vi 和 read from spreadsheet file.vi,我知道spreadsheet file.vi只支持.txt文件,但我应该在哪里设置它们的路径呢,请各位帮忙指点,能不能具体说明下,谢谢...

    write to spreadsheet file.vi 和 read from spreadsheet file.vi,支持.xls文件.
    可以在path处设置它们的路径.

Maybe you are looking for

  • Integration error SSL failure running another product

    Dear All, I am facing some problem while running reports from forms SERVER: •     OPERATING SYSTEM: Windows.8 •     Database: ORACLE 11g •     Forms & Reports = 6i. In form when click any report button to call report some time error comes. FRM-41211:

  • How can I use "Free Selection" in Dunning?

    Hi, I am trying to generate the Dunning notice for only Customers that have the Dunning Area Code as 01. For that I am using the 'Free Selection". I have selected the Customer master and then the dunning area and didn't checked the Exclude box and th

  • In iMovie, I want to select 1 minute out of a 12 minute clip, but I can't see any times anywhere when I'm trimming the clip, help?

    When I'm trimming, all I see is 1.2, 1.3 minutes, etc. I need a clock, which seems like a simple ask to me. Find where the clip is at 1min33secs and grab from there to 2min50secs. Can this be done???

  • Arabic support under MAC OS X 10.4; 10.5

    hello, i have an application written in flex, using standart textfield for inputs. i tested it under windows - it work all fine, but under max os x 10.4 under safari 1.3 and firefox 3.0 i cant write arabic characters. in other forms in browser arabic

  • Shake

    I am happily using Aperture on my MacBook. I just noticed Apple announcement that Shake's price is reduced from $4000 to $500. That made me take a look at what that software is. Wow! Did I misunderstand it or could Apple make us PhotoShop independant