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++;-
}

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

  • 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?>

  • 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

  • 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>

  • 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

  • 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~

  • 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...

  • Condition loop only one time

    taking input as digits
    giving output in words
    ex:
    100 output hundread
    1234 one thousand two hundread thirty four
    0003 three
    like this we have output
    so please specify any logic
    thanks&regards
    SIva

    http://www.google.com/search?q=java+convert+number+to+text
    ~

Maybe you are looking for

  • How to call a calander in oracle forms6i

    Oracle Forms 6i Hai All How to call a calander for a botton.I my form I have a button called process date When i press a button the calander need to display and select a date and i need to the process date. How can i do this Pls tell Me Any help is h

  • E3000 Share/Master Browser issue

    How do I turn off the network share on my E3000? What is hapening is this: My Windows XP Computer and my WD TV Live can not see network computers and their shares (The E3000 is seen on the network only).  When I attempt to browse the workgroup in Win

  • Fonts get corrupted transferring from old Mac G4 to new G5 running OS 10.4.11

    "Why do my fonts get corrupted when I use a flash drive to transfer my fonts from my old Mac PowerPC G4 running OS 9.2.2 to the font folders on my newer Mac PowerPC G5 running OS 10.4.11 and Classic?" The fonts (hundreds of them) look fine on the fla

  • How to Produce AC3 audio with video to play surround sound  5.1 on an AppleTV

    I have produced a short video with a SONY video camera that records AVCHD in AC3 surround 5.1. When I edit it in FCP I can see the six channels both beside the time code and to the right of the time line. When I go to share the video to my iTunes lib

  • Finding ASM home

    Hi, Database - 10.2.0.3 on AIX 5.3L How to find location of ORACLE_HOME for ASM. We have env varible $ORACLE_HOME in bash profile pointing to home for rdbms but unable to find same for ASM. regards