For results outside the while loop

Dear friends,

I have a while loop vi, which is attached to this mail. I want to update Boolean Boolean results, while the while loop runs. In fact this is not the case?

Do I need to use it as a global variable or another simple method to do? Could you please guide me, or please alter the VI of the sample which is attached to this mail.

Thank you

Best regards

Tom

The Boolean value outside of the loop only will be updated, as wiring system, when the loop ends, it's how the LabVIEW data flow. The simplest method for updating the Boolean value outside of the loop is to unplug the wire, create a local variable (right click on the device, select 'create', 'Local Variable'), move the room inside the loop and hook it up to your function "equal." This is not necessarily the best method, just the easiest for this example.

Tags: NI Software

Similar Questions

  • store the value obtained in the while loop

    Hello

    I'm data acquisition (1,000 points every 0.1 s) in a while loop. I would like to calculate the average y of the first sample of 1000 points when I click on a Boolean 'calibrate', store that value somewhere (outside the while loop?) so that it can subtract from each new amplitude y. In the vi below, a new average value is calculated in each loop, although I would only use the first.

    You don't need to store the value outside the while loop. Keep the offset of the value when calibrate button is pressed and subtract the value with earned value. I modified your find VI the VI attached.

  • How to create a control of time for the while loop?

    Hi all

    I want to control my time running of the loop. In other words, I want to stop everything in the execution of the loop after a time (in ms) that is defined by the user. For example user defines Control Panel for 5 seconds before a while loop runs and stops after 5 seconds.

    I don't know is it possible with the while loop. I managed with the timed loop, but this must be wrong with my application. Y at - it of the other loops for timed control if it is not possible with while loop? There is also a simple loop with .vi random number (0-1) as an attachment.

    Best regards

    Jick

    Hi again,

    I managed to solve my problem right after I posted my first message. I did it with the passage of time and the register shift (for the elapsed time of reset).

    Thanks for your replies anyway!

    Best R

    Jick

  • How the entry changes with each iteration of the while loop

    Hello

    can anyone explain (clarify) to know how or what contribution will be fed like the d block of adaptive filtering for the first, second entry (n) and remaining iterations of the while loop as shown in the picture as an attachment...

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    Thank you.

    You have a shift register on the edge of the loop, so for the first iteration, the input (n) d will get everything that feeds the shift register on the left of the outside. After that the adaptive filtering performed, e (n) is injected in the shift to the right, register to be read from the shift register on the left on the next iteration. And so on. This seems pretty much what you want.

    PatanGova wrote:

    As I need to feed the e (n) out of the while loop as input d (n) to the Adaptive block for the first iteration for the next iteration of the previous output e (n) of the block Adaptive must be fed back as input (n) d and other x (n) of entry form the DAQmx.

    If you need retain the value in calls, use a node that is initialized in the world of feedback to feed out of the while loop at the entrance.

  • Table 1 d in the while loop problem

    Hello world

    I searched this problem in the forum, but seems only some positions quite didn't answer.

    I'm stuck by saving the data in a while loop.

    I have a while loop, within which there are two exits in each iteration, I want to add to a table, and then after the while loop is completed, I want to combine these two tables in a 2D array (since the release of them must be a pair in my case).

    I tried 'Build array' and 'transpose array' and 'write in spreadsheet' element set, which maintains concerns me is how simply to add the result in a 1 d table during each iteration, these 2 outputs are in digital format, which prevent to directly create a table for it.

    Any idea is appreciated,

    Thank you

    Chen Kunsheng

    Here are some other ways to insert.

    It may be useful

  • delete 2d array in the while loop

    I have a table 2D being initialized outside of the loop executing a state machine, how would a clear table 2d in the while loop? I guess I'm not sure what to wire a constant matrix empty 2D too =)

    When you want to erase (regardless of this Boolean condition), wire just a constant matrix 2D of your shift register.  See attachment.

  • How to add the unique element (inside the while loop) to itself

    I have only digital output element that is in the while loop. Its value changes in each time the loop iteration. If lets say I want to adds the values of the ten first in iterations of the loop of this variable.  How can I do that.

    See attach image for more precision.

    Thank you

    JK

    Hi Joseph,.

    THINK THE STREAM!

    As the values are stored in the son and the shift registers (and NOT in any kind of variables), you must use these fundamentals of LabVIEW:

  • Is it possible to execute a loop For independently within a while loop in LabVIEW 2013?

    In my program, I want to run a loop For inside a while loop and run independently, at their own rate of execution.  A test, I wrote a simple VI with a while loop with 1 second calendar and in this I inserted a loop For with 3 of a second.  I created indicators for the two terminals of the iteration.  When executing the VI, I found the while loop waiting for loop For run N times before the while loop is executed again.  I also found that sometimes the first iteration of the loop For ends at 1 second instead of 3 seconds and the STOP button to complete execution of the While loop does not always work.

    This is the expected behavior. LabVIEW is the language of s DATA stream. If you want the curls to be independent, it can be data forcing addictive so use separate loops.

  • Force the While loop to exit when the delay is running

    Hello guys,.

    I have a While loop containing some jobs. One of them is delay for 10 seconds. When I push the stop button, the loop does not stop immediately. Instead, it stops after a few seconds (can be, pending other jobs is done).

    What can I do if I want to stop the loop immediately after I press the stop button?

    Thank you for sharing...

    Hello Yoppy,

    I don't know if I understand your problem completely, but here's the method I use to stop the while loop immediately (some ms delay will be there for you).

    I would like to know if the attachment helps.

    There are several ways to do it and you can get better solutions than this one on this community.

  • To break out of the while loop (1)

    Hi all

    I have a simple question that if a callback to a command button function, I use a (bLoop) While
    loop, where bLoop is a boolean variable has the value TRUE, then how can I break up or out of this while loop by using a control on the façade, which released the while loop by setting bLoop = FALSE.

    I tried, but it didn't come out

    The problem here is that the CVI normally only runs a reminder at a time. While you are in snooze control, no treatment of GUI and subsequent calls to other reminders usually occurs.

    You can try the following approach-, but it's not really the best method:

    While (b_loop) {/ / within a reminder}

    ... / / Do your tight loop

    ProcessSystemEvents ();   Force the CVI to see if all the GUI needs maintenance controls

    }

    If you have a reminder of different control to erase the global b_loop, this packing approach might work for you.

    You must use this technique for very simple programs - it can quickly escape out of control and in the end upward in a mess if you're not careful. OR recommend that you use not ProcessSystemEvents() within a point of order.

    JR

  • URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    bbmChatDB of public database;

    public static FileConnection fconnRead = null;
    public static String fileReadData = "";
    public static InputStream is = null;
    data Byte [] = null;
    DataInputStream is = null;

    Here is my code...

    I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    try {}

    FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

    If (fc.exists ()) {}

    Enumeration e = fc.list ();

    While (e.hasMoreElements ()) {}

    System.out.println ("files are:" + (String) e.nextElement ());

    play this file
    StringBuffer stringBuff = new StringBuffer();
    try {}
    System.out.println ("opening file")-;
    System.out.println ("file name is:" + (String) e.nextElement ());
    fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
    System.out.println ("data length")-;
    If (fconnRead.exists ()) {}
    is = fconnRead.openDataInputStream ();
    data = IOUtilities.streamToBytes (is);
    Ddd = new String string (data);
    fileReadData = ddd.toString ();
    System.out.println ("length of data:" + fileReadData.length ());
    System.out.println ("read data :" + fileReadData);

    }

    } catch (IOException ee) {}
    ee.printStackTrace ();
    System.out.println ("Exception in the read data :")
    + ee.getMessage ());
    }

    }
    }

    } catch (IOException e) {}

    e.printStackTrace ();
    }

    {Finally

    try {}
    If (is! = null) {}
    is. Close();
    }
    System.out.println ("is closed...");
    } catch (IOException e1) {}

    E1. PrintStackTrace();
    }

    If (fconnRead! = null) {}
    try {}
    fconnRead.close ();
    } catch (Exception e) {}
    System.out.println (try ());
    }

    }

    }

    You can recode this treatment so that it uses only:

    e.nextElement ())

    Once a loop iteration.

    Directly at the start saying something like:

    String fileName = e.nextElement ());

    and use fileName everywhere in your loop.

    Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

    {} catch (Throwable t)

    t.printStackTrace ();

    System.out.println ("Eception exception:" + t.toString ());

    }

    I think your code is thrown an exception and you don't see it.

  • Add the link for help outside the answer, dashboard link at the top of the page?

    Hello world

    I would like to add the link for help outside the answer, dashboard link at the top of the page.

    http://hiphotos.Baidu.com/chenchendf/abpic/item/f44bb86eddc451dacb48b252b6fd5266d116326f.jpg

    Could you please let me know how. the bi version is 10g

    I found the ref: http://oraclebizint.wordpress.com/2008/01/31/oracle-bi-ee-101332-adding-custom-urls-to-the-dashboard/
    but it is not accessible.

    Thank you

    Hello

    Follow this-

    Stop the BI server

    Put the code below in the file commonuitemplate.xml under OracleBI\Web\msgdb\messages dashboardURL code (search for dashboardURL) above

    &(lt; td class = &(quot; Assets ProductCell &(quot; &(gt;

    <(a href="https://co-ds-ipm-a01:9704/analytics/res/OBIEE%20Guide.pdf" target="@{target}">Guide OBIEE &(lt; table &(gt;
    -

    Note: Code above please delete (wherever find you it, I put it as his poster not the code.)

    OBIEE Guide.pdf belongs under path (OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res)

    Restart the BI server

    Kind regards
    Srikanth

  • To count the number of while loops, you just attach a DBL indicator for the little that I framed in the while loop of the program?

    I followed just one example in a book as while loops and I want to just make sure that I haven't missed something simple. My program is attached

    Hi type'ssteel,

    I can't open your vi at the moment, but as you say, you can use the terminal i. For iterations, you must add 1 to it. I start with 0.

    Mike

  • How to stop the While loop in the Structure of the event with the same button?

    Hello

    I have a problem. I want to use a single control to activate an event in a structure of the event and the same control to end a while loop in this case.

    It is possible to use 2 controls to do this, but I need to be alone.

    Thank you

    You should NEVER place while loops inside the case of the event, and it is never necessary to do. Think about it: all you have to do is spin the code. You can easily use the outside while loop for everything. Simply place the code of the loop internal (without the inner loop) inside the case of delay and manipulate the time-out period between a pending finished and the infinite (-1), depending on the State of the Boolean value.

    A very simple example (LV 8.0)

  • Strange behavior of the WHILE loop

    Dear experts LabVIEW

    I would ask you to give me an explanation of the behavior of the very simple VI as an attachment. This VI contains a WHILE loop with three parameters, input and STEP. The table of RESULTS shows the calculated values. Considering the input parameters OF = 0 TO = 1 LEVEL = 0.1, then the RESULTS table contains the values 0, 0.1, 0.2,..., 0.9, 1. Considering the input settings ON = 1, TO = 2, STEP = 0.1, then RESULT table contains values 1, 1.1, 1.2,..., 1.8, 1.9. The question is, why the number 2 is missing?  (I also tried to use different types of data, but without success). Thanks for your thoughts.

    Juraj

    Because you compare floating point numbers.

    For example, 0.1 cannot be represented in exactly in binary, cela repetitive additions probably will not end in an exact integer later.

    Since the three entries, you can calculate the number of values exactly and use a loop FOR. Do not use the convoluted code...

    Why not just use ramp model?

Maybe you are looking for