Stopping loop when output = 0

Hi, I was wondering if anyone knew how to stop a loop when the final output is 0.  I'm doing battery life testing with a agilent multimeter and want to loop the reading of the voltage until the output = 0 so that the timer can stop at that point.  How would I get this done?

to test current, you have to put the probes in one wire, not across two. 
for instance  ---------|<left probe>|     |<right probe>|-----------
instead of
---------------|<left probe>|-----------------
---------------|<right probe>|---------------
basically, current measurement has to be in series, not in parallel.
edit - the reason your phone shut off is because ammeters have very low input resistance to avoid burning any of the current being measured.  so, when you put it across your terminals, you were simply discharging your battery through the meter instead of through the phone.
Message Edited by JeffOverton on 02-01-2008 11:29 AM
=============
XP SP2, LV 8.2
CLAD

Similar Messages

  • How to stop while loop when a specified function is terminated?

    I want to make a program which has 2 thread, one of which is to control some devices, and the other is to measure outputs of the devices.
    To do that, I should make a 2 independent loops, but there comes a problem here.
    I want to terminate 2 loops at the same time, but it's difficult for me to do that, because when I try to notify upper sequence's termination to lower loop by some value change, they have some dependency.
    That's why I need your help. I want to know how to stop lower loop when the upper sequence's termination keeping their independency.
    Please let me know. Thank you.
    Attachments:
    help.JPG ‏200 KB

    Is the upper loop commanding the lower loop at all?  I would think you would have some type of communication between the loops.  Just use that communication to send a stop command.  Or the next best way is to just simply use a notifier.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    i have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    Hi fais,
    Following through with what JB suggested. The steps involved in replacing the inner for loop with a while loop are outlined below.
    You can replace the inner for loop with a while by doing the following.
    1) Right-click of the for loop and select "Repalce" then navigate to the "while loop".
    2) Make sure the tunnels you where indexing on with the for loop are still indexing.
    3) Drop an "array size" node on your diagram. Wire the array that determines the number of iterations your for loop executes into this "array size".
    4) Wire the output of the array size into the new while loop.
    5) Set the condition terminal to "stop if true".
    6)Drop an "OR" gate inside the while loop and wire its output to the while loops condition terminal.
    7) C
    reate a local of the boolean "stop" button, and wire it into one of the inputs of your OR gate. This will allow you to stop the inner loop.
    8) Drop a "less than" node inside the inner while loop.
    9) Wire your iteration count into the bottom input of the "less than".
    10) Wire the count (see step 4 above) into the top input of the less than. This will stop the inner loop when ever the inner loop has processed the last element of your array.
    Provided I have not mixed up my tops and bottoms this should accomplish the replacement.
    I will let others explain how to takle this task using the "case solution".
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to terminate or exit a for loop when the user clicks on stop button

    Actually my problem is to stop a loop when i click on stop button.
    example:i have two buttons 'start' and 'stop'
    in start buttom i wrote a for loop as
    dim i as integer
    For i=1 To 100000
    print i
    Next
    when i click on start buuton it prints 'i' value up tp 100000.
    my question is when i click on 'Stop' button the for loop has to terminate or Exit from the  loop and should stops the execution.
    Is it possible to termianate or Exit the 'for loop'
    PS.Shakeer Hussain
    Hyderabad

    I am unable to stop the loop and application not at all allowing to Press the Stop button.
    It seems like Hung, any advise ?
    Private Sub btnStart_Click(sender As Object, e As EventArgs) Handles btnStart.Click
            btnStop.Enabled = True
            btnSelectFile.Enabled = False
            btnStart.Enabled = False
            btnStop.Focus()
            Dim strFileName As String = txtFileName.Text.ToString
            Dim strLineText As String
            If System.IO.File.Exists(strFileName) = True Then
                Dim objReader As New System.IO.StreamReader(strFileName)
                While objReader.Peek() <> -1 And stopclick = False
                    strLineText = objReader.ReadLine()
                    MsgBox(strLineText, MsgBoxStyle.Information)
                    Application.DoEvents()
                    Thread.Sleep(My.Settings("strDelay") * 1000)
                    'System.Diagnostics.Process.Start(My.Settings("strFireFoxLocation"), strLineText)
                End While
            End If
        End Sub
        Private Sub btnStop_Click(sender As Object, e As EventArgs) Handles btnStop.Click
            stopclick = True
            btnSelectFile.Enabled = True
            btnStart.Enabled = True
            btnStop.Enabled = False
        End Sub
    Raman Katwal
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to stop a while loop when using tab control

    How do you use a tab contol to stop what is happening on one tab when you switch to another tab?  In the test example I attached, I have a while loop nested inside a case structure controlled by the tab control.  When I tab to page two the elapsed timer starts but when I switch to another tab it does not stop.  I can't come up with an easy way to stop or exit the while loop when I change tabs. 
    Thank you
    Danny
    Attachments:
    tab control.vi ‏24 KB

    I played with it a little more and came up with this fix.  This fixes it but is not tied to the changing tabs as I was looking for.  Is this just too many nested loops and a bad idea?
    Danny
    Attachments:
    tab control fix maybe.vi ‏26 KB

  • Stopping labview loop when terminating teststand

    Hi,
    If I have a labview step which is called from teststand, which is in a loop, what property can I query (or does one exist), where I can conditionally exit my labview loop when the "terminate" button is pushed in teststand?  I see there are "termination monitor" tools in the teststand palatte in labview, but the "terminating" boolean does not go true when I initiate the terminate in teststand.  I have a simple test vi set up to test it, does not seem to function this way. 
    Thanks
    David J.
    Solved!
    Go to Solution.

    David
    see attached example with TS 2010 and LV 2011. It shows how to use Termination Monitor and how to use LV modules to close asynchronuously running VIs.
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.
    Attachments:
    TerminationMonitor.zip ‏21 KB

  • Animated Gif won't stop looping!

    I'll try to format my question as best I can.
    I have created a Java chat applet, and for the Java chat, I have created a "ChatPane" class for displaying the chat. ChatPane is an extension of Canvas, and every time the paint() method is called, the program loops through visible lines of text drawing them on a buffer image, then draws the buffer on the screen.
    My problem lies in animated gifs. In my chatroom, chatters can type textual symbols that will be replaced with an image (or emoticon). I have created my animated icons in a popular animated gif editing program, and I have set particular icons to loop 3 times. The problem is that when the animated icon is displayed in my applet, the animation -doesn't stop- after 3 loops, it loops forever! I can't for the life of me figure out why! Can anyone provide any insight as to why the animations won't stop after 3 loops? The animations work just fine if displayed in a browser by themselves (they stop looping after 3 times)
    Thank you for any help!
    [email protected]
    Tony N.

    From what I understand of your problem;
    - You have made your own animated gifs
    - With the software to make these gifs you have set them to loop their animations 3 times
    - They loop continuously
    I don't see how java can be expected to interpret the animated gif software instructions to loop only 3 times and would assume that there are various proprietry ways of setting this (an assumption based on applets /javascript etc, that rely on the client-side browser interpreter). So, if you loop your animated gif or have any form of animated gif that you import into your program with getDocumentBase /getCodeBase as a (pre-animated) gif, then this is exactly what I would assume would happen.
    The answer is to seperate your images with eg;-
    smiley1[0];
    smiley1[1];
    smiley1[2];
    run a seperate thread, cycle through them as you wish and stop.
    I'm fairly sure that there is nothing in either the swing libraries or the jmf libraries that can resolve this any other way, so your choices are write extra code and have a pool of threads to control this, or leave it as is.

  • Do you have to add effects to Logic Pro X loops when mixing a song?

    Hi everyone,
    I have a question that has been puzzling me and I cannot seem to find an answer for! I have searched high and low on the internet and still cannot find the answer and so I would be grateful to everyones help with this issue.
    My question is that you hear so much about the fact that when you are recording and mixing a track that different instruments for example the Bass Drum and the Bass guitar occupy similar frequencies and we are told that this is why you have to add effects to these instruments when mixing but what I want to know is are they talking about just organic instruments like real drums and a real bass guitar that you manually play and record to Logic Pro X`s audio tracks? Or should you treat the Loops exactly the same? And should you also add effects to the Logic Pro X loops when you are mixing those specific tracks?
    For example if I add a Drum Loop or Bass Loop to a project and then start mixing the song should I add any effects for example EQ, Compression to these Loops? And what would be the best effects to add to the Bass and the Drums when mixing to help them stand out in the mix?
    Many thanks.

    Jamiesroom wrote:
    ... when you are recording and mixing a track that different instruments for example the Bass Drum and the Bass guitar occupy similar frequencies and we are told that this is why you have to add effects to these instruments when mixing ...
    Whoever told you that overly generalized rule, please stop listening to that person .
    The way you post your question (and they are good questions) points out a big problem nowadays. There is so much cookie cutter solutions out there like if you have this, then use that, if you want to get this sound, press that button. The problem with that is that you you often have no idea why you are doing that in the first place.
    Let me give you a simple example about gardening (sorry about that). If I grow tomatoes and look up on the internet how often to water them, I can find an answer "water the tomatoes once a week". I might do that and result is that the tomatoes will die. What I didn't take into account is that the advice was given from someone growing tomatoes in Russia, and I live in California where I might need to water them once a day. So, the answer you are looking for is not "how often to water the tomato", instead you have to learn how much water, depending on your climate, the tomato needs"
    Your music is the tomato. So the question is not what button to press (how often to water), but what button needs to be pressed, depending on your specific recordings (your climate).
    If your bass drum and and bass guitar are more further apart frequency wise, then there might be no need to EQ them, it depends
    Nobody should or could tell you what to do, unless he or she sits next to you at the mix and "hears' what is going on and what needs to be done.
    Don't get me wrong, I don't say that there is a lot of great advice and general guidelines out there. The problem is when you apply that blindly without knowing a little bit why that advice is give and how to apply that, or if it applies to your situation at all.
    In addition: The skills and knowledge about the theory is as important as the skills and experience of listening and judging your recording/mix and decide what action to take.You have to learn what to listen to and what you hear. If you don't know how distortion sounds then you miss out on fixing that issue. If you don't know how a pumping compressor sounds, then you miss out on fixing that issue.
    I think you get the idea
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • External speakers stopped working when Yosemiti was down loaded

    My external speakers stopped working when I downloaded Yosemiti! how can I remedy this?

    Dunno what it has to do with Yosemite, but:  press the alt/option key, while clicking on the speaker icon at the right hand top of your screen. This will show you all the sound inputs and outputs for your mac. Ensure that it is set to "Line Out" or "Digital out" (depending on your speaker's capabilities. Hopefully
    that works
    John B

  • Looping Quicktime Movies in Keynote & Keeping them Looped when Rendered

    Okay I have a quicktime movie that I am using as the background of my slide show. I have text fly in and out over the movie. I can get the movie to loop when I view the slideshow but when I try to export the slideshow to Quicktime the Background quicktime movie only plays once and then stops. I want the quicktime background to continue to loop when I render the entire slideshow to quicktime. And yes I have checked the loop box in the quicktime tab in the inspector window. Please Help!

    Yes, it is one slide with layered builds going in and out. The first 2 times I tried this it worked then on the same keynote file it stopped working on the second render and now it does not work even if I create a new file.
    While I do understand that I could make my slideshow, time it and loop the movies together in iMovie I do not feel that I should have to render two separate things loosing quality on each render because of the time aspect.
    Why would it work and all of a sudden stop? I should not have to go through iMovie making loops and rendering things twice when Keynote should be working.

  • How to stop loop in Revolutions Theme

    I wish to stop the looping of the theme in Revolution, I have got to the resources folder and used PlistEdit Pro and found some looping text but would like help as not sure which to alter. I want the theme to run for one minute and then stop. Do hope someone can help.

    Welcome to Apple Discussions!
    As far as I know, there is no way to have the music just stop playing when it reaches the end. There is the ability to turn looping on or off, but that refers to an entire project, not menu music. You can adjust the length of the loop. To get music that plays for one minute, select a piece that has a duration of one minute or more. Drag that song into the audio well of the menu. Then use the slider to adjust for how long you want it to play. However, once the end of the music is reached, it will start over.
    I hope this helps.

  • How do I get flash to stop looping? (And some other problems too)

    I'm brand new to flash so cut me a little slack... 
    I'm in the middle of building a website in Flash CS4 in Action Script 3.0 and (according my the tutorial I'm using) I need to access the "parameters" panel. The problem is I don't see it anywhere. I see "properties" and "filters" but to parameters. I've cycled through all the workspace presets but with no luck. How can I bring it up??
    Also, even though I used the "stop();" code in the beginning of my actions frame my movie just keeps looping when I test it. What am I doing wrong?
    I've attached the file I'm working on, maybe there's some other problem as well..?
    Thanks in advance..

    to see the parameters panel drag a component (like the flvplayback component) onto the stage.  a parameters panel should appear.
    if you have no compiler errors and your swf plays past a stop(), you have other code that's executing after the stop() causing your timeline to advance.

  • How do you start a loop with an event and end the loop when u release ....

    How do you start a loop with lets say an event of some sort, whether it be holding down a key or pressing the mouse click and then stopping the loop when you release that key or mouse button.?
    double c = 1.8, i = 1, max = 90, exp = 0;
    final double inc = 0.002; //speed at while it increases
    boolean f = false, g = false;
    while (true)
        while (f == false && stopMeter == false) //increasing speed going up to 90
            exp = Math.pow (c, i);
            i += inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp > max)
                f = true;
                g = false;
            } //end if
        } //end while
        while (g == false && stopMeter == false)  //decreasing speed going down from 90
            exp = Math.pow (c, i);
            i -= inc;
            pAngle.setText (Math.round (exp) + "");
            if (exp < 1)
                g = true;
                f = false;
            } //end if
        } //end while
    } //end whilethis is a snippet of my increasing increments. Its for an angle meter. I can't get it to stop, when the user clicks or does something... the program just gets stuck in an infinite loop. I am still new to java and i do not know how to fix this.

    You are in the wrong forum. Try this one instead: http://forum.java.sun.com/forum.jspa?forumID=31
    /M

  • Reader stops working when newest GTK2.0 installed - bug report and proposed fix

    Adobe Reader 7.0.9 (Linux i386) stopped working when I installed a batch of updates on Xubuntu Feisty Fawn (7.04). The updates included GTK 2.0, version 2.10.11. The symptom was that upon startup, Reader ended up in a seemingly infinite loop, printing out "expr: syntax error" (when started from terminal emulator). A few debug "echo"'s revealed that the loop concerned function get_gtk_file_ver().
    The bug itself is on line 418. The original line is as follows:
    echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
    - note that there is no '*' in the middle number-matching regexp, so the full expression matches only strings in which the "middle" group is 100, 200, ..., 900.
    At this point in the execution, $mfile contains the name of the gtk library .so, in this case, libgtk-x11-2.0.so.0.1000.11. In prior versions (e.g. 2.8.20, which is the current version in Ubuntu Dapper Drake LTS), the minor version had only one digit, and the regexp matched. When the minor version got incremented to two digits, the regexp no longer match because of the missing '*'! As an additional bonus, somehow this leads to the infinite loop (which is *not* good).
    A working fix is to add the missing '*' into the regexp. I'd say that a lot of Linux users will be tripping on this issue soon, at least those who keep current on security updates.
    I found no sensible way to contact the developers, i.e. a way that wouldn't have to pass a gazillion of customer-service and tech support people, who are most likely just as unaware of the issue as the users...
    I hope this issue will be fixed ASAP - after all, it's only one added character, and that'll save a lot of users a lot of hassle.
    (and btw, to have the intended effect, the dots in the sed expression should all be escaped with a backslash - now e.g. "libgtk-x11-2.0.sog0.1000.11" matches the sed regexp as well as "libgtk-x11-2.0.so.0.1000.11", but this probably isn't too critical...)

    The solutions provided here work, but by accident. The script compares 2104 (2.10.4) to 240 (2.4.0) and sees that it's greater. Adobe will have problems in future releases if the minimum GTK release is, say, 2.10.4 and the user has 2.4.0.
    I've crafted a more elegant solution, shown here in "patch" format. I think the reformatting and tab elimination done by HTML will preclude you from pasting this into a file and running "patch", but it's pretty easy to read and is short...
    --- /usr/local/Adobe/Acrobat7.0/bin/acroread~ 2007-01-05 14:56:39.000000000 -0500
    +++ /usr/local/Adobe/Acrobat7.0/bin/acroread 2007-08-03 09:33:08.000000000 -0400
    @@ -409,13 +409,13 @@ get_gtk_file_ver()
    fi
    mfile=`basename $ifile`
    - echo $mfile | grep -q "libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\).\([0-9]*\)" 2>/dev/null
    + echo $mfile | grep -q "libgtk-x11-\([0-9]*\)\.0\.so\.0\.\([0-9]*\)\.\([0-9]*\)" 2>/dev/null
    if [ $? -ne 0 ]; then
    return 1
    fi
    - echo $mfile| sed 's/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g'
    + echo $mfile| sed 's/libgtk-x11-\([0-9]*\)\.0\.so\.0\.\([0-9]*\)00\.\([0-9]*\)/\1.\2.\3/'
    return 0
    fi
    @@ -455,16 +455,25 @@ check_gtk_ver_and_set_lib_path()
    continue
    fi
    - len_version=`expr length $version`
    - base_version=`expr substr "${base_version}0000000000" 1 $len_version`
    - len_base_version=`expr length $base_version`
    - while [ $len_version -gt $len_base_version ]; do
    - base_version=`expr substr "${base_version}0000000000" 1 $len_version`
    - len_base_version=`expr length $base_version`
    + ok=true
    +
    + while [ -n "$base_version" ]
    + do
    + base_subversion=`echo $base_version | sed 's/\..*$//'`
    + subversion=`echo $version | sed 's/\..*$//'`
    + if [ $subversion -lt $base_subversion ]
    + then
    + ok=
    + break
    + elif [ $subversion -gt $base_subversion ]
    + then
    + break
    + fi
    + base_version=`echo $base_version | sed 's/^[0-9]*\.*//'`
    + version=`echo $version | sed 's/^[0-9]*\.*//'`
    done
    - if [ $version -ge $base_version ]; then
    + if [ -n "$ok" ]; then
    export LD_LIBRARY_PATH="$idir":"$LD_LIBRARY_PATH"
    IFS="$OLD_IFS"
    OLD_IFS=""
    @@ -640,7 +649,7 @@ fi
    # Check the version of gtk and update the LD_LIBRARY_PATH if required.
    if [ "`uname -s`" = "Linux" ]; then
    - MIN_GTK_VERSION="240"
    + MIN_GTK_VERSION="2.4.0"
    check_gtk_ver_and_set_lib_path "$MIN_GTK_VERSION" ### returns 0 if found gtk >= 2.4
    fi

  • How do I prevent my Mac Pro from  hanging up in a start/stop loop?

    My Mac Pro has a strange behavior I need help with. This computer is used almost exclusively for audio recording in my studio. I run Cubase 4 as my primary sequencing software. Everything will be going fine during a session, and then the software will abruptly hang up in a *start/stop loop*, stuttering back and forth between these two functions for up to 2 minutes before stopping. During this loop problem, the start/stop transport buttons alternately light up and the song starts and stops. Nothing I have tried will interrupt the problem. It just runs its course and then stops, usually between 30 - 90 seconds.
    Interestingly, the same behavior shows up in other applications and in the Finder. In Quicktime and iTunes, it shows up as a start/stop loop. In the finder, it will shuttle back and forth between two related functions and beep each time. In word, it will show up as a key stick, typing the same letter over and over.
    Needless to say, this is all very frustrating and embarrassing when clients are here. Any help will be greatly appreciates. Let me know if you have any additional questions.

    I'd begin with repairing your drives with Disk Utility and Disk Warrior; clone your system to another drive, and check for corrupt files and prefs.

Maybe you are looking for