Need help with while loop and shift registers

I have a large data set and need to read in the data at maybe 200 samples at a time, process these samples through my VI, and have it append and concatenate a separate lvm file.  The part where I am confused is the shift registers. How do I limit the number of samples read in an iteration? How do I get the while loop to stop when all the data are read in?
I've attached my diagram, maybe there is something wrong with my technique?
Solved!
Go to Solution.
Attachments:
shiftreg.JPG ‏56 KB

This will give you an idea.  There are plenty of other (probably more efficient) methods.  This is a basic, quick and dirty solution to help you grasp the overall concept.
Using LabVIEW: 7.1.1, 8.5.1 & 2013
Attachments:
ShiftRegLoop.JPG ‏54 KB

Similar Messages

  • Need help with while loops

    Hello let me first explain what im trying to achive:
    I want a moving square that you control with the arrow keys on the keyboard. It has to be smooth ie able to move fast without looking like its jumping and it has to be able to move diagonaly aswell. Think of that arcade game Raiden ...you know the birds-eye view plane flying game...another thing! I'd prefer if it didnt use timers - i made one already using 4 timers and it works great but 4 timers is a little extreme - SO NO TIMERS !
    I was thinking while loops, but i cant seem to get it working. I dont want to put in all the code so ill just say that I have 4 booleans: up, down, left right and the following code:
    public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_UP) {
    up = true;
    if (e.getKeyCode() == KeyEvent.VK_DOWN) {
    down = true;
    if (e.getKeyCode() == KeyEvent.VK_LEFT) {
    left = true;
    if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
    right = true;
    repaint();
    For the KeyReleased part i have the same as above exept it sets the booleans to false.
    Soooo in theory if i set up a while loop like this (using the up direction as an example) :
    while (up == true) {
    [move square up]
    So therefore when i press and hold the up arrow the loop will keep going untill i realease it right? WRONG ! it just keeps repeating indefinatly and it doesnt even do the " [move square up] " bit. I put a System.out.print in the loop to test and it kept printing out the message but it still didnt do the actual " [move square up] " bit.
    Im not sure if im putting the while loop in the right place either....If anyone has any idea on how to use while loops in this way please heeeelp ! Its so annoying because it just doesnt work ive tried so many ways...
    any help would be greatly apreciated !!!!

    Maybe you want something like this? You have to pause during the loop to allow for other events to happen, like if y ou release a key or whatever.
    while( true )
       if( up ) moveUp();
       else if( down ) moveDown();
       if( left ) moveLeft();
       else if( right ) moveRight();
       try
          Thread.currentThread().sleep(10);
       catch( InterruptedException e )
          System.out.println( "Thread interrupted!");
    }

  • Need help with while loop

    Hi,
    I'm running a while loop to run through some results of a search. Anyway I know how to list the strings but my last item is a JComboBox (drop down box.) How do I go about changing that so its right for a drop down box. Its the one with questions marks in the code below.
            while (srs.next())
            //Get the values for each field in this row
            String projectName = srs.getString("PROJECT_NAME");
            System.out.println("Project Name = " + projectName );
            String projectOfficier = srs.getString("PROJECT_OFFICER");
            System.out.println("Project Officer = " + projectOfficier );
            String projectDescription = srs.getString("PROJECT_OFFICER");
            System.out.println("Project Description = " + projectDescription );
            String paymentSchedule = srs.getString("PAYMENT_SCHEDULE");
            System.out.println("Payment Schedule = " + paymentSchedule );
            String banksInvestment = srs.getString("BANKS_INVESTMENT");
            System.out.println("Banks Investment = " + banksInvestment );
        ?   String paymentsMade = srs.getString("PAYMENTS_MADE");
        ?   System.out.println("Payments Made = " + paymentsMade );Thanks.

    Yeah the Payments Made part is a JComboBox with 3 so called strings inside it. I wanna know instead of srs.getString what should I put in to replace String to get the results from a JComboBox?

  • Need help with while loop format

    I'm building a form - everything works but I would like to change the way the data is output into the table.
    In other scripting languages, like PHP, you had 2 different ways of dealing with a loop:
    <?
    do while xyz
    do something here
    ?>
    - OR -
    <? do while xyz:?>
    do something here
    <?end while ?>
    I would like to do something similar to the 2nd example in .jsp but I'm not sure of the format or how to stop the loop. From the tutorial, I'm using
    <%
    while(SQLResult.next())
    UId = SQLResult.getString("uid");
    FName = SQLResult.getString("fname");
    LName = SQLResult.getString("lname");
    out.println("<tr><td>" + UId + "</td><td>" + FName + "</td><td>" + LName
    + "</td></tr>");
    %>
    Could anyone point me in the right direction? I'd prefer it if I didn't have to build the table like this if I don't have to but haven't found anything anywhere telling me otherwise.
    Thanks so much.
    Bob

    Sorry - the answer was in JSP:Java Server Pages by Barry Burd. I had just gotten the output format wrong.

  • Need help with Blog, Wiki and Gallery

    Hi Team,
    Need help with Blog, Wiki and Gallery startup. I have newly started visiting forums and quite interested to contribute towards these areas also.
    Please help.
    Thanks,
    Santosh Singh
    Santosh Singh

    Hello Santhosh,
    Blog is for Microsoft employees only. However, you can contribute towards WIKI and GALLERY using the below links.
    http://social.technet.microsoft.com/wiki/
    http://gallery.technet.microsoft.com/

  • Need help with Page Layout and Background Scaling

    hello, everyone.
    I am in the process of designing a new website for myself,
    and while I was researching nicely designed pages to use as
    inspiration, I stumbled upon this site:
    http://www.jeffsarmiento.com/
    obviously, the design is very impressive, but it also
    incorporates a lot of web mechanics that I have been trying to
    figure out, so I will use this page as an example.
    one thing I need help with is backgrounds. as you can see in
    the posted website, the creator used a seamlessly tiled paper
    texture to display the bulk of his content on. also make not of the
    pattern that is located to the left of the paper texture. how do I
    create seamless backgrounds like this that will scale to fit any
    amount of content or any resolution? I can't imagine that the guy
    that made that site created a new size background every time he
    made an update, so there has to be an easier way.
    the second thing that I am having trouble with is general
    site layout. I have read that most sites used series of invisible
    tables to organize there content, but when I open the source of
    this page in dreamweaver, he was using something different. div
    tags? should I be using these? who do I use them? are there any
    general layout tips that someone could pass on to me? perhaps a
    link to a good tutorial?
    please help me. i am very confused.
    thanks so much.

    IMO not a good site to emulate. To wit:
    Top background image:
    http://www.jeffsarmiento.com/images/bg-top.jpg;
    745px
    x 350px 137K
    Main background image:
    http://www.jeffsarmiento.com/images/bg-tile.jpg;
    745px x 950px 130K
    Total page size: 454K (Check here:
    www.websiteoptimization.com)
    Website usability experts routinely recommend a maximum page
    size of ~80K
    Check out the We We Scale @ www.FutureNowInc.com/wewe/ where
    they suggest,
    "You speak about yourself approximately 0,003 times as often
    as you speak
    about your customers. Might that have an impact on your
    effectiveness?"
    That is 100% consistent with the #1 Web Design mistake:
    "Believing people
    care about you and your web site." or to phrase more
    expansively, "Our site
    tries to tell you how wonderful we are as a company, but not
    how we're going
    to solve your problems."
    www.sitepoint.com has some excellent books on making a
    website actually
    attractive and usable at the same time.
    Walt
    "beWILLdered_" <[email protected]> wrote in
    message
    news:[email protected]...
    > hello, everyone.
    > I am in the process of designing a new website for
    myself, and while I was
    > researching nicely designed pages to use as inspiration,
    I stumbled upon
    > this
    > site:
    >
    http://www.jeffsarmiento.com/
    > obviously, the design is very impressive, but it also
    incorporates a lot
    > of
    > web mechanics that I have been trying to figure out, so
    I will use this
    > page as
    > an example.
    > one thing I need help with is backgrounds. as you can
    see in the posted
    > website, the creator used a seamlessly tiled paper
    texture to display the
    > bulk
    > of his content on. also make not of the pattern that is
    located to the
    > left of
    > the paper texture. how do I create seamless backgrounds
    like this that
    > will
    > scale to fit any amount of content or any resolution? I
    can't imagine that
    > the
    > guy that made that site created a new size background
    every time he made
    > an
    > update, so there has to be an easier way.
    > the second thing that I am having trouble with is
    general site layout. I
    > have
    > read that most sites used series of invisible tables to
    organize there
    > content,
    > but when I open the source of this page in dreamweaver,
    he was using
    > something
    > different. div tags? should I be using these? who do I
    use them? are there
    > any
    > general layout tips that someone could pass on to me?
    perhaps a link to a
    > good
    > tutorial?
    > please help me. i am very confused.
    >
    > thanks so much.
    >

  • I need help with a loop within an hour

    I need to make a loop that gives 100, 10, 1000, 100, 10000, 1000...
    I can use a for loop, if loop, while loop, and do while loop.
    Thanks

    warnerja wrote:
    sharkura wrote:
    warnerja wrote:
    sharkura wrote:
    Sorry warnerja. I know I should have done the same. I just couldn't help myself. I need to keep telling rubbish.
    :D
    ¦ {ÞIt's not too late to edit your spoon-fed solution, though the OP may have seen and copied it by now.And you know this isn't going to make the OP a programmer, unless he/she/it changes his/her/its stripes.
    ¦ {ÞYes, but its laziness will continue to be encouraged more than it should.Nah. It'll crash and burn on the next assignment.
    ¦ {Þ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help with Airport Express and so on.

    Ok so my main problem before getting into what I need help with here is that our MacBooks and now my iPhone 6 plus isn't staying online. Keep getting booted off and then I either have to select the network again or it will eventually go back on. If anyone has a solution or so please feel free to answer that as well. I'm running on Roadrunner with a Netgear 600 wireless router and a motorola modem. Both of which I'll leave the link to below for a better look.
    My Main Question: So I'm looking at a new wireless router mainly and possibly a new modem. I know Apple products are trustworthy but how good is the Airport Express and other Airport products. Also what is the Maximum speed and Maximum data speed for the cheapest express station and if anyone knows the speeds of the other devices it would be greatly appreciated.

    DSL Router to Netgear 5-port Switch and I used the switch to connect to Airport Extreme, TV, Blue-Ray DVD player and DirecTV Receiver.
    The AirPort Extreme base station (AEBS) is a router so it will do what you need.
    You need to reconfigure your setup. Connect the WAN port of the AEBS to the DSL router. Then connect the Netgear switch to one of the LAN ports on the AEBS. The AEBS will properly share the connection.

  • Need help with saving data and keeping table history for one BP

    Hi all
    I need help with this one ,
    Scenario:
    When adding a new vendor on the system the vendor is suppose to have a tax clearance certificate and it has an expiry date, so after the certificate has expired a new one is submitted by the vendor.
    So i need to know how to have SBO fullfil this requirement ?
    Hope it's clear .
    Thanks
    Bongani

    Hi
    I don't have a problem with the query that I know I've got to write , the problem is saving the tax clearance certificate and along side it , its the expiry date.
    I'm using South African localization.
    Thanks

  • Help with while loop program

    I am working on this program that when inputing two integers: firstNum and secondNum, the program will output all odd numbers between firstNum and secondNum.
    This program will be using a while loop and I can't find any similar examples in my book on how to write the code.
    any help would be greatly appreciated

    you asked for it...
    //This program will prompt the user to input two integers.
    //Output all odd numbers between firstnum and secondnum.
    //Output the sum of all even numbers between firstnum and secondnum.
    //Ouput the numbers and their square between 1 and 10.
    //Output the sum of the square of odd numbers between firstnum and secondnum.
    //Output all uppercase letters.
    import java.io.*;
    public class Program8
              static BufferedReader keyboard = new
                        BufferedReader(new InputStreamReader(System.in));
              public static void main(String[] args) throws IOException
              //Declare all variables
              int firstNum;
              int secondNum;
              System.out.print("Input first Integer: ");
              firstNum = Integer.parseInt(keyboard.readLine());
              System.out.println();
              System.out.print("Input second Integer: ");
              secondNum = Integer.parseInt(keyboard.readLine());
              System.out.println();
    As you can see, I don't have a clue where to begin after this...

  • Need help with show/hide and layers moving

    I'm more of a designer, so I don't know code or CSS well at
    all. I'm doing an online portfolio for a class and need help with
    layers not staying in place in different browsers. The portfolio is
    created with a table, but I wanted to use the show/hide function
    for thumbnails of work. Are layers the only way you can use this
    function? I read layers don't work well with tables, so how else
    can I make it so when you mouse over a thumbnail, the larger image
    appears in another cell?

    > I don't know code or CSS well at all.
    That's unfortunate.
    > layers not staying in place in different browsers.
    Layers don't move. But the rest of your page does.
    Before you get too wrapped up in layers, though, please read
    this -
    http://www.great-web-sights.com/g_layerlaws.asp
    They are not good when be used as a primary layout method.
    > I read layers don't work well with tables
    They work fine with tables - but you have to understand both
    tables and
    layers to use them.
    Why not show us your page, so we can see what you are
    struggling with?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Bobbi67" <[email protected]> wrote in
    message
    news:ertd9h$h3m$[email protected]..
    > I'm more of a designer, so I don't know code or CSS well
    at all. I'm doing
    > an
    > online portfolio for a class and need help with layers
    not staying in
    > place in
    > different browsers. The portfolio is created with a
    table, but I wanted to
    > use
    > the show/hide function for thumbnails of work. Are
    layers the only way you
    > can
    > use this function? I read layers don't work well with
    tables, so how else
    > can I
    > make it so when you mouse over a thumbnail, the larger
    image appears in
    > another
    > cell?
    >

  • Need help with input, parsing, and loop in one program

    I am doing an assignment that is supposed to:
    # ask the user for a URL
    # For the entered URL, read all the HTML text from the page and extract all links (other URLs) and image names. These should be printed to the console window.
    # Reprompt for a URL until the user presses the cancel button.
    # Define at least one helper method that serves a practical purpose that your main method will use. Note that your method(s) should serve a useful purpose, and it should make sense that they are separated out from the main method.
    So far, I figured out how to ask if the user would like to play again, though I can't make it loop to play again. The "NO_OPTION" works fine and exits out.
    I cannot figure out at all how to ask for the URL and then use that URL to try to parse the HTML to find the links and pictures.
    for the loop, is it:
    do{
    ...//all the stuff//
    }while (option == JOptionPane.YES_OPTION) ?(I think I have to parse, looking for "img src" and "a href", anyway)
    The biggest thing I'm getting hung up about is where to start. All it'll do is ask for the URL, say there is an error, and ask if I want to do it again. Don't know how to make it loop again. Like I said, I think it's a do while loop but am not completely sure where it goes and how to have it work on the entire thing with message dialoge boxes
    To ask for the input, I was trying to make the dialoge box a string so the string would be displayed and have the links extracted
    String linkString=   
              JOptionPane.showInputDialog("Please enter a URL:");...but it obviously doesn't work like that...
    Here is the whole mess so far...I don't know what my question is because I know what I want, just not the terms to ask. help?
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.net.URL;
    import java.net.URLConnection;
    import javax.swing.JOptionPane;
    public class WebPageExaminer
         public static void main(String[] args)
              String linkString=   
              JOptionPane.showInputDialog("Please enter a URL:");
        String link = null;
        URL url;
        URLConnection urlC;
        InputStream inStream;
        InputStreamReader inStreamReader;
        BufferedReader reader;
        try
        url = new URL(link);
        urlC = url.openConnection();
        inStream = urlC.getInputStream();
        inStreamReader = new InputStreamReader(inStream);
        reader = new BufferedReader(inStreamReader);
        String inputLine = reader.readLine();
        while (inputLine != null)
          System.out.println(inputLine);
          inputLine = reader.readLine();
        catch(Exception e)
          JOptionPane.showMessageDialog(null, "Error reading from file");
        } int answer = JOptionPane.showConfirmDialog(null, "Examine Another URL?", "Click Yes or NO:", JOptionPane.YES_NO_OPTION);
        if (answer == JOptionPane.NO_OPTION)
             System.out.println("Goodbye");
             System.exit(0);
              if (answer == JOptionPane.YES_OPTION)
                  System.out.println("OK!");
    }Edited by: digital.tradecraft on Mar 14, 2009 1:27 PM

    You posted the questions 20 minutes ago? Why are you bumping it. People answer questions when they know the answer.
    I tend to ignore people who expect an immediate answer.

  • Need Help with Packet Loss and routing Loop perhaps???

    Hi,
    I am running into a very odd situation. One of our highly critical systems (172.18.1.2/16) is losing connection intermittently for brief periods of time (1minute, 3 minute, 50 seconds and so on).
    I have gathered some information that I would like to share with you guys:
    The switch is a 3560 (Show version is in ShowVersion.txt)
    default gateway is 172.18.10.254/16 (virtual IP in an HSRP , packet capture is done on the active node)
    I have noticed that pings to one of the default gateways drop infrequently (more frequently from machines on 172.18.0.0/16) segment.
    total number of machines on 172.18.0.0/16 do not exceed 200
    I have captured packets on Interface Vlan1 and I found something very weird, perhaps pointing to a routing loop??? (see capture.png) The ICMP request comes and hits the 172.18.10.254 with TTL of 128 TWICE! then packet capture shows that same packet with TTL decremented by one TWICE! again and again until it reaches TTL of 1 and then it responds with a reply.
    At times it completely ignores the requests and causes a request timed out.
    I am confused and need help in right direction. I really appreciate it.
    can you also confirm if the multiple packets mean routing loop somewhere?
    Thanks

    Could you post a copy of your HRSP config and the results of a #show standby?
    Thanks

  • Help with while loops

    Im trying to create a while loop that outputs the revers of a string, eg nice one
    would be "eno ecin" Assuming i already have declared a variable intital string that holds the string, how do i go about this does anyone have any problem solving techniques. The charAt method needs to be used.

    i have a exam on saturday and it was a previous exam question that im trying to get help with i need to understand the course material thanks, i know how to use while loops but have trouble getting my head around this question. ill show you my code however i know its completely wrong.
    now i know i hvae to use the charAt method to return a character located at the integer i
    so i must go down after each case has been tested true therefore i want i=i-1;
    until i=0;
    String initialString="tucan";
    int i=initialString.length();
    while(i>0)
         return charAt();
         i=i-1;
         }

  • FCP Novice needs help with video quality and FCP 5!!

    Hi,
    I have a real problme that I cannot seem to fix. I think its because I am doing something really wrong!
    I have a Sony HC42E MiniDV Camcorder which by default records video in full widescreen. I recorded several tapes this way and have now begun trying to edit them in FCP 5.04 (Tiger 10.4.6). Whenever I log and capture my clips they appear to be fuzzzy and unclear on the Mac monitor whilst being totally crisp and sharp on the camcorder viewfinder. I tried capturing using the DV PAL 48Khz Anamorphic Preset which keeps everything the right size (the final output needs to be true widescreen and not with black bars added) but the resulting video on screen is blurry and bitty. I then tried capturing using the DV PAL 720 x 576 normal preset and the video is a little clearer on the screen (for both presets I have chosen lower field dominance) but when I play back it plays back in widescreen on the mac canvas window but at 4:3 on the camera's viewfinder.
    I then assumed that maybe this is just becuase the mac screen (CRT by the way) doesn't use fields. So I exported the sequence as a QT movie using DV PAL 16:9 and used quicktime (OS9 Classic - my compressor has never worked because of the dreaded "unable to connect to baackground process" problem which I've never managed to correct) to convert it to MPEG2. When I import this as an asset into DVD Studio pro 4 and set the track size to 16:9 it comes through at the right aspect ratio. However it looks blurry on screen. Thinking that this will be fine on a TV I burned the disc - inserted it into my DVD player (a good one!) and watched it on my new 32" widescreen TV (a good one!) and the picture qualitty is poor. Its so much blurrier and bittier than the original footage looks when played through the camcorder's viewfinder!
    The final footaage looks like an old VHS recording that's a year or two old!
    Does anyone know how I can capture my footage in FCP with the maximum quality, edit it without quality loss and the export it for DVD again without such significant quality loss whilst all the time keeping it at proper 16:9 widescreen?
    Is there some presets I should be working to?
    I'm tearing my hair out! Help!

    Hi Guys,
    thanx for your replies.
    here's the latest:
    Brian, I followed your instructions and the DVD burned successfully. However the video quality of the dvd when viewed on my TV ('ve tried on all 3 of my tvs now) is still a lot poorer than the quicktime movie that was imported into DVDSP4. When I play the original QT Movie on my Mac CRT monitor it looks a little blurry and grainy because I guess its non interlaced however when viewed on an external Video monitor it looks great - very sharp.
    When I view the burned DVD on my television the picture quality looks like the non interlaced version of the original QT Movie that appeared on my Mac CRT and not the sharp interlaced (lower field) version that appeared on my external video monitor.
    Its almost like taking a sharp jpeg into Photoshop and applying a gaussian blur of about 0.3 followed by jepg compression compressing it down to 5% quality!
    I'm totally mystified. Can the conversion to Mpeg2 be removing all interlacing so that you get the less sharp computer monitor look? I just want the video on my final DVDs to be as good as the original source footage! I appreciate that along the way there might be loss of some quality but surely not that much?
    Does this make sense to you guys or am I still doing something very wrong?
    Robert: I have tried setting all manner of drives including a fresh external firewire HD with nothing on it (clean out of the box) but it doesn't seem to help.
    Brian: I tried the no network suggestion a few months back but I'm not sure if I got it right. At the moment I have broadband through an external speedtouch usb modem and am also connected (occasionally although not for the last 3 months) via a crossover cable to my PCs ethernet card. When I last tried the No Network solution I had immense trouble getting my internet to work again! Can you please help me by directing me to the best ay to do this while protecting my internet settings?
    any more help guys would be greatfully appreciated.

Maybe you are looking for

  • Unable to dowload audio

    Even though logging in to nokia account, unable to download any audio from nokia mix getting Activation problem popup.

  • FRM-41211 SSL-Failure From Forms

    I have a Reports/Forms problem when running run_product from within Forms in a loop (for i in a..b loop run_product(i) end loop) for generating emails or faxes using MS Outlook starting with the second report. Error message "FRM-41211 SSL-Failure..."

  • Safari no longer plays mp3 files (OS X 10.9.5 Safari 7.1). Help!

    I have a 6-month-old MacBook Pro (13" Classic) running OS X 10.9.5. I use Safari 99% of the time to browse the web (version 7.1). Quicktime Player 10.3. All of a sudden (this week), Safari has stopped playing mp3 files. I have always been able to cli

  • When I type WWW, it's a different version of my website

    I created our business website, www.weddingsbykatherines.com through the iweb application and hosted it on GoDaddy. I just published a couple site changes and realized that weddingsbykatherines.com (no www) leads to a previous version of the website.

  • I want a tool to open back-up to edit it only? back-up from any server edition?

    hi, I have downloaded the AIK and when I go to its directory I don't see any IMAGEX tool , I see only IMAGE manager or SIM tool .is this the same as imagex tool.  I want only to open full-back-up files to edit it from any server edition. my only aim