I need help having my program read in finite amounts of data at a time

I've attached my diagram. The problem(s) I am having are as follows
I need to read the data from a .txt (alternately .lvm) file 250 entries at a time. The problem with the construction I have now is that the dynamic to array buffer kind of destroys the point of segmenting the data because it reads it in all at once. In addition, I need a way of reading and writing this data so that I am not using the express VI's.  Pretend my data file is say C:\data.txt and it is a single column of values approx. 5m entries long.
Further, I have set up the while loop to stop after everything has been processed, I need to set it up such that the while loop stops when all the data have been read in.
Thanks for the help.
Solved!
Go to Solution.
Attachments:
readindata.JPG ‏103 KB

Use the Number of Rows and Offset inputs and the Mark after Read output to get a segment of your array.  Put it into a loop until finished or until maximum amount of data you can handle at one time is in memory.
Lynn
Attachments:
Read Segments.vi ‏32 KB

Similar Messages

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • I need help with adobe iv reader.

    iam trying to pin a website using ie.it says the reader cannot read the website,i am not computer saavy so i donot know how to fix this issue, pls help,tyvm.

    i am trying to pin a website in internet explorer to my task bar,i get a 
    message that adobe v1 could not decode the website, i am not computer saavy
    so i  don't know what that means,plus this is a new computer 4 me.plus it
    worked fine  a few days ago. tyvm 4 ur help.
    regards,
    ray nist
    In a message dated 6/11/2013 9:27:11 P.M. Eastern Daylight Time, 
    [email protected] writes:
    Re: i  need help with adobe iv reader.
    created by Pat Willener (http://forums.adobe.com/people/pwillener)  in 
    Adobe Reader - View the full  discussion
    (http://forums.adobe.com/message/5400013#5400013)

  • I need help scrolling and highlighting for a vast amount of pics that I'm trying to transfer. I have a macbook pro osx 10.5.8

    I need help scrolling and highlighting for a vast amount of pics that I'm trying to transfer. I have a macbook pro osx 10.5.8

    I need help scrolling and highlighting for a vast amount of pics that I'm trying to transfer. I have a macbook pro osx 10.5.8

  • Can someone help with a previous post labeled "Writing to a data file with time stamp - Help! "

    Can someone possibly help with a previous post labeled "Writing to a data file with time stamp - Help! "
    Thanks

    whats the problem?
    Aquaphire
    ---USING LABVIEW 6.1---

  • I need help on this program..

    import java.util.*;
    public class D3
    private static int[] z = new int[100000];
    private static int first=z[0];
    private static int last=z[n-1];
    private static int n=100000;
    public static void main(String args[])
    Scanner input=new Scanner(System.in);
    for(int i=0;i<z.length;i++)
    z=2*i;
    int seqSearch(z;50000;n); //method call 4 key where key=mid
    int binSearch(z;first;last;50000);
    int seqSearch(z;35467;n); //method call 4 key where key in the left half
    int binSearch(z;first;last;35467);
    int seqSearch(z;89703;n); //method call 4 key where key in the right half
    int binSearch(z;first;last;89703);
    public int seqSearch(int z[];int key;int n)
    long start = System.currentTimeMillis();
    int count=0;
    int ans=-1;
    for(int i=0;i<n;i++)
    if z=key
    count++
    {ans=i
    break;}
    return ans;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
    public int binSearch(int z[];int first;int last;int key)
    long start = System.currentTimeMillis();
    int count=0;
    if(last><first){
    count++;
    index=-1;
    else
    count++;
    int mid=(first+last)/2
    if(ket=z[mid]{
    index=mid;
    else
    if(key><z[mid]){
    index = binSearch(z[];first;mid-1;key);
    else
    index=binSearch(z[];mid+1;last;key);
    return index;
    long elapsed = System.currentTimeMillis() - start;
    System.out.print("Execution Time:" + elapsed);
    System.out.print("# of Basic Operations:" + count);
    if anyone could please tell me whats wrong with my code i'd be greatful...the program is supposed to perform binary and sequential search on a sorted array of 100000 numbers.once on an item in the middle of the array once on the right side of it and once on the left side...i also need to count the number of basic operations for the same number in both sequential and binary to see whats better.and i need to check the time...i think the method call is wrong,not sure though...plz i need help.its not compiling and i dont know why..

    Just add new messages to a thread you've already created. Don't create a new thread each time.
    Anyway, look. This is wrong:int seqSearch(z;50000;n); //method call 4 key where key=midfor two reasons. The first is that leading "int"; it doesn't mean anything here. "int" is used to declare an integer variable, but you're not declaring a variable here, you're invoking a method. The second problem is that you're using semicolons to separate arguments in the method call, but actually commas are correct. You probably want something more like this:
    int result;
    result = seqSearch(z, 50000, n);  //method call 4 key where key=mid.
    Some more problems with your code: you're calling non-static methods in a static context (the main method is static and seqSearch isn't). You're also using "n" before you declare it, which is probably a problem.
    And this makes no sense:z=2*i;because you've declared z to be an array; you can't use the multiplication operator on an array. It's not clear really what you're trying to accomplish there.
    Here's what I want you to do. Take your code and completely remove the binSearch method. Just rip it out. Then in your main() method, take out all references to the binSearch method, and all references except for the first one of the seqSearch method. Fix the things I mentioned above.
    Then try to compile what you have. It won't compile. You will get error messages. That's OK. Just fix them and move on. If you don't understand an error message, ask on these forums (DON'T CROSSPOST), quoting the full error message and the relevant lines of code.
    After a couple hours, you'll fix the syntactical bugs, and your program will compile. Then you'll find that it compiles but the program doesn't work right. That's also OK. This is how computer programming works. It's part of the process. Don't panic. At that point, you can start trying to fix the program so it does what it's supposed to. Eventually you'll get it to work.
    Then, and only then add more invocations of the seqSearch method. They won't all work, probably. You'll find more bugs. That's OK. Just repeat the process of fixing them.
    When you've fixed those bugs, then, and only then, add the binSearch method. Repeat the process of fixing syntax and hunting down and fixing bugs.
    Then your program will work.

  • Need help with inventory program!!! someone please help me!!!

    Ok I have to write this inventory program for one of my classes.
    For part one i needed to Create a product class that holds the item number, the name of product, the number of units in stock, and the price of each unit.
    Then create a java application that displays all of the above info plus the total value of the inventory. I have done this so far with success.
    For part two i needed to modify the program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time including the item number, the name of the product, the number of units in stock, the price per unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory.
    so create a method to calculate the value of the entire inventory.(i did this)
    and create another method to sort the array items by the name of the product. ( i did this)
    The program compiles and runs fine except it is not doing anything from part two. It just does the same thing that it did when i wrote part one.
    Does anyone know why or what i need to do to my code.
    Here is my code.
    import java.util.Scanner; // program uses class Scanner
    import java.util.Arrays;
    class ProductList
      Product[] products = new Product[100]; // an array of 100 pruducts
      private void populate() {
        products[0] = new Product(0, "Good Luck Chuck"      , 25, 4.95);
        products[1] = new Product(1, "The Bourne Identity"  ,  3, 7.95);
        products[2] = new Product(2, "The Reaping"          ,  5, 8.99);
          products[3] = new Product(3, "Deja Vu"              ,  2,12.99);
          products[4] = new Product(4, "I Know Who Killed Me" ,  3,10.95);
      private void sortByTitle() {
      private void print() {
        for(int i=0; i<products.length; i++) {
          System.out.println(products);
    private void printTotalInventoryValue() {
    System.out.println("Total Inventory Value = "+calculateTotalInventoryValue());
    private double calculateTotalInventoryValue() {
    double total = 0D;
    for(int i=0; i<products.length; i++) {
    total += products[i].calculateInventoryValue();
    return total;
    public static void main( String args[] ) {
    ProductList list = new ProductList();
    list.populate();
    list.sortByTitle();
    list.print();
    list.printTotalInventoryValue();
    } class Product
    private int id;
    private String title;
    private int stock;
    private double price;
    public Product(int id, String title, int stock, double price) {
    setId(id);
    setTitle(title);
    setStock(stock);
    setPrice(price);
    public int getId() { return this.id; }
    public void setId(int id) { this.id = id; }
    public String getTitle() { return this.title; }
    public void setTitle(String title) { this.title = title; }
    public int getStock() { return this.stock; }
    public void setStock(int stock) { this.stock = stock; }
    public double getPrice() { return this.price; }
    public void setPrice(double price) { this.price = price; }
    public double calculateInventoryValue() {
    return getStock() * getPrice();
    public class Inventorypt2
    private String ProductInfo; // call class product info
    public static void main(String args[])
    //create Scanner to obtain input from command window
    Scanner input = new Scanner( System.in );
    int num; // product's item number
    int stock; // number of items in stock
    double price; // price each of item
    ProductInfo product; // product information instance
    System.out.println(); // blank line
    String name = "go";
    // loop until sentinel value read from user
    while ( !name.equalsIgnoreCase ("stop") )
    System.out.print( "Enter DVD title, or STOP to quit: "); // prompt
    name = input.nextLine(); // read item name from user or quit
    System.out.print( "Enter the item number: "); // prompt
    num = input.nextInt(); // read item number from user
    while ( num <=0 ) //loop until item number is positive
    System.out.println ("Item number must be positive. Please re-enter item number: ");//prompt user to re-enter item number
    num = input.nextInt(); // read item number
    } //end while
    System.out.print( "Enter the quantity in stock: "); // prompt
    stock = input.nextInt(); // read stock quantity from user
    while ( stock <0 ) //loop until stock is positive
    System.out.println ("Quantity in stock can not be less than zero. Please re-enter the quantity in stock: ");//prompt user to re-enter quantity in stock
    stock = input.nextInt(); // read stock quantity from user
    } //end while
    System.out.print( "Enter the price of DVD: "); // prompt
    price = input.nextDouble(); // read item price from user
    while ( price <=0 ) //loop until price is positive
    System.out.println ("Product price must be positive. Please re-enter the price of the product: ");//prompt user to re-enter product price
    price = input.nextDouble(); // read item price from user
    } //end while
    product = new ProductInfo( num, name, stock, price); // initialize ProductInfo variables
    System.out.println(); // blank line
    System.out.printf( "Item Name: %S\n", product.getName());
    System.out.printf( "Item Number: %s\n", product.getNum());
    System.out.printf( "Qty. in Stock: %s\n", product.getStock());
    System.out.printf( "Price Each: $%.2f\n", product.getPrice());
    System.out.printf( "Total Value in Stock: $%.2f\n", product.getInventoryTotal());
    System.out.println(); // blank line
    System.out.print( "Enter DVD title, or STOP to quit: "); // prompt
    name = "";
    while ( name.equals("") )
    name = input.nextLine(); // read new product name from user or quit
    } //end while
    System.out.println(); // blank line
    System.out.println("Good Bye!"); // exit message
    Edited by: jay1981 on Mar 16, 2008 2:07 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You will get more help if your code is formatted better:
    * Only post code that is already formatted correctly including indentations.
    * Get rid of all those comments cluttering up your code.
    * Make sure your posted code compiles without need for any changes. Yours doesn't at present. Where is the ProductInfo class?
    Again, you want it easy for a volunteer here to read your post, otherwise he/she simply won't do it. Good luck.

  • Need help writing small program!

    Hi. I'm learning Java programming, and I need help writing a small program. Please someone help me.
    Directions:
    Create a program called CerealCompare using an if-then-else structure that obtains the price and number of ounces in a box for two boxes of cereal. The program should then output which box costs less per ounce.

    class CerealCompare {
        public static void main(String[] args) {
            // your code goes here
    }Hope that helps.
    P.S. Java does not have an if-then-else statement.

  • Need help writing Java program

    I am a student conducting research as to the tolerance of users to a user interface. My idea is to take the existing tetris game but implement errors into it, so that on occasion the piece will not move in the direction you want it to. Also In the program there will need to be an introduction screen, 3 levels which end when you recieve a certain amount of points, a data table, for my use which collects information about time between moves, total time, par time( how long it would take if no errors occured), and levels completed. Also if a user fails to pass the level, at what point did they fail. The data will need to be organized in a logical order and finally there will need to be a way for me to retrieve the data. I already have the existing tetris code and I need to add to it, so if anyone could help me as I have no programming knowledge and I need this done as soon as possible, please contact me at [email protected] and I will be willing to pay for your time.
    Thanks,
    Ross

    I am a student conducting research as to the
    tolerance of users to a user interface. We call that Human Factors :-)
    My idea is to
    take the existing tetris game but implement errors
    into it, so that on occasion the piece will not move
    in the direction you want it to. So the idea is to piss the user off?!
    Also In the program
    there will need to be an introduction screen, 3
    levels which end when you recieve a certain amount of
    points, a data table, for my use which collects
    information about time between moves, total time, par
    time( how long it would take if no errors occured),
    and levels completed. okay...
    Also if a user fails to pass
    the level, at what point did they fail. The data will
    need to be organized in a logical order and finally
    there will need to be a way for me to retrieve the
    data. I already have the existing tetris code and I
    need to add to it, so if anyone could help me as I
    have no programming knowledge and I need this done as
    soon as possible, please contact me at
    [email protected] and I will be willing to
    pay for your time.
    Thanks,
    RossFirst of all, it's probably not a good idea to post your email address, not that anyone will email you anyway. Second, I'm not sure how you're going to accomplish this programming task if you don't know how to program. See the problem?

  • Hi everybody,need help in Dialog Programming

    Hi everybody,
              I am trying to learn Dialog programming , i am having materials to read, which includes syntax, i want a guidance to start the programming practically . Could anyone help me go through this, step by step. I know the T-code for dialog programming is SE80, what should be the next step to do some simple programs to start with, it would be great if someone help me with a small programming example.
    Thanks,
    Ranjani.

    Hello,
    Checkout this site <b>http://linuxgazette.net/101/sunil.html</b>.Hope it works.
    1) <a href="http://www.stata.com/support/faqs/lang/db-intro/db2.html">http://www.stata.com/support/faqs/lang/db-intro/db2.html</a>
    2) <a href="http://www.stata.com/support/faqs/lang/db-intro/db3.html">http://www.stata.com/support/faqs/lang/db-intro/db3.html</a>
    All the best......

  • Need help in pda programming

    Hi, I am new on pda programming. I already develop a java program using j2sdk1.4.2_05. I need to run this program in pda for my final project. Can i do this using creme? What version do i must use?
    If j2sdk1.4.2_05 can't, does jdk1.3.1 can?
    And anybody know where can i find pocket pc emulator so i can test my program on pc?
    Many Thanks before,
    tinna

    hi,
    I am currently doing a project in pda application. We are using jeode as a VM for the pda. But it uses java 1.2. Maybe you want to have a look at it. however u cant use the swing class in jeode and only awt is the class availlable for programming interfaces.
    If you need jeode u can contact me. I can give you a free copy which was availlable till last year as now it has gone chargable.
    Also do you have any idea about how can i read and write txt files or dat files from desktop using java. I want to use a usb cradle for connection.
    This information would be really appreciated as I need this for my second year project.

  • Need help writing Labview Program!!!!!

    I have a labview project that needs to be finished. I was not the original creator of the program and the guy who created no longer is involved with the project and I am left to finish it. Could you make the final adjustment so I can turn this into my professor and get the final grade. Thanks! Willing to pay! Negeotiable price!!!!!!!!

    Need help completing assignment! Could anyone assist me in this project!
    Attachments:
    dial tone detection.zip ‏1253 KB

  • I need help in some programs

    i'm new in a jave and i need to write some programs
    1) write a program that allows the user to enter a range of number. for that range of number, list the numbers and state their properties:
    prime or not rrime; deficient, perfect, or abundant; smith number or not.
    2) write a program that finds the largest Smith number possible that can be held in Java integer

    BigDaddyLoveHandles wrote:
    Psyber wrote:
    Here's the algorithm for perfect numbers:
    boolean p_num(int number) {
    int sum = 1;
    for (int n = 2; n <= number / 2; n++)
    if (number % n == 0)
    sum += n;
    return sum == number ? true : false;
    }Now hand over the dukes.Why not:
    return sum == number;
    Whaddya expect for 10 dukes?

  • Hi!  Need help!  I downloaded Reader 9.1 and now it won't install  Get error message "Error 1606. Could no access network location %APPDATA%\.  I'm about ready to trash my computer!  Thanks!

    Hi!  Need help desperately!  I downloaded Reader 9.1 and it won't install.  Get the error message "Error 1606.  Could not access network location %APPDATA%\.  Thanks!

    Hello again:
    I don't mean to step on any toes here but it seems that the root of the problem is being ignored. I offered before that the problems you are experiencing are due to inconsistencies in the Windows registry. While I could speculate on the various methods of how this came to be, I don't have that kind of time nor is there a need. More than likely it is some type of malware that has infected the system but that should be explored on more suited forums such as MajorGeeks.com or BleepingComputer.com. The way I see it, you have a few paths you can take, all of which will lead you to the same place: no more error 1606 and a functional Reader:
    Option 1: Run the Windows Live OneCare free safety scanner to resolve any broken registry links it can find.
    Option 2: Manually fix the "broken" registry entries in the Windows registry. While I understand Pat's hesitation to do so, the truth of the matter is it will resolve the immediate issue. Once the APPDATA path is corrected, you should then be able to install Reader.
    Option 3: Restore Windows to a previous date using System Restore located in Help & Support of the Start menu.
    Option 4: [SLEDGE HAMMER] Reinstall Windows over the top of the current installation (NO FORMAT). Use this option only if you have no other recourse. The potential to lose all personal data and settings is high if this option is not performed correctly. If this option is chosen, be certain to use a "setup" profile (username) different than your current username. If you only have a manufacturer's system restore disk rather than a Windows CD/DVD, you may not have the option NOT to format which WILL result in the loss of personal data. This option should only be performed by someone who has previous knowledge of such or is willing to learn even at the expense of data loss/time/effort.
    I HIGHLY recommend that any and all personal data is backed up to an external location such as a USB key, CD/DVD, or external hard drive prior to performing option 2 or 4 above. If you would like any of the options explained in greater detail, feel free to ask and I will oblige.
    Best of success!
         Michael

  • Need help in SQL programming

    hi all ,
    we need a simple query which needed for avoiding the custom code in our Reporter Engine.
    Existing report :
    Aggregate Usage by Volume
    Tables involved:
    ent_host_disk_usage : (used mb of aggregate and volume mapped to the aggregate are in same table)
    netapp_volumes_to_aggregates_current : mapping between the aggregate and volume
    devices
    this should show the current and historical information based on the quick report selection .the existing report uses the
    current data for historical query also.
    solution we need:
    we need the template query to use the ent_host_disk_usage as the base table, so when the current option is selected it uses the ent_host_disk_usage_current table
    and when the summary options are selected it uses the ent_host_disk_usage table for both volume and aggregate.
    Who ever gives the best query will be greatly thanked
    Refer the below table for the example:
    disk_usage     table     
    filesystemid    usedmb    spType
    aggr     10000     aggregate
    /vol      100         FS
    c:        1000        FS
    aggr2   5000       aggregate
    d:        100         FS
    f:         200         FS
    e:        300         FS mapping     table
    aggregate name     filesystemid
    aggr1     /vol
    aggr1     c:
    aggr2     d:
    aggr2     f:
    aggr2     e:Report:
    name     used     vol     used
    aggr1     10000     /vol     100
    aggr1     10000     c:     1000
    aggr2     5000     d:     100
    aggr2     5000     e:     300
    aggr2     5000     f:     200Edited by: user11101052 on Apr 25, 2009 10:01 AM

    Hi, Thara,
    I see you added &#123;code&#125; tags to your original message. That's great! It's clearer now.
    It looks like you put &#123;code&#125; before and after every row of the table. That's not necessary. In the future, just type it once before the first row of a table, and then again after the last row. That will be a lot less work for you, and the message will be even easier to read.
    Sorry, I don't understand the problem:
    user11101052 wrote:
    The base table should be ent_host_disk_usage , so that it can be switched to current and history tables depending on the data that is being displayed.Are you saying that, for some rows, you'll want to join host_disk_usage to a table called "current", and for the other times you'll want to join to a table called "history"?
    There are a lot of ways to get those results. The simplest might be to always join ent_host_disk_usage to both tables (outer join, if necessary), and use a CASE statement to pick columns from either current or history.
    Another possible solution is to join ent_host_disk_usage to a UNION of current and history.
    Please post a little sample data and the results you would want if your tables contained only that data.
    Post just enough to show what the problem is: I'll bet 2 columns and 2 to 5 rows in each table could show what you want to do. Once you have an answer to the simplified problem, adding all the other columns that you really need will probably be trivial.

Maybe you are looking for