Charting data from text file in LabVIEW 5.1 for Windows

I am having some difficulties trying to figure out how to plot a chart with
data from a file. I would like to be able to read data from a text file
into a chart using LabVIEW 5.1 for Windows. I have looked in the help
within the program and online. I have also looked in the user manual and
the book "LabVIEW for Everyone". Could you please give me specific
instructions on how I would construct the program to be able to do this.
Thank you.

Hi Ellie,
It depends on how data is stored in that txt file. Usually you load the data into an array either using or , the array if necessary and send it to the graph indicator in required form. If you want a more detailed answer, send me a sample data file ([email protected]).

Similar Messages

  • Read data from text file one by one using for loop

    Dear Forum
    I want to read data of single colum of text file inside the for loop one by one(for each iteration value must be replaced by another value of text file).This value is used by a formula inside for loop. also after completion of iterations the values must be plotted on xy graph. How to do it.? please help me.
    profravi

    It's not very efficient to read a file line by line. Much simpler to read it all at once and then auto-index the results inside a for loop. The image below shows a generic solution to your problem. This assumes that the data in the file is in a single column.
    I would also recomend checking ou the learning LabVIEW resources here.
    I would aslos suggest that since this type of question is not specific to either NI-Elvis or the LabVIEW SE, you should post similar questions to the LabVIEW board. If you have problems, attaching a sample of the text file would help.
    Message Edited by Dennis Knutson on 10-18-2007 09:11 AM
    Attachments:
    XY Graph From File.PNG ‏4 KB

  • Cant get data from text file to print into Jtable

    Instead of doing JDBC i am using text file as database. I cant get data from text file to print into JTable when i click find button. Goal is to find a record and print that record only, but for now i am trying to print all the records. Once i get that i will change my code to search desired record and print it. when i click the find button nothing happens. Can you please take a look at my code, dbTest() method. thanks.
    void dbTest() {
    DataInputStream dis = null;
    String dbRecord = null;
    String hold;
    try {
    File f = new File("customer.txt");
    FileInputStream fis = new FileInputStream(f);
    BufferedInputStream bis = new BufferedInputStream(fis);
    dis = new DataInputStream(bis);
    Vector dataVector = new Vector();
    Vector headVector = new Vector(2);
    Vector row = new Vector();
    // read the record of the text database
    while ( (dbRecord = dis.readLine()) != null) {
    StringTokenizer st = new StringTokenizer(dbRecord, ",");
    while (st.hasMoreTokens()) {
    row.addElement(st.nextToken());
    System.out.println("Inside nested loop: " + row);
    System.out.println("inside loop: " + row);
    dataVector.addElement(row);
    System.out.println("outside loop: " + row);
    headVector.addElement("Title");
    headVector.addElement("Type");
    dataTable = new JTable(dataVector, headVector);
    dataTableScrollPane.setViewportView(dataTable);
    } catch (IOException e) {
    // catch io errors from FileInputStream or readLine()
    System.out.println("Uh oh, got an IOException error!" + e.getMessage());
    } finally {
    // if the file opened okay, make sure we close it
    if (dis != null) {
    try {
    dis.close();
    } catch (IOException ioe) {
    } // end if
    } // end finally
    } // end dbTest

    Here's a thread that loads a text file into a JTable:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=315172
    And my reply in this thread shows how you can use a text file as a simple database:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=342380

  • How read data from *.LB File in LabVIEW?

    Hi dear specialist,
    How I can read data from  *.LB File in LabVIEW?
    Thanks` Hovo

    Thanks Ben, but when I open it as datalog file` comes following error:
    Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi
    Error 71 occurred at Open/Create/Replace Datalog in Simple Temp Datalog Reader.vi
    Possible reason(s):
    LabVIEW:  File datalog type conflict.
    C:\Documents and Settings\Home\Desktop\a.lb
    Here is an example of lb file (a.lb), and here is a VI for read datalog file(Simple Temp Datalog Reader.vi)
    What means this error?
    How I can read a byte at a time?
    Attachments:
    testForLB.zip ‏101 KB

  • Loading data from text file into ListBox

    I have data in a text file that I want to load into a
    listbox... I have fully mastered handling strings and arrays so I'm
    going to need some help...
    I was wondering how do I get flash to load a text file that
    contains the data below.. and display it line for line like I want
    it to list down the component
    "Launch;7.1.7.6"
    "Engine;7.1.7.6"
    "OSX;7.0.0.2" (or something close to that)
    and I was wondering how do i just get it to take it fromt he
    file.. line for line from where it says exeversion in the file and
    list it in the listbox...
    I'm really thankful to anybody that helps.
    Data in text file:
    quote:
    exeversion=Launch;7.1.7.6;
    exeversion=Engine;7.1.7.6;
    exeversion=LinuxX86;7.0.0.2;
    exeversion=LinuxPPC;7.0.0.2;
    exeversion=LinuxMIPS;7.0.0.2;
    exeversion=OSX;7.0.0.2;
    exeversion=Config;7.1.7.6;
    exeversion=UI;7.1.7.7;
    exeversion=JAVA;7.0.4.5;

    nobody cna help me? i really need to know or have a tutorial
    or something so i can learn from it... i really appreciate anyone
    who helps

  • Unable to find file error while loading data from text file to Oracle

    Hi,
    I am having a interface where i am loading a data of Text file to Oracle.
    But when i am trying to do this i am getting following error.
    ODI-1227: Task SrcSet0 (Loading) fails on the source FILE connection SAPMM.
    Caused By: java.sql.SQLException: File not found: d:/mdb/#General.get_filename
         at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:160)
         at com.sunopsis.jdbc.driver.file.impl.commands.CommandSelect.execute(CommandSelect.java:57)
         at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
    SAPMM is connection name.
    I am using get_filename to get the filename and it is fetching correct value as the this variable refreshes in previous step of this interface.
    KM used for loading is File to SQL
    What would be cause of this error?
    Thanks,
    Mahesh

    Hi,
    Did a testing and following are the result
    I have
    A> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    Package executes successfully.
    B> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Scenario of Interface which gets the file name from v_filename and load into target table
    Package executes with erre as it is not able to find the file
    C> created package having steps like
    1. Declaration of variable v_filename.
    2. Refreshing variable v_filename.
    3. Execution of Interface which gets the file name from v_filename and load into target table
    4. Now create a scenario of the package , use the generated scenario in another package say main_package
    Execution of main_package is successful.
    Thanks,
    Sutirtha

  • How to extract data from  text file to database table

    Hi ,
    I am trying to upload  data in text file to database table  using GUI_UPLOAD function .what would be the program for that.
    thanks in advance.

    Hi,
    I don't think you have a standard sap program to upload data from file to database table...
    Instead you can create a custom program like this..
    DATA: T_FILEDATA(1000) OCCURS 0 WITH HEADER LINE.
    DATA: T_ZTABLE LIKE ZTABLE OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\TEST.TXT'
      tables
        data_tab                      = T_FILEDATA
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT T_FILEDATA.
      T_ZTABLE = T_FILEDATA.
      APPEND T_ZTABLE.
    ENDLOOP.
    MODIFY ZTABLE FROM TABLE T_ZTABLE.
    COMMIT WORK..
    Thanks,
    Naren

  • CO-PA load data from text file

    Hello
    At present, in our company, we load data from Excel files to CO-PA. Is there any way to load those data to CO-PA from text files ?
    I will be grateful for any suggestions.

    You can create a structure using KEFA, assign the Value fields in KEFB and then use KEFC to upload data against that structure.
    You have various file format options, but I don't think Excel is one of them... you have have to save the file as txt and upload.
    Play around with those transactions and come back if you need additional help.
    Cheers.

  • Unable to Upload data from text file into BEx Analyzer selection screen

    Hi,
    No response from BEx Analyzer when I am trying to upload around 40,000 material from text file into BEx Analyzer selection screen using "Upload selections" options. But I am able to upload only 10,000 material from text file.  I never faced same kind of issue when I am using BEx Analyzer 3.x.  Please let me know I have to change any settings related to BEx or any other.
    Thanks
    Sri Krishna Ponnada.

    Hello
    It seems you are reaching the .NET memory limitation informed in note 1040454.
    Because 3.5 does not use .NET it can work that.
    Regards,
    Ricardo

  • Remove duplicates while loading data from text file

    Hi,
    Data in text file (some times has duplicates) is being loaded into Oracle 9i database using Informatica. To improve performance, we would like to remove duplicates at the time of each load using Oracle procedure. Could you please help me with this?
    Thanks,
    Lakshmi

    No, our table doesn't have that. Most of the functionality is managed at the informatica level. Is there any other way? Thanks,

  • How to Read data From Excel File in Labview 8.5?

    We can read it from xls file, but it is encrypted..... we need exact data...

    i have attached that excel file...i want to extract the full data from that file..how i can read it...when i read by using "Read from spreadsheet file" function, data was in encrypted form....so please send me the correct way...
    Attachments:
    stn_auto.xls ‏40 KB

  • Read and average n data from text file

    I acquire numeric data from the oscilloscope [reading a waveform] that is stored in one column in a text file.
    I need to read in selectable amount of data points to average/plot them.
    So basically I wanna have a text file with millions of data points but I wanna plot say only every 1000. data point. I have tried many things I found here on the forum but as I am new to LabView, none of them really worked.
    Does anybody have a suggestion.
    Thanks.
    Solved!
    Go to Solution.

    Hi,
    among others I have tried to build the VI below but somehow I cannot get to the desired solution because according to the indicators it always stops after the first loop.
    Can you have a look please?
    Thanks.
    Attachments:
    read_and_average.vi ‏13 KB

  • Screen data entry box that displays data from text file AND write back to file.

    I want the user to be able to view/edit a 'setup file' FROM THE SAME INDICATOR BOXES for a application. I tried to read the file(text), display individual data in indicator boxes and re-write file when user is finished. This causes errors since you can't use indicators boxes as inputs for the file write. Is there some kind of indicator/control/data entry box that the user can view the data, edit the data, and re-write the data from the box???

    hi
    I have created this example for your reference.
    I modified the Configuration File Examples in LV Examples, together with a few file check & create functions.
    Hope this will help.
    Note: The Configuration File Example from LV are COOL, indeed.
    Cheers
    ian.f
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    iFunc_Setup_Config_File.zip ‏102 KB

  • Error while loading the data from text file

    Hi,
    I got an error " Data Value Encountered before all Dimensions selected" while loading the data from the text file.
    Can any one please suggest me the solution.

    Possible Solutions
    Make sure that the data source is valid.
    Is a member from each dimension specified correctly in the data source or rules file?
    Is the numeric data field at the end of the record? If not, move the numeric data field in the data source or move the numeric data field in the rules file.
    Are all members that might contain numbers (such as "100") enclosed in quotation marks in the data source?
    If you are using a header, is the header set up correctly? Remember that you can add missing dimension names to the header.
    Does the data source contain extra spaces or tabs?
    Has the updated outline been saved?

  • Deleting data from text files

    Hi there,
    I am having a real battle trying to delete data from a text file I am using. There seems to be this giant cloud with Java, where there is no real easy way to delete text from a file??
    I have a JFrame with two textfields on it where you enter the username and pcname. There is a OK button once you have entered those details.
    On action event I would like those two details, to be removed from the text file that has been read in.
    I have a text file like this:
    bob
    pc1
    bill
    pc2
    The data above gets written no problem, one at at a time using the below.
    File f = new File("\\c:\\filename.txt");
    String strToWrite;
    try
    FileOutputStream fstr = new FileOutputStream(f);
    strToWrite = username1+ '\r'+'\n' ;
    byte[] bytes = strToWrite.getBytes(); fstr.write(bytes);
    strToWrite = pcname1 + '\r'+'\n' ;
    byte[] bytes2 = strToWrite.getBytes(); fstr.write(bytes2);
    strToWrite = username2+ '\r' +'\n' ;
    byte[] bytes3 = strToWrite.getBytes(); fstr.write(bytes3);
    strToWrite = pcname2 + '\r'+'\n' ;
    byte[] bytes4 = strToWrite.getBytes(); fstr.write(bytes4);
    catch (IOException e)
    System.out.println("Error -- " + e.toString());
    To read them back in I have made the follwoing:
    BufferedReader br= null;
    Count = 0;
    try
    br = new BufferedReader(new InputStreamReader(new FileInputStream("\\c:\\filename.txt")));
    String s = "";
    while((s=br.readLine()) != null )
    Count = 1;     
         //System.out.println("Data is " + s);
         inboundtext = s;
         if ( Count == 1 )
    break;
    while((s=br.readLine()) != null )
    //System.out.println("Data is " + s);
    inboundtext = s;
    Count = 2;
    if ( Count == 2 )
    break;
    catch(IOException ie)
    finally
    try
         if(br!=null) br.close();
    catch(Exception e)
    Now the above I know, is reading each line of the text file one at a time.
    Now what I would like is that when the text that we got from the textfields, using getText(), be removed from the file without destroying the rest of the records in there? Why is it so easy to add and replace files, but not do any deleting from them?
    please help!!

    sorry, FileOutputStream fstr = new FileOutputStream(f);
    should be FileOutputStream fstr = new FileOutputStream(f, true);

Maybe you are looking for

  • I want to connect the ipod directly to the car 's speakers without any amplifiers, is there any danger to burn the ipod?

    I want to connect the ipod directly to the car 's speakers without any amplifiers, is there any danger to burn the ipod?

  • Hyperion Financial reporting - edit data mode?

    Does anyone know if you can edit data in a cell in a financial reporting report - displayed in HTML view?  Source is regular block storage essbase.  version 11.1.2.3.  I can't seem to get it to work.  Maybe there is a setting in some properties file

  • ER diagram for Oracle 8i database

    Hi all, I'm working as DBA in a banking environment and have got a request to provide the ER diagram of a database(Oracle 8i). The DBAs who have created this database in Year 2000 are not here currently and there is no documentation on the db design.

  • Enhanced podcast in separate window?

    I have made a enhanced audio podcast, and the chapter/images show up fine in the iTunes main window. However, if I click the small image to pull up a larger image, the larger image does not update as the podcast continues to play. In other words, for

  • Problems with "Signatures" in Mail...

    Two separate head scratches here: 1. First of all, in the pop up window "Choose Signature", it is grayed out saying "none", and won't allow me to select any of the two footers I have created. --- It used to work, but when I recently tried to add a ne