While loop stops before countdown has finished

Hello everyone
I have a problem with this scenario:
What I want is, that I can enter a series of arrays and then it will choose the first row because the first cycle number is 0, the second is 1 and so on. I want this loop to continue until I've left my arrays empty. The probelm is when I test it, it immediately stops, but when I highlight everything seems to work fine.
This is a program I'm trying to write so it can control some dosing pumps - I put in a number and weight and then it converts it into a set point % which will trigger the pumps. When the countdown is finished then it should start dosing with the next weight and time.
I'm fairly new to labVIEW. I've tried looking everywhere but I haven't found that could help me, I count on you!
Thank you very much
Theis
Solved!
Go to Solution.
Attachments:
TabelTEST2.vi ‏32 KB

Thank you very much all of you! It almost works!
I must say that you guys put a lot of effort into helping me, I'm grateful.
I went with this solution:
I added the "stop 2" button, which starts everything.
I just have a slight problem. When I want to pause I press the stop button again and it pauses. When I start again - by pressing the stop button - it resumes but I can see that it kept counting seconds while it was pause. I guess, that what I want is, that when I pause that it sends a zero signal to the pump which tells it to stop and the same with the timer. And when I start I want it to resume. Ya' follow me?
I hope any of you guys, who have already been so helpful, can help!
Thank you
Theis
Attachments:
TabelTEST2_MOD.vi ‏36 KB

