Beginner Question: Won't execute index to nested while loop

Problem:
I have a nested while loop inside a for loop. The for loop runs over and over from 0 to 587. I want the while loop to only execute when the for loop hits 587 by means of a continue condition which is on when 587 = [ i ], the for loop iteration number. However when I try to change the value sent to the while loop from 588 none of the probes execute. This is bad because the index only runs from 0 to 587 and never equals 588.
Context:
This is for real time video analysis. Trying to convert a 658 x 492 color video feed frame by frame into low resolution grayscale video. With this index error the output is currently the top left 1/4 of the image, repeated in a 2x2 grid on the image display.
The VI is attached. I'm very appreciative of your thoughts on this.
Attachments:
Bin.vi ‏237 KB

The for loop is responsible for processing a frame. At the completion of the execution of [ i ] from 0 to 587, the replace array VI outputs the final product of the frame. So every time [ i ] = 587, the replace array VI needs to send its array to the arraytoimage, which in turn must send the image to the image display.
I got rid of the while loop and replaced it with the case structure. 
Maybe the problem is with the false case of the case structure? I want to continue outputting the same image for the next [0, 586] each time after it sends an updated image on the [ i ] = 587 iteration.
Attachments:
Bin.vi ‏238 KB

Similar Messages

  • Question for the math lovers!  Using while loop and exponents

    Hi there Java geniuses! ; ) A little question here that has been perplexing me for the past few days. I'm trying to create a class that contains a single static method as follows:
    public static double exp(double a)
    It's supposed to work to calculate an "exp" value much like the Math.exp method of the Math class. Essentially, I need to keep calculating approximations of "exp" until a certain condition is met. This condition is specified in a while loop. Following is what I've written so far. But I can't seem to get the thing to work properly. Any suggestions/ advice would be greatly appreciated! Thanks.
    A class that computes the "exp" for a user-defined
    value.
    public class MyMath
    public static double exp(double x)
    double dbloldGuess;
    double dblnewGuess = 1 + x; // First value for newGuess
    double dblcounter = 1;
    do
    dblcounter++; // increments counter
    dbloldGuess = dblnewGuess;
    dblnewGuess = dbloldGuess + ((x ** dblcounter) / counter);
    while (Math.abs((newGuess - oldGuess) / newGuess) > 1e-15);
    return x;
    }

    ** wasn't an operator in C when I last checked...
    Anyway here's my lousy attempt:public static double exp(double a) {
            double guess = 1;
            int N = 18;
            while (N --> 1) guess = 1 + a/N * guess;
            return guess;
    }When called with 1.0 as argument gives the value equal to the constant Math.E, so is "probably" ok for arguments 0.0 -- 1.0. I wont guarantee anything else because this method is pretty pathological when it comes to loss of precision due to rounding, even if you increase N.

  • Call by reference into a subpanel won't execute called VIT with a loop

    LabVIEW experts check this out....
    I've attached a sample program (Main VI.vi) that simply calls a VIT by reference (Subpanel3 VI.vit).  The template simply adds two numbers, but the front panel does NOT show up if there is a loop in the template.  If the loop is removed, everything works fine and of course the template runs fine standalone.  You can verify this by removing the loop, then resaving the template that is called.
    Is this a bug or am I missing something?
    TR
    ><><><><><><
    Tommy R.
    ><><><><><><
    Attachments:
    callByReference.zip ‏15 KB

    Hello <<-N->>
    In the above example, it is not possible to interact with the subpanel when the 'Wait Until Done' flag is set to TRUE because of how the run VI invoke node is wired to the subpanel invoke node. In this setup, the subpanel invoke node cannot run until the run VI node has finished due to the error wire and VI reference wire that come from the output of the run VI invoke node. Basically the subpanel is waiting on that data before it can run, and if you select the 'Wait Until Done' to be true, then the VI wont continue executing until the VI that was called is finished running. You can refer to this page for help better understanding program dataflow: http://www.ni.com/gettingstarted/labviewbasics/dataflow.htm#Wires
    I've attached a picture of how you would construct the VI to be able to interact with the subpanel, while still setting the wait until done flag to TRUE. Note that the subpanel invoke node does not have to wait on the Run VI invoke node before it can run. (This is modified from the Simple Subpanel.VI in the example finder).
    I hope this helps!
    -Nathan H
    Software Developer
    National Instruments
    Attachments:
    subpanel_control.JPG ‏96 KB

  • Why does a sequence structure execute if a while loop is to the left of it?

      I have a while loop in a case structure whose boolean is wired to a sub vi.  To the right of this structure I have a sequence that executes regardless of the while loops condition.  I assumed that the program would not continue to the case structure until the while loop stopped.  Then it would proceed to the case structure.
    Thank You

    jemengineering wrote:
      I have a while loop in a case structure whose boolean is wired to a sub vi.  To the right of this structure I have a sequence that executes regardless of the while loops condition.  I assumed that the program would not continue to the case structure until the while loop stopped.  Then it would proceed to the case structure.
    As others have mentioned, you have to familiarize yourself with the core idea of dataflow programming. One of the great powers of LabVIEW is the fact that things can occur in paralell unless there is data dependency.
    A good start would be the LabVIEW beginners online tutorial:
    http://www.ni.com/swf/presentation/us/labview/aap/default.htm
    The quiz #1 on slide 11 deals with the above issues. Try to answer it. 
    In your particular case, you need to force execution order. This can be done by creating a data dependency (preferred) or by the use of a sequence structure. You could e.g. create a 2-frame flat sequence and place the loop in the first frame and the case structure in the second frame.
    The picture shows a few scenarios for comparison. Can you spot the differences?  Understanding dataflow is crucial for writing any LabVIEW program.
    Message Edited by altenbach on 07-31-2006 06:49 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ExecutionOrder.png ‏19 KB

  • Captivate 3 Published file won't execute JavaScript

    Pulbished Captivate 3 course.   Final screen has an exit button with the following script:  ab_SetScoreStatus(100,'completed');ab_CloseWindow();       When I post the course to our LMS it uploads fine, but when I try and run the course I get an error when I click on the Exit button and it doesn't do anything.   I had someone try the same thing on their computer and it works fine for them so I'm thinking it's something with my settings.   This used to work for me but then I got a new computer so not sure if the settings (IE, Flash or ????) are different or what.   I'm running Flash 10, and IE 8.   Any help would be greatly appreciated.  Thank you.

    Good morning Rick, and thank you for trying to help.
    Sheri Delaney
    From: Captiv8r [email protected]
    Sent: Wednesday, February 16, 2011 3:59 PM
    To: Delaney, Sheri
    Subject: Captivate 3 Published file won't execute JavaScript
    Welcome to our community
    See if the following links help.
    http://forums.adobe.com/thread/473021#5
    http://forums.adobe.com/thread/473021#10
    Cheers... Rick
    http://www.robowizard.com/pc.gif
    Helpful and Handy Links
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5
    http://www.ShowMeSolutions.biz
    http://sorcererstone.wordpress.com/
    http://www.gooberguides.com

  • Beginner question: Configure Tomcat for JAAS?

    Hi,
    This is a beginner question :-(. I'm trying to get JAAS to work on my Tomcat (6.0.12) installation. I used code from a Javaworld article (http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html)
    Of course I had to configure my Tomcat to work together with JAAS. The document I used is: http://tomcat.apache.org/tomcat-6.0-doc/printer/realm-howto.html
    According to the Tomcat doc I have to do the following steps before I can use JAAS to authenticate a user:
    1. Develop your code. Place the compiled classes in Tomcat's classpath
    2. Setup a login.config file for Java, and tell Tomcat where to find it (set JAVA_OPTS)
    3. Configure the JAASRealm in your server.xml
    1 Develop code: I use the following classes:
    PassiveCallbackHandler.java
    RdbmsCredential.java
    RdbmsLoginModule.java
    RdbmsPrincipal.java
    These classes I put in the package rdbmsjaas.
    In the %CATALINA_HOME%/webapps/Javaworld_Jaas/WEB-INF/lib directory I created the rdbmsjaas.jar file.
    The jsp is called jaas.jsp, and is stored in %CATALINA_HOME%/webapps/Javaworld_Jaas
    2. Setup login.config
    In %CATALINA_HOME%\conf I saved the file Javaworld_all_that_Jaas.config, containing:
    Example {
       RdbmsLoginModule required
       debug="true"
       url="jdbc:mysql://localhost/jaasdb?user=javauser&password=javadude"
       driver="com.mysql.jdbc.Driver";
    };I created an XP Environment Variable JAVA_OPTS with the value <-DJAVA_OPTS=-Djava.security.auth.login.config==C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/JavaWorld_All_That_Jaas.config> (excluding < and >)
    I used the fully qualified address, instead of $CATALINA_HOME/conf/JavaWorld_All_That_Jaas.config. I think XP balks when it sees $CATALINA_HOME).
    3 Configure JAASRealm in server.xml
    In %CATALINA_HOME%\conf\ I changed web.xml. I added the following lines:
          <Realm className="org.apache.catalina.realm.JAASRealm"
                 appName="jaas"
                 userClassName="rdbmsjaas.RdbmsPrincipal"
                 debug="99"
           />If I run the jsp from http://localhost:8080/JavaWorld_Jaas/jaas.jsp, I can enter my username/password, but when I click the Submit button, I get:
    Caught Exception: java.lang.SecurityException: Unable to locate a login configurationWhere did my configuration go wrong?
    Abel

    You will need a JSP/servlet engine such as Tomcat - Apache alone won't do it.
    I haven't seen any tutorials on set-up but the Tomcat documentation includes info on how to link to Apache. There are also books you can buy - check out the online book stores such as Amazon.
    There's also a lot of info on this forum.

  • Open VI Reference Function won't execute in multi process application

    I have a sub vi with Reentrant execution, and it has
    recursive call on some cases.
    It is very similar to OpenG VI “Read Key
    (Variant)__ogtk.vi”, my sub vi works without any problem unit LabVIEW’s Two
    Button Dialog is opened in other process loop.
    I have attached a Test VI, and would like to understand why
    would Loop 1’s Dialog box have any execution impact on Loop 2’s process?
    Why Open VI Reference Function won’t execute when Two Button
    Dialog is opened in other process?
    LabVIEW version 8.6
    Thanks,
    Attachments:
    Test Vi.zip ‏17 KB

    Broken Arrow wrote:
    LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
    Broken Arrow thanks for your reply, but not sure if I understand Modal dialog box would cause the problem.
      I already had a work around by using Three Button Dialog VI, and it is s Modal VI.
      I would still like to understand, why would DataFlow halt at Open VI Reference Function in Loop 2 when I use when Two Button Dialog?
    Attachments:
    Test Vi 2.zip ‏20 KB

  • HT201250 Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in and if so, do I really need all the old backups on my smaller ext

    Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in and if so, do I really need all the old backups on my smaller external drive?

    50maz wrote:
    Hi, I hope this question won't seem too basic but if I want to use a new larger external drive for my time machine backups, will it do a new full backup the first time I plug it in
    Yes, it will do a full backup.
    and if so, do I really need all the old backups on my smaller external drive?
    Only if you want to be able to go back in time to those previous Time Machine backups.  When you plug in the new larger external drive, you will only be able to go back as far as the first day you plugged it in and ran the first Time Machine backup on it.

  • PHP won't execute on Dream Weaver testing server

    I have successfully installed an Apache server and MySQL using Xampp.  Using Dream Weaver (CS5.5) I've created .php pages which (after setting up the site and testing server) successfully connect to a database.  However, php code on those pages won't execute.  The pages only display the text code when IE or Firefox links to http://localhost/filename.php.  Following is the Apache log file entries for those failed attempts. [Tue Jul 17 08:20:03 2012] [notice] Child 2656: Starting thread to listen on port 443. [Tue Jul 17 08:20:03 2012] [notice] Child 2656: Starting thread to listen on port 443. [Tue Jul 17 08:20:03 2012] [notice] Child 2656: Starting thread to listen on port 80. [Tue Jul 17 08:20:03 2012] [notice] Child 2656: Starting thread to listen on port 80. [Tue Jul 17 10:38:28 2012] [error] [client ::1] script 'C:/Program Files/xampp/htdocs/phpinfo.php' not found or unable to stat [Tue Jul 17 10:51:25 2012] [error] [client ::1] script 'C:/Program Files/xampp/htdocs/phpinfo.php' not found or unable to stat I've run out of ideas about how to solve this.  Anyone?

    If PHP is running in other locations, then it's a configuration issue with the server whereby PHP is not allowed to run in the folder you have specified.  I can tell you filenames and areas to look for, but I'm personally have never found the XAMPP installation to be the most intuitive when it comes to editing which is why I pointed you in their direction.
    If you look in the httpd.conf file, you should see a DocumentRoot defined.  Make sure that the site definition is within that document root.  There should also be a Directory declaration ( <Directory "/path/to"> ) that should match the path of your DocumentRoot.  It is possible to serve documents from different areas of your computer.  Ususally this is done when you have things like phpMyAdmin above the root, so if you see multiple entries in there, some of which XAMPP installs itself, you should leave them alone and ask their support forum for help because they will know which entries the application puts in that you will not want to remove.

  • Error While Executing index.jspx Of Content.ear Project from Jdeveloper

    Hi All,
    We are trying to execute index.jspx (of the project we extracted from content.ear file present in $CONTENT_HOME/content/lib. ContentDB Version 10.1.0.4) from JDeveloper(10.1.3.1.0 build 3984), however getting the following error.
    Sep 17, 2007 7:54:08 PM oracle.ifs.fdk.http.HttpNodeManager
    INFO: Creating HTTP Node ...
    07/09/17 19:54:08 Cannot create HTTP Node:
    oracle.ifs.common.IfsException: IFS-45061: Unable to create node
    oracle.ifs.common.IfsException: IFS-20016: Required parameters are null (either "Schema Name" or "Domain Name" should be non-null)
         at oracle.ifs.management.domain.HttpServletNodeUtilities.createNode(HttpServletNodeUtilities.java:243)
         at oracle.ifs.management.domain.HttpServletNodeUtilities.createNode(HttpServletNodeUtilities.java:156)
         at oracle.ifs.fdk.http.HttpServer.createNode(HttpServer.java:162)
         at oracle.ifs.fdk.http.HttpNodeManager.contextInitialized(HttpNodeManager.java:37)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1130)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:738)
         at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
         at com.evermind.server.Application.getHttpApplication(Application.java:545)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1973)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1925)
         at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:424)
         at com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:393)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:434)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Can anyone please help us out in fixing this issue by giving some pointers.
    Please let us know if we are required to make some settings in jdeveloper to run this project for connecting to content db from jdeveloper.
    Any Help is really appreciated.
    Thanks in Advance.
    Vandana.

    I am facing the same. Have you found a solution?
    Johnson

  • Beginner Question

    Hello all, hopefully I have posted this to the correct LiveCycle board!
    I'm new to Acrobat and LiveCycle in general. I'm working out of windows LiveCycle Designer 8.x  and my question is as follows....
    I'm working off of the "Quote" Form Template and what I am looking for is a way to make the rows of the Table expand as needed.  I will be converting this Template into a "Purchase Order" form, and there will be many occassions where I will need to increase the table rows - perhaps onto a second or even third page - due to the volume of different items I will be seeking prices on at a given time.
    Long story short I would like to take this "QUOTE" form template and make it such that if needed, I can expand the table size one row at a time, pushing the content beneath (Comments, subtotal, etc) onto the next page....
    Hoping I have explained my query well enough,  Could anyone provide me a solution or point me in the correct direction?
    Many thanks!

    As a followup, so as not to clog the board with numerous threads I have another beginner question
    For the sake of hypotheticals I am creating a dynamic PDF form.  This pdf is a Purchase Order Form, with a table in the Body that will expand/contract as the form user needs.  (EXA-  Default table size is 5 items, however user is creating an order for 12 items, he/she can increase the table rows to desired capactiy.) It will be a very simple layout. All data for the form will come from manual entry, no XML data binding going on.
    My new question is as follows:    Is there a way I can have this user's Adobe reader or Adobe acrobat software remember previous data entries, so that if 4 weeks after ordering widget X he/she needs to place another order for widget X, the software will autofill the table as he/she types into the table cell?
    This would be similar to how Excel will start to autofill if it recognizes a previously entered value from some other cell in the worksheet (workbook?)
    EXA-
    [NAME]   [MODEL]   [QTY]   [PRICE]
    Widget           A            433        $30.00
    Would it be possible for the software to notice that I'm typing the word "widget" somewhere after typing "wid" ???
    Many thanks for any and all followups, I'm a teenager trying to help out in my father's small business. They are in the darkages here and I'm doing my best to self teach.
    Thanks.

  • HT204266 Security questions won't load.

    I'm trying to download an app, and after I put in my apple id and password, its asking me to answer my security questions. But the window opens, and the questions won't load.

    The Best Alternatives for Security Questions and Rescue Mail
         1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
         2.  Call Apple Support in your country: Customer Service: Contact Apple support.
         3.  Rescue email address and how to reset Apple ID security questions.
    An alternative to using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • Some of my tunes are assigned to a former email address and I can't remember the password. The security questions won't let me pass my date of birth, which they say is incorrect! I think I know my DOB. What can I do to remedy this

    My laptop now has a different email address so there are certain tunes that won't play as hey are assigned to the old address. I can't remember the old password and the security question won't allow me past my date of birth, which they say is incorrect!! I certainly know my DOB. Is there anyway I can unlock these tunes?

    Have you exhausted the options here?
    https://iforgot.apple.com/password/verify/appleid
    tt2

  • Beginner question: Can I apply one formula to all cells in a column?

    Hi,
    I'm new to spreadsheets, so apologies for asking what is probably a very simple question.
    I want to apply a formula that divides the values in one column (W) by values in another (AX) for a table containing 3000 rows, and outputs the result for each row into the appropriate cell in the new column I've created.
    Numbers 09 'help' hasn't helped to this point.
    Thanks in advance for any assistance.

    GeoBrett wrote:
    Numbers 09 'help' hasn't helped to this point.
    Besides Numbers '09 Help there are two other useful resources available in the Help menu: the Numbers '09 User Guide and iWork Formulas and Functions Help.
    For "Beginner questions," my first choice would be the User Guide. For the specific question you asked, a quick scan of the chapter on "Using Formulas and Functions" (pp 83-96) will provide some useful information. Start in the neighborhood of page 93.
    Regards,
    Barry

  • Beginner question regarding 32-bit mixing and mixdown workflow

    Hello
    I have a beginner question regarding 32-bit mixing and mixdown.
    If I edit some 16Bit, 44.1kHz Stereo WAV Files and put them into multi-track view to do crossfades, how should I do the mixdown?
    Audition shows me in multi-track view, that it is doing 32-Bit mixing.
    Can I just mixdown to 16Bit, 44.1kHz Stereo without any dithering (as the files are 16Bit, 44.1kHz Stereo to begin with), or will I lose quality that way?
    I will be performing a normalization to 96% to the mixdown and then split to tracks in Audition, as in the end I want to to have an audio CD.
    I guess I could mixdown to 32Bit, then normalize and in the end save back to 16Bit, 44.1kHz Stereo WAV (with dithering, I suppose?), but I want to avoid any unnecessary converting steps.
    Greetings

    Any time you do any processing on a 16bit file in 16 bit only it will degrade the audio slightly due to rounding of the calculations. Working in 32 bit floating point (Audition's default) takes account of all bits generated due to processing.
    So it is always best to work in 32 bit, even if your originals were 16, all the way through until the last stage of saving the files for CD burning. Any losses due to conversion will be insignificant against those due to working 16 bit.

Maybe you are looking for

  • How to receive emails of the same inbox from in a Weblogic Server cluster

    Hi All, I have an application running on WebLogic Server with 6 instances. Many requests for the application come from Email. We already set up an email account that will be used by all clients to send email to. But the problem is that the email acco

  • How do i print selected cells in numbers?

    how do i print selected cells in numbers?

  • Parameterized XSLT Mappings

    Hello, I'm trying to implement a Parameterized XSLT Mapping. But in the documention is a gap (see http://help.sap.com/saphelp_nwpi711/helpdata/en/43/bbb7fd90f5332ee10000000a11466f/frameset.htm). In Action 2 is written: "When the XSLT mapping program

  • GotoAndStop is sometimey

    I have a movie that uses a next and previous button.  The next button works the same on every page calling a function that uses next().  The movie continues until it is told to stop.  The previous button takes you directly to a specific frame in the

  • Spry Menu Bar in Javascript

    Hi all , Is it possible to place a Spry Menu bar in a Javascript? If so can any one please tell me of a tutorial or URL with an example. I have a web site (Which was produced solely in Frontpage) and has several pages with the same menu on them, so i