Read two lvm files with different length

I'm trying to read to same graph two different measurements with same starting point, starting point is OK.
But when the shorter file is coming to the end the VI stops with following message:
"Possible reason(s):
LabVIEW:  End of file encountered.
=========================
NI-488:  Invalid argument or arguments to function call."
How can I come over this and get both measurements into same graph in their full length with same starting point?
PS I have attached the VI file, a short and a long measurement file. Changed the file extension from LVM to TXT
Attachments:
Read_duo.vi ‏128 KB
SE1100_ny_1.txt ‏249 KB
SE1100_ref_1.txt ‏468 KB

Hi,
Apprently your LabVIEW is set with the option "enable automatic error handling", you can change this in tools >> options block diagram untick the option.
Doing this will only get ride of the dialog when the error occurs but not get read of the error.
So you are reading your files chunk by chunk in your while loop, so at some point you will get to the end of your files, when you do the VI you are using return an error 4 "end of file reached", from here you have different possibilities, if you want to be able to read files that have different length, here is a quick way to ignore the "end of file" error on both files independantly.
Hope this helps
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

Similar Messages

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • SSIS project - read multiple flat files with different formats

    hi all,
    i need to import multiple flat files with different formats into different tables of the sql server database and not able to figure out the best way out in ssis to do so...
    please advise the possible methods in ssis to do so and if possible the process which can be dynamic as file names or columns might change in future.

    Hi AK1987,
    To import flat files with dynamic columns, we can use Script Task inside a Foreach Loop Container to parse the first row of the flat file to get the columns names and save them into a .NET variable, then, we can create “Create Table” script based on this
    variable, and then store the script into a SSIS package variable. After that, we create a staging table based on the package variable, load the flat file data to the staging table. Eventually, we load data from the staging table to the destination table. For
    the detail steps, please walk through the following blog:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    Regards,
    Mike Yin
    TechNet Community Support

  • Reading a text file with different delimiters using Scanner

    Hello,
    I'm trying to read text from a file using ", " as a delimiter between Strings using a Scanner. I tried reading one line and then using the split() method in the string class, split each string by it's delimiter. I tried using an ArrayList to store each split token and the compiler is giving me some sort of syntax error when I'm pretty sure its right. If help can be given, it would be greatly appreciated. Thank you
    Here's my code
    Scanner input = new Scanner(backupFile);
    input.useDelimiter("[, ]");
    while (input.hasNext()) {
    ArrayList<String> list = new ArrayList<String>();
    String s = input.nextLine();
    String delims = "[, ]";
    list.add(s.split(delims));
    for(int i = 0; i < list.size(); i++)
    System.out.println(list.get(i));
    list.clear();
    }

    s.split(delims) will return an array of strings, not a string. So you need to declare list as an array list of such arrays:ArrayList<String[]> list = new ArrayList<String[]>();(It's a good idea to copy and post compiler messages here, so no-one has to guess. Likewise indicate which line of your code they are referring to.)
    [Edit]If it only the contents of the array you wish to put in the array, then you can just say List list = Arrays.asList(s.split(delims));

  • Reading fixed length file with different record types

    Hi,
    I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
    But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
    How we need to read such files.
    Thanks
    Ravdeep

    hi ,
    u cannot use the default wzard for this
    use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • From sap to excel file with different sheets?

    can  i upload   an internal table  from  SAP to single Excel file with different sheets for example like : sheet1, sheet2, sheet3.......sheet10. , but need to upload data from sap to excel worksheets ie. from multiple named tabs in Excel. Is this possible, and if so, please can you help and advise me how?
    thanks
    venkat.
    Edited by: Matt on Feb 16, 2009 2:15 PM  Removed excessive question marks...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Hi venkat,
    Yes indeed it is possible to write data from internal table to different excel sheets. Check out SAP's Microsoft OLE functionality.Search on SDN for OLE . Following are some links
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sample%252bprogram%252bto%252bopen%252bexcel%252bsheet%252busing%252bole
    You can also check out FM ALSM_EXCEL_TO_INTERNAL_TABLE to check how to read different worksheets.
    Using the above two resources you can create a program that can upload data to multiple worksheets in the same workbook.
    Also see this link
    Creating Excel with More than one page
    Edited by: aditya aghor on Feb 16, 2009 1:57 PM
    Edited by: aditya aghor on Feb 16, 2009 2:02 PM

  • Creating pdf-file from multiple files with different orientation

    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?

    lophelia wrote:
    How do I put together two files with different orientation in the page set up so that the lying A4-format is standing up in the new pdf-file?
    First I've underline a Phrase in your Question did you mean underlying A4-format?
    Are both PDF Files created with A4-Format? If yes then:
    Did you shift orientation to Portriat Format for the item(s) that you need, such as a Chart or an excel Document? If so:
    Then when the documents are meged  They should print correctly.

  • Read two CSV files and remove the duplicate values within them.

    Hi,
    I want to read two CSV files(which contains more than 100 rows and 100 columns) and remove the duplicate values within that two files and merge all the unique values and display it as a single file.
    Can anyone help me out.
    Thanks in advance.

    kirthi wrote:
    Can you help me....Yeah, I've just finished... Here's a skeleton of my solution.
    The first thing I think you should do is write a line-parser which splits your input data up into fields, and test it.
    Then fill out the below parse method, and test it with that debugPrint method.
    Then go to work on the print method.
    I can help a bit along the way, but if you want to do this then you have to do it yourself. I'm not going to do it for you.
    Cheers. Keith.
    package forums.kirthi;
    import java.util.*;
    import java.io.PrintStream;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import krc.utilz.io.ParseException;
    import krc.utilz.io.Filez.LineParser;
    import krc.utilz.io.Filez.CsvLineParser;
    public class DistinctColumnValuesFromCsvFiles
      public static void main(String[] args) {
        if (args.length==0) args = new String[] {"input1.csv", "input2.csv"};
        try {
          // data is a Map of ColumnNames to Sets-Of-Values
          Map<String,Set<String>> data = new HashMap<String,Set<String>>();
          // add the contents of each file to the data
          for ( String filename : args ) {
            data.putAll(parse(filename));
          // print the data to output.csv
          print(data);
        } catch (Exception e) {
          e.printStackTrace();
      private static Map<String,Set<String>> parse(String filename) throws IOException, ParseException {
        BufferedReader reader = null;
        try {
          reader = new BufferedReader(new FileReader(filename));
          CsvLineParser.squeeze = true; // field.trim().replaceAll("\\s+"," ")
          LineParser<String[]> parser = new CsvLineParser();
          int lineNumber = 1;
          // 1. read the column names (first line of file) into a List
          // 2. read the column values (subsequent lines of file) into a List of Set's of String's
          // 3. build a Map of columnName --> columnValues and return it
        } finally {
          if(reader!=null)reader.close();
      private static void debugPrint(Map<String,Set<String>> data) {
        for ( Map.Entry<String,Set<String>> entry : data.entrySet() ) {
          System.out.println("DEBUG: "+entry.getKey()+" "+Arrays.toString(entry.getValue().toArray(new String[0])));
      private static void print(Map<String,Set<String>> data) {
        // 1. get the column names from the table.
        // 2. create a List of List's of String's called matrix; logically [COL][ROW]
        // 3. print the column names and add the List<String> for this col to the matrix
        // 4. print the matrix by inerating columns and then rows
    }

  • Interface output file : tab limited vs flat file with fixed length

    hey guys,
    any idea on difference b/w to file type : flat file with fixed length or tab limited file
    thanks

    Tab Delimited:
    Two Field are seperated by a TAB
    eg. SANJAY    SINGH
    First field is First Name and Second is Sir Name.
    Nth field will be after N -1 tab
    Fixed Length:
    Every field has a fixed starting position and length
    eg. SANJAY     SINGH
    Here First field start from Position 1 and has lenght 10 and 2nd field start from 11th postion and has lenght 10.
    Fixed Length -> The lenght of each field is fixed, while in tab delimited the lenght of field is not fixed but we know it ends when the Seperatot (Tab) is encountered.

  • HT1491 I have two itunes accounts with different Apple ID's.  How can I merge them into one?

    I ahve two itunes accounts with different Apple ID's.  How can I merge them into one account?

    Apple has no provisions for this. You cannot merge multiple Apple ID's into one ID. Content is always tied to the Apple ID that was used to purchase it.

  • Send a flat file with fixed lengths to XI 3.0 using a Central File Adapter?

    Hello,
    I'm wondering if someone have experience setting up conversion for different record structures. The example shown,
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter,
    (in a greate way) only picture one kind of structure.
    How should it be done if the file would contain
    10Mat1
    20100PCS
    The first record structure has columns
    ID(2),Material(10)
    The second redcord structure has columns
    ID(2),Quantity(3), Unit of messure (3)
    Brgds
    Kalle
    Message was edited by: Karl Bergstrom

    The configuration would be like follows:
    Content Conversion Parameters:
    Document Name: <your message type name>
    Document Namespace: <your message type namespace>
    Document Offset: <leave empty>
    Recordset Name: <any name>
    Recordset Namespace: <leave empty>
    Recordset Structure: row1,,row2,
    Recordset Sequence: any
    Recordsets per Message: *
    Key Field Name: ID
    Key Field Type: String
    Parameters for Recordset Structures:
    row1.fieldNames           ID,Material
    row1.fieldFixedLengths    2,10
    row1.keyFieldValue        10
    row2.fieldNames           ID,Quantity,UOM
    row2.fieldFixedLengths    2,3,3
    row2.keyFieldValue        20
    Instead of row1 and row2 you can choose any name.
    Regards
    Stefan

  • Automating the process of comparing two PDF file with the help of QTP(Automation Testing Tool)

    Can anybody help me with comparing the two pdf files with the help of QTP.I have Adobe Acrobat installed on my system and i have access to the API.
    Thanks,
    Varun Saini

    I want to find out more about QTP and API. Maybe that is what I want to compare two mechanical drawings for differences between them. (see “More than one pdf file in one window”. Is that what you are looking to do? 9Not necessarily mechanical drawings but some other pdf).

  • 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

  • Printing different/selective files with different copies

    Hi everyone,
    I've been working on finding a solution, on how to print different pdf files with different copies, without opening the pdf-files.
    Task:
    I have a folder, with 25 pdf files
    I want to make a php overview, of the folder
    At the end of each line/file - i would like to add a number for the copies
    In the end, I would like to simply press print - and every document ive added a number/copies to - are being printet...
    I guess I need to use PrintPDF - but does anyone know any pre-made program/function - that could handle the "copies" part...?
    I hope someone can help me out,
    Thanks
    Jan

    Well, i had hoped that the acrobat could open silent - eventhough they've removed that feature in the newer versions.
    Even though the program would open - if the amount of copies was added - and i just hat to press print - it would ease the job alot.

  • I can't open two eml files with Thunderbid

    I want to open two .eml files with Thunderbid. When I try to do it, I can open the first, but when I try to open the second Thunderbird doesn't do it.

    It sounds like the files that aren't working are likely corrupt or perhaps not properly designated as .eml files. When you say "Thunderbird doesn't do it" do you mean Thunderbird doesn't launch, or do you mean it tries to open the file and returns an error? The error could be helpful in the latter case, as could information about where the file came from. In the former case, FYI, when I drag attached .eml files (from e-mails forwarded as attachments) to my desktop, they are named "Inbox" (as opposed to Inbox.eml). I rename them to add the .eml and then I can open them with Thunderbird, but otherwise I will be prompted by Windows for what to do with them.

Maybe you are looking for

  • Mixing RAM from different manufacturer's?

    Hi i currently have 2.5 gig of ram that was installed by apple, and i am looking to add matched pair of 1 GB to give me 2 more gig of ram, and 4.5 total can i mix my standard ram with samsung ram? i dont want to buy and have it not work, also there i

  • Sqlpuls command is not working at Linux

    Hi, Oracle 11g has been installed successfully at Linux. Please find below output that I got after executing 'uname –a ' command: Linux <server_name> 2.6.9-89.0.25.ELsmp #1 SMP Mon Apr 19 06:05:15 EDT 2010 i686 athlon i386 GNU/Linux $ORACLE_HOME is a

  • How can I transfer songs from ipod to itunes

    I just found my old ipod and I want to transfer those old songs into my itunes and put it into my other idevices? ,Thank You

  • HORRIBLE BUZZING/HUMMING WHEN CONNECTING SYNTHESIZER TO GARAGEBAND?

    Hi! I want to connect my synthesizer to garage band so that I can use it as a live instrument when recording. I have a MobilePre USB from M-Audio. I just sent for an Imic, and I just bought a guitar cable adapter today from Griffin. Ok, when I use th

  • Probs Debugging PL/SQL proc JDev903

    Im trying to debug PL/SQL functions in JDeveloper 9.0.3. Issue N1. In Run PL/SQL window JDev adds schema name to my function and PL/SQL block fails to compile. Im manually deleting prefix from my function and block is compiled successfully. Then an e