Similar Messages

  • Problems downloading OS Lion. Unfortunately the Download always stops before it has finished. Time 1 hour already, problems downloading OS Lion. Unfortunately the Download always stops before it has finished. Time 1 hour already

    I want to download the new OS lion (first time) but the download already stopped twice. Saying download not possible. It took already more than an hour till the download stopped. Anyone has an idea what the reason might be?

    yes you would have to log onto her computer using your own apple id if you want it to update (assuming your id was the one downloading lion) and no for the second question. The itunes Representative said it shouldn't have any impact on your purchasing ability.....
    By the way, i don't think you're allowed to install lion on your friend's computer. Unless you are using it for yourself. As the rep said "if there was some personal use well then it would meet the conditions." so if you were to transfer, say, pictures for storage on your friend's computer then i think it'd be fine.

  • Songs are stopping before they are finished

    My songs are stopping before they are finished playing. Using a PC.  Help.

    I have the same problem with a couple of songs I've just bought on itunes

  • Wait time in while loop: wait before all other code in the loop runs

    My vi is attached. 
    In the 'Check for Equilib' case, there is a while loop that takes data from a pressure gauge and compares it against data taken equilibTime seconds previous.  equilibTime is hooked up to a wait(ms) function inside the while loop.  Currently it appears that the code in the loop runs, and then the loop waits so many seconds before the next iteration.  I would like to reverse this process, i.e. in each iteration, the loop will wait so many seconds and then run the rest of the code in the loop.  I want to do this because I don't want there to be any delay between then time the 'check for equilib' code finishes and the start of the 'add shot' case.
    Can anybody suggest an elegant way of implementing this?
    Thank you
    Attachments:
    Take Isotherm.vi ‏294 KB

    No.  Use Flat sequences they are far preferable to stacked sequences.  Functionally they are the same.  But a flat sequence is easier to read, doesn't hide code, and you don't have to worry about backwards wiring caused by sequence locals in stacked sequence.
    Note, you have two oddities in your lower while loop.
    1.  Write a value to an indicator's terminal node and to a local variable of the same indicator is pointless.  They do the same thing.
    2.  Reading from a local variable of an indicator and writing to its terminal node is just as pointless, as you aren't doing anything.
    In your middle loop "Add shot" case, you have the local variable of DC estimate righting to a right hand side shift register, but you never use the left hand shift register.  So you are saving that value for future loop iterations, but never use it.

  • Making a while loop stop

    I'm trying to write to a file by using a while loop. I read from the keyboard and then enter the while loop. I print to the file and then I read from the keyboard again. My problem is when I want to exit the loop by entering nothing I can't. The loop becomes infinite. Please help!!! Here is my code!!
    inputline = keyboard.readLine();//read the keyboard
    while ( inputline != null ){
    DiskOut.println( inputline );
    DiskOut.flush();
    inputline = keyboard.readLine();//read the keyboard again
    }//end while

    At a guess, it's not returning null when you hit return, but rather the return character. Try something like
    if (inputline == "" || inputline =="\n" || inputline == "\r" || inputline == null) {break;}If that works, you can take out bits to see what it is returning.

  • Just confusing about when do while loop stops............

    hi i m just a newbie
    i just got a bunch of codes here but what i m confusing is in some function
    it is like
    boolean error;
    do{
    //and here it has some code, if and else statements and error changes to true and false
    }while(error)this is the code, what i m confusing is when it stops??? it just states while(error)
    but i don't know it means it stops when error is false? or when error is true? or
    which one???,, because it just says while(error)
    but i don't know whether it means error is true or error is false;;;;;;;;

    I suggest taking your code and changing the error
    variable to flag as follows. Then read it as do
    {something} while (flag is true). If flag is true
    then you want to loop again; if flag is false you
    want to quit the loop. So, initialize flag to be true
    as default (you want to loop again). In the code
    block set flag to false when you determine you want
    to quit.
    boolean flag = true;
    do{
    //and here it has some code, if and else statements
    and error changes to true and false
    }while(flag)
    And I'd suggest that the variable named "flag" is even more non-intuitive than the original "error" variable name was.

  • Wifi sync stops before it's finished

    Trying to sync a large library over wifi on a new iPad, but it never completes the sync. A few hundred songs will sync ok, and the next time I look at the iPad I notice that it has stopped syncing. PC is set to stay awake indefinitely. Any ideas what may be causing it to time out?

    "Shaoul Dotan" writes:
    > It's possible to stop for loop in the middle of an operation.
    >
    > T.U.
    Shaoul,
    as others explained why it's a bad thing, here is a very ugly trick to
    acomplish something of it. It's so ugly I won't use it in my programs.
    I'll assume you do something with an array in your for loop. To "stop"
    the loop you can use a case structure with 2 cases: one empty and the
    other with a huge delay (e. g. 40 days). To get the data out of the
    for loop you have to use a local variable for the whole array so you
    need to work with shift registers and "append to array".
    The way to reintroduce data dependency outside the for loop is by
    polling the array size of the local variable. If it didn't grow for
    e. g. 100 ms the for loop is "
    finished" and in the delay state.
    The downside of this trick is that the vi doesn't finish and you have
    to abort it.
    Does someone in this group know about the obfuscated C contest, where
    you try to write C code that noone can understand? What about doing
    something like that in G? We have some guidelines how to wire; the
    contest could reveal ways how _not_ to it.
    Johannes Niess

  • ITunes has cut of an entire album of music at 3:00 each time, before song has finished?

    I have recently added some music into my iTunes (Not bought from the iTunes store). It is off a DVD concert, where there was no audio album to buy. I converted the music to mp3 audio by using the program 'Xilisoft DVD Audio Ripper'. The song tracks are all recognised as seperate files, as are the individual song titles. After I downloaded the files into mp3 format, I clicked and dragged them into my iTunes. They were recognised immidately (including artwork) but as they played through, each of the 22 songs stop at 3:00 and don't continue any further. I have tried re-downloading which doesn't work, and I am unsure as of what to do next. Some of the tracks have a running time of 6:20 - but iTunes has made it so they only have a running time of 3:00. Is there any way I can fix this issue? If there is a detailed discription would be great, I am not entirely used to dealing with computer/iTunes issues.
    Thanks for your time!

    This can take quite a while depending on how many songs you have in the album, but it should work:
    1) Right-Click on a song with the problem
    2) Click the 'Get Info' option
    3) Then click the 'Options' tab
    4) Uncheck the box next to 'Stop Time'
    5) Then click 'OK'
    6) Repeat process for all songs with the problem.

  • Music stops before song is finished

    Help,
    On my itunes, I will be listening to music and before the song is supposed to be over it will just jump to the next song, Typically the song will have over a minute left and then just jump to next song in the playlist. I have hundreds of songs doing this and i do not know how to fix this.
    Running current version of Itunes
    Everything is up to date.
    Thank You,

    All of the songs were purchased from iTunes. The new unit is  stopping songs that were problematic on the old unit (songs that were purchased 2 years or more ago) and is now stopping on some more recently purchased songs.
    I just went back into iTunes and tried to play one of the involved songs on the laptop through iTunes. I rec'd the following message: "The song "xxxxxxxxx" could not be used because the original file could not be located. Would you like to locate it?" This is the 1st time I've ever rec'd this message and I receive it when I try to play any song from any playlist. I clicked on "Locate" I was taken to the System 32 file. I originally had iTunes on a desk top computer and transferred it over to my new laptop approx 6-7 months ago. Did something go wrong with the transfer?
    Mary

  • HT1657 If I erase the movie before it has finished downloading, would you charge me the rental ?

    I'm having problems downloading movies to my ipad 1. My internet speed is great, and wifi works just fine.
    I have just found out that I can download them from my PC, and then tranfer them to the ipad. The only problem is that I have 2 stucked movies on ipad not downloading.
    If I erase those, would Apple charge me the rental? I would like to download them directly from the PC, where it works just fine.
    Thanks

    Welcome to the Apple Community.
    atravini wrote:
    .....If I erase those, would Apple charge me the rental?....
    Yes.
    Select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.

  • How to stop a while loop which contains a timed loop

    Hi,
    I'm a new hand to labview, and I'm using labviw 7.1, NOT 8.x.  I'm trying to do a measurement, in which the flow would look like the attached file (I have stipped all hardware related components to make it easy to read).  My questions are:
    1. In Loop 3, when the comparison (x>20.85) is true, Loop1, Loop2 and Loop3 are stopped, why it won't quit the while loop (I have wired it to  while loop stop)?
    2. When it is running, I click on stop button, why it won't stop?
    Thanks!
    Attachments:
    SyncTimedLoop32.vi ‏228 KB

    hwm wrote:
    2. When it is running, I click on stop button, why it won't stop?
    The stop button is read outside of the inner while loops.  So the inner while loops will continue to run until their stop conditions are met.
    hwm wrote:
    1. In Loop 3, when the comparison (x>20.85) is true, Loop1, Loop2 and Loop3 are stopped, why it won't quit the while loop (I have wired it to  while loop stop)?
    It seemed to me like it would, but sometimes it seemed like I had to set change the numeric value one more time before it would.  You have a very odd structure there by placing the event structre inside the while loop with the other loops.  I think you may be running into issues where events are getting queued up in the event structure, or race conditions between when the event structure might execute relative to the other loops.  It is all very odd and difficult to predict all the ways these structures might interact and relative timing.  Usually event structures would belong in their own parallel while loop.  I think you need to rethink exactly what you are trying to do here.  It probably isn't event necessary to use the stop timed structure functions.  A local variable or a notified to pass the "Stop status" from loop 3 to the other loops (or the separate event structure loop to the other 3) would probably be better.

  • Start stop while loop with tab control

    I want to be able to start and stop a while loop by entering and leaving a tab.  I am using an event structure to do so but it doesn't seem elegant or the right way to do this.  The only way I was able to get it to kind of work is by unchecking the lock front panel box in the event structure.  I have attached a sample vi of what I have so far.
    Solved!
    Go to Solution.
    Attachments:
    Loop test.vi ‏16 KB

    The problem is that you can't even stop the program by hitting the stop button until you leave the tab, which is not a friendly user interface.
    Event structures should just handle basic user events.  Any given event case should not take a long time to run.  While you are in the diagnostics tab, your code is stuck in that while loop.  Although fixing the lock front panel allows you to do other things, the LabVIEW is just queuing up all of those other UI events (like Stop button value change) and can't handle them until the inner while loop stops and allows the outer while loop to iterate again.
    You should have a parallel while loop to handle the waveform graph.  You can use notifiers or queues or an action engine FGV (see Ben's Action Engine Nugget) to pass the starting or stopping of the waveform graph update to the parallel while loop.

  • Stop While loop

    Hi
    I have a while loop with a cycle time of 100 sec, when I stop it I have to wait 100 sec untill the while loop stops.
    There is any manner to stop it immediatly?
    Thanks

    Why are you using a property node for a control that is not accessed within the loop?  And the conditional terminal is set to run if True. 
    Your while loop doesn't make sense.. Can you post the entire code (attach your vi) and explain what you are trying to do?
    R

  • While loop doesn't stop until 2 more clicks

    I have to say I am really not familiar with LV at all, but Im learning.
    So, why is that after I clicked stop bottom, I had to click my OK button twice, then my program stopped. Why it can't stop immediately?
    Besides, if I want to some the dice result by array, which wire am I missing?
    Thank you!
    Solved!
    Go to Solution.
    Attachments:
    dice.vi ‏15 KB

    Hi RawtoLV,
    You have a while loop within a while loop. When you run the other while loop stops when you pressed the stop button, the inner while loop still runs. Since your OK button is using Latch when released, what i noticed is that when you pressed that OK button, it quickly switched to from true to false which didn't stop that while loop operation (could be due to the wait). May I ask what are you actually doing with the sequence structure?
    I would suggest using event structure instead (http://zone.ni.com/reference/en-XX/help/371361K-01/glang/event_structure/):
    here some more info on event structure:
    http://www.ni.com/white-paper/3331/en/
    http://www.youtube.com/watch?v=8eO64fo3Pho
    Warmest regards,
    Lennard.C
    Learning new things everyday...

  • Calling web service method.Stuck in while loop

    I am implementing a board game using asp.net web service. Players connect to this web service and play.
    Once player click on a cell in board it should be written to web service and other players board repaint according to that click.Writtting to web and reading is working, but the switch player method in below do not work.It stuck in the while loop.Even other player has played this player do not identify he has played it wait in the loop.
    private void switchPlayer(String player){
            try { // This code block invokes the ServiceSoap:switchPlayer operation on web service
                webservice.Service service = new web.Service_Impl();
                webservice.ServiceSoap serviceSoap = service.getServiceSoap();
                while(serviceSoap.switchPlayer(player)!="aPlayer"){
                   System.out.println("It's oppenents turn");//Stuck here
                    //remote player already exists?
              //   readLabel();
                System.out.println("It's my turn");//don't come here even player b played
                       }  catch(Exception ex) {
                // TODO handle custom exceptions here
              }

    Does some one knows url of similar type game
    designing.I would suggest that you get your basics right before going into that stuff.

Maybe you are looking for

  • Creating files from a table and placing it in a different folders based on ID Column

    I have a table <tab> <tab> <col1>   <col2> .... ID1     Data.. ID1 Data.. ID1 Data.. ID2 Data.. ID2 Data.. ID3 Data.. I've another table which gives me information about the path where to place ID1 data and where to Place ID2 data ..so on <tab2>  <co

  • Starting listener on OEL5.3

    Hi. I am new to oracle and linux. I recently installed OEL5.3 on my HP dv6536 laptop. During the installation i checked the "oracle validated install" option in the customize packages section. I then installed oracle 10GR2, everything went well. I wa

  • Cannot change Mailbox type from IMAP4 to POP3

    Hi guys. Four days ago I purchased a Nokia 6760slide and really quite like it.  Unfortunately it has one glaring issue in that it refuses to connect to my personal email account.  I've allocated the correct port (110) and triple checked both username

  • Error Message Every Time I Work in Premiere

    I'm a creative cloud subscriber. This error message interrupts my work every time I work in Premiere. I've tried copying all the clips into a new sequence and that solves the problem for about ten minutes. Then it's back. Here it is: [/Volumes/BuildD

  • Recover star ratings from old XML database?

    Is there a way to recover the star-ratings of my music from an old iTunes XML database file?