Conditional loops (while loops)

I am using a while loop to check a digital input. I would like to send the value to a true or false box to check another digital input. The problem is that the while loop is running continuously but not giving anything out through the connection. I am looking for something like "if this do that conditional". Is there a way to set this up?

Thanks for that suggestion. I have attached a picture of the loops as they are set up in the vi. I have taken out all of the extras to make matters simpler. The main problem is to connect loop number three to number one, so that whenever the value inside of the loop number three is true it is terminated and starts loop number one.
Attachments:
loops.bmp ‏470 KB

Similar Messages

  • Delay/Timer only in a conditional loop.

    Hello,
    I want to use a delay(or some kind of timer) within my
    program. I intend to use to it within a conditional loop. Specifically,
    if a particular condition is true, then I want to wait for 50ms and
    then check another condition, which if true, I want to stop my program.
    I have used wait vi in the timing section. But this vi pauses my
    whole program. Specifically, when the above mentioned condition is met,
    I want the delay vi to execute along with my data acquistion vi. At
    present, when the delay vi executes, everything (data acquisition, peak
    detetction, plotting etc) in the program pauses. I guess its correct
    functionality of wait vi but it does not suit my need.
    Does someone have any alternate for pausing (delay/timer) a
    particular condition loop without affecting the other parts of my
    program? Specifically, only the conditional loop delays for a certain time while other features like data acquisition, peak
    detetction, plotting etc excute normally.
    Message Edited by Neuropotential on 02-22-2010 12:47 PM
    Message Edited by Neuropotential on 02-22-2010 12:48 PM
    Solved!
    Go to Solution.

    Yes. This is exactly what I was looking for. But, there is a issue. In practise, i will not be looking at 10 sec delay but a very small number like 50 ms. With this approach, when I set a value of 50ms, my program stops after close to 90-93ms (After 50ms, there is a AND gate, when true stops the program; Refer to the attachement).
    There are multiple reasons which I see. First is obvious I am using a windows xp with lot of other stuff going on simutaneously. Also. elapsed time vi is an "express vi". Do you think this can be one of the primary reason for such a delay? Finally, I intend to use this program on RT based machine.
    Do  you see it working exactly as expected on those machines or do I have to modify my code? Please guide me. 
    Also, how to I mark your post as answer and other good things. 
    Thanks 
    Attachments:
    Image.JPG ‏60 KB

  • GP - post condition loop block

    Hi there,
    I developed two web dynpro applications that implement the Callable object interface. Let's say they are called wdpA and wdpB.
    wdpA has  output parameter id with multiplicity (0..1)
    wdpB has input parameter id with multiplicty (0...n = list)
    Is it possible to do wdpA in a post condition loop block (execute it at least once) and after that block go to the next block that contains wdpB. In going from wdpA (possibly executed multiple times) to wdpB, i want to consolidate wdpA-output_id to and wdpB-input_id so that the id's that were generated in the loop can be processed in wdpB.
    Kind regards,
    J.

    Hi Joren,
    I don't think it's too difficult. You can find a description and an example here:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/82/0e6f4132f15b58e10000000a1550b0/frameset.htm">Implementing Callable Objects for Background Execution</a>
    In any case you need some references/public parts to determined GP DCs, if you have a NWDI, than it should no problem to reference to them. If not, perhaps the following blog describes a good workaround:
    <a href="/people/andre.truong/blog/2006/06/26/working-with-the-apis-of-caf-guided-procedures-nwdi-or-local-development">Working with the APIs of CAF Guided Procedures: NWDI or Local Development?</a>
    Regards,
      Jan

  • Conditional Loop doesnt work correctly.

    Hi There,
    If you analyze my code, its all about parsing a dictionary.
    Im checking the dictionary for the "aardvark" word. It gives me
    false all the time. When "aardvark" is the first word in the array,
    i.e my_dictionary[0] is "aardvark". I wonder why the conditional
    loop isnt working fine. Im checking if the user string aardvark is
    == my_dictionary
    ; it should be giving me the true value.
    Is there any error in the code? Can anyone explain me where
    im going wrong?
    P.S -> The traces put everywhere gives me the right
    output. Except for the result of the if().
    Regards and thanks a lot in advance.
    Roshan Kolar

    Hi Raymond,
    Thanks for the reply. I got the problem, actually the
    conditional loop was perfect, the parsing was not. The reason
    being, some words in the dictionary had a Space/NewLine/Carriage
    Return at the last index after the word. It was all random, so some
    words were taken, but some were not like "vicious" == "vicious " -
    gave INVALID WORD.
    So I redesigned the parser, where I removed the unwanted last
    char - now the condition worked fine. Thank god I was working even
    after posting the query.
    Thanks a lot Raymond.
    Regards,
    Roshan

  • Phase calculation in conditional loop

    I collect data from 2 channels on an Agilest oscilloscope (DSO-X-2004A) using the IVI Scope Acquire block. After acquiring those signals, I want to know the phase difference, which I calculate in the following manner: Tone Extraction CH1, Tone Extraction CH2, Formula (detect phase1 - detect phase 2). 
    I want to run this in a loop, and store the phase difference each loop. For that I have a conditional loop (set to 10 iterations for now), and after each phase difference calculation I save the new data point to a txt file. Is there another way of storing/saving the phase difference calculation from each loop, besides saving it to file?
    The next problem I have is that after all the loops are finished, I want to look at the phase difference data and plot it vs iteration number. This is a problem because I get the error: "The selected file does not contains any Signals that could be imported" when trying to load the data at the end. I have the load ascii block outside the conditional loop that generates the data file, so I don't know why the load ascii is trying to excecute before the loop is done. I tried splitting everything into Sequence conditions with execution delays, but that hasn't worked either.
    Is there a better way to save the calculation from each loop, or how do I appropriately load by text file after creating it in the same signal express project?
    Thanks,
    John Oxaal

    Thanks for sending the the project.  For now if you would like to easily integrate the setup that you have in SignalExpress into LabVIEW you can actually convert the project into LabVIEW code.  As long as the LabVIEW version is as late or later than your SignalExpress version, you can do this.  Please refer to document below on how to convert signal express project into a LabVIEW VI.
    How Can I Generate a LabVIEW VI From My SignalExpress Project?:
    http://digital.ni.com/public.nsf/allkb/96C01D2680084AAA86256F33007D98FA
     Once you figure out how to take in your data in LabVIEW, you can start placing your data in the array that I mentioned from which you can process the data.
    Cameron T
    Applications Engineer
    National Instruments

  • How to manual maintain TAX condition value while creating sales order

    Hi
    I am creating one Tax condition suppose JLST without access sequence .
    while creating sales order I am manually maintain the % value of TAX. suppose it is 1%
    then I see It show some value in TAX .
    save that sales order & creating delivery document for that but when I create Invoice its show error.
    " Tax code  in procedure CMTAXP is invalid ".
    I know the configuration only for Tax condition with vk11 condition record .
    BUT now I want to maintain TAX condition at the time of creating sales order.
    so I remove the access sequence of that condition .
    but It shows tax code error while billing.
    My main question is that If i maintain condition record while creating sales order then how i can assign Tax code .
    Can it is possible ?
    if yes then How?
    please help me.
    thank you

    Hi,
    The "straight-forward" answer for Tax Code creation is contact the FI consultant. He shall help you, by creating Tax codes.
    I have tested, with creating a tax cond type (copy of MWST) & manually entering values. I can create Sorder, Dlv and Bill but I cannot create an Accounting document. That is because of every line (amount) a Tax code is necessary.
    I THINK, you can NOT have manually filled tax codes; access sequence is needed to get the tax value (%) and the Tax code from the condition record.
    There is lot of material on the web to understand Tax classification, code etc. etc. See a useful link below -
    http://www.sapgeek.net/2010/04/sd-determines-tax-code/
    In short Tax code is a must and take the help of your FI consultant for the configuration of the same.
    BTW - Tax code is already made created for MWST, therefore I suggested that you can use MWST. Furthermore, you can change the values corresponding to Tax codes in FTXP.
    But if you are a beginner in these things, better take help.

  • Conditional Loop Terminal and Autogrow

    When changing a for loop terminal from indexing to conditional, the for loop and any containing structures expand even when they are not set to Auto Grow.
    When selecting multiple conditional tunnels and and choosing Vertical Compress from the Distribute Objects menu, the tunnels are compressed as if they don't have condititonal terminals.
    Are either of these bugs known or corrected in LabVIEW 2013?  I could not find anything on NI.com when searching for "conditional tunnel autogrow".
    Thanks,
    Matt
    Attachments:
    Conditional Terminal Auto Grow bug.vi ‏6 KB

    Matt,
    A Very nice example of unexpected behaviour!
    Steps to reproduce:
    Open Matt's attachment in LabVIEW 2012  (12.0f3 Windows 32 on Win 7 64)
    Right-click the loop and verify Autogrow is not checked
    Right-click the top output tunnel and select Tunnel mode>>Conditional.   Loop does not respect the autogrow setting! 
    Lasso both output tunnels and Ctrl+D (or optionally, click Distribute items>>Vertical Compress)  Conditional glyphs are not respected in allignment
    Select the "Top" tunnel and Ctrl+Shift+J (Move to back)  What kind of tunnel is that now? I'd really hate to debug that one.
    Really Really hate to debug that one! Run VI Analizer! No overlapping objects!
    Sounds like a small oversight-- but a deadly potential for breaking code that is impossible to find without a divining rod!
    BOLO (Be on the lookout) for this type of bug.
    Jeff

  • ICloud Photos - Terms & Conditions Loop

    Apple TV Model MD199BZ/A
    Hi guys,
    I updated the firmware of my Apple TV yesterday to 6.0 (6646.65) and now I cannot connect to the new "iCloud Photos" which replaced the old "Photos". It just keep showing the new iCloud Terms and Conditions, and if select Agree it just loops back to Terms and Conditions again. I tried scrolling down all the way to the bottom before hitting Agree, but it just keep showing iCloud T&C and never connects... What should I do?

    I am using ATV2, problem with iCloud ID/Password when accepting Conditions there is a loop to accept them again, and again and again
    Password is correct as in other devices, iTunes password/ID is the same and this one has no problem
    No problem reported with Macbook Air 2012, nor with iPad,2 nor with iPhone 5, only with ATV2 after the newsest update
    Thanks

  • Conditional Looping to check for equal results???  Anyone tried it?

    Does anyone know if there is a way to loop though X amount of lines and IF a specific element is always the same... then DO "something"
    I need to run though this type of condition in the header section of the a template. Basically on a lot of PO's, we have the same Requester for all the lines, so we just want to see it once in the header... but if lines have different requesters for the same PO we need to show them on the line.
    So say i have this XML output below, (i trimmed it down a bit from the actual PO output) how can I loop though each G_DISTRIBUTIONS node to check the value of POD_REQUESTOR_NAME, then if all the values are the same(equal)... just print it out once.
    I need to then do a similar condition in the lines... but show the name when they are NOT the same.
    <G_HEADERS>
    <G_LINES>
    <LIST_G_DISTRIBUTIONS>
    <G_DISTRIBUTIONS>
    <POD_REQUESTOR_NAME>LOMBARDO, TIANA</POD_REQUESTOR_NAME>
    </G_DISTRIBUTIONS>
    </LIST_G_DISTRIBUTIONS>
    </G_LINES>
    <G_LINES>
    <LIST_G_DISTRIBUTIONS>
    <G_DISTRIBUTIONS>
    <POD_REQUESTOR_NAME>LOMBARDO, TIANA</POD_REQUESTOR_NAME>
    </G_DISTRIBUTIONS>
    </LIST_G_DISTRIBUTIONS>
    </G_LINES>
    <G_LINES>
    <LIST_G_DISTRIBUTIONS>
    <G_DISTRIBUTIONS>
    <POD_REQUESTOR_NAME>LOMBARDO, TIANA</POD_REQUESTOR_NAME>
    </G_DISTRIBUTIONS>
    </LIST_G_DISTRIBUTIONS>
    </G_LINES>
    </G_HEADERS>
    Thanks in advance, hope to get a response,
    Jeremy

    Thanks... but i'm not sure this is working the way i expect it.
    This appears to pull the unique one correctly... but i'm trying ONLY show the element when all the elements in the for loop are equal.
    Can i put a IF statment into it? Something like... but i'm pretty sure that's not going to happen...
    <?if: for-each:xdoxslt:distinct_values(G_DISTRIBUTIONS) = for-each:xdoxslt:distinct_values(G_DISTRIBUTIONS)?><?POD_REQUESTOR_NAME?><?end for-each?><?end if?>

  • How to do conditional looping?

    let say, i have qty. how to loop, as long as qty not equal to 0
           <c:set var="i" value="5" />
           <c:if test="${i!=0}">
                  <c:set var="i" value="${i-1}" />
                  <c:out value="${i}" />
            </c:if>the code above only cout 4,
    not 4,3,2,1
    Please correct my mistake..
    Edited by: cavern on Aug 6, 2008 9:29 AM

    this is my coding. no output is displayed. what is the problem?
             <c:forEach var="i" begin="5" end="0">
                  <c:set var="i" value="${i-1}" />
                  <c:out value="${i}" />
              </c:forEach>

  • Conditional loop ?

    I want an error message to display for, lets say 15 frames,
    then to disappear. I have been working on the code, but I can't
    figure out how to get the if statement to stay looping until it
    reaches 15.
    Here is the code im using, any help would be great. thanks !
    selectModuleCounter = 0;
    if (selectModuleCounter>15) {
    gotoAndStop(1);
    } else {
    selectModuleCounter++;-
    trace(selectModuleCounter);

    so it would be
    on frame 1
    var atKeyFrame
    then on frame 2
    selectModuleCounter = 0;
    for(var atKeyFrame=0; atKeyFrame<15; atKeyFrame++) {
    if (selectModuleCounter>15) {
    gotoAndStop(1);
    else {
    selectModuleCounter++;-
    }

  • Conditional looping. How to refer to the previous result s of looping?

    Hi,
    I'd like to repeat a sequence for second time only if the sequence failed first time. To do that I'd like to use the Looping feature from step properties. Question: how should I build the Loop Status Expression refering to the Step Staus (Pass/Failed) of first loop?
    Solved!
    Go to Solution.

    In the Looping properties in Loop Type select Pass/Fail count.  Then set the Stop after to 1 and iterations to pass.  You can set the maximum number of iterations to whatever value you desire (in your case it sounds like 2).  You can play with the numbers to fit your scenario.  As you play with the numbers you'll see the expressions values changing.
    I could give you a better answer if I understood exactly what you wanted but this will probably do what you want.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How do i get boyond terms and conditions loop I am currently trapped in

    I had to do a restore as part of ios7 download and am now trapped in the terms and condition page. No matter how often I 'agree' I cannot exit this page

    Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • IOs 7 Terms & Conditions loop

    I just downloaded the iOS 7, and during the configuration I cannot get past the Terms and Conditions page. I accept and then I'm brought right back to the same page. I have seen a lot of suggestions include people saying to go to Settings - General - etc, but I cant even get into my home screen. I'm basically phoneless until this is resolved so I'd appreciate some help here!

    Hi momolope,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    Try resetting and/or restarting the device.
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    Cheers,
    - Judy

  • Stuck in terms and conditions loop

    i have a macbook pro and I am trying to download a song but am stuck in accepting the terms and conditions.  I accept and it keeps bringing me back to terms and conditiions

    Same issue here. Apple's quality control is sinking fast...

Maybe you are looking for

  • Problems with Vista Drivers on Satellite M100 (PSMA1E)

    Hello, I got Problems with installing the Vista Driver for the Graphic Card and the Realtek Sound Card. I downloaded the Drivers from the Toshiba-Support Side! The Realtek Driver couldnt be installed because of some missing file! The CCC wouldnt run

  • Call a VB EXE from ABAP

    Hi all, I would like to call a Function (with 3 Param) of a given VB-EXE or VB-Script from my ABAP. Is there anyone who can help me ?? Thanks

  • HURRY UP NOKIA! (About N96 V20.50)

    Many people are complaning about their N96s still NOT showing update to V20 neither on NSU nor on OTA.  These N96s are unbranded, SIM Free, operator free, unlocked, whatever you want to call it. They are directly purchased from Nokia Shops. This time

  • Anyone recognize this error message?

    Getting this lately.  Not sure which software 'vendor' to look at for a fix.  Anyone? The system extension "/System/Library/Extensions/AppleUSBEthernetHost.kext" was installed improperly and cannot be used. Please try reinstalling it, or contact the

  • ImageIcon on a JLabel

    I have a JLabel, artworkImgLabel into which I want to place another JLabel with an Icon and then display it but only when the user clicks the button. The rest of the JFrame is already being displayed ie. setVisible() has been called. The code below i