while loop

Hi all

I have a case structure in a while loop and the loop while is another case structure 'TRUE' case. the internal structure of the housing end if all cases the while loop was arrested and now I 'FALSE' case of CASE of the EXTERNAL STRUCTURE. Now, I was able to reset the indicators/controls in the while loop to their default values. Please suggest me your ideas. Thanks in advance.

In false outer case, you can use reset to default property node, for example

/Y

Tags: NI Software

Similar Questions

  • How to increase code efficiency in a while loop (using PXI5105 for sampling outside signal digitalizer)

    Theoretically, we want the PXI-5105 (digitizer) have 302 record with each record has a 1260 sample (the save operation is inside a while loop) in approximately 30ms, however we have found that for each period (30ms), the PXI5105 only perform about 10 records. It is so wired. I wonder if the operations inside the while loop consume more time (for example 3MS), so that he cannot have 302 records even the PXI-5105 have 60 M/s speed of sampling. Is it true, you can find my labview code and if possible can you give me some suggestion in the most short time of operation of the loop.

    Please find attached labview code.

    Hi g_l_g_s,

    The digitizer PXI-5105 acquires data at the speed that you specify and stores the data in its memory embedded (up to 512 MB). The data is then sent to your computer when the Multi Fetch Cluster.vi is called. In VI that you posted, you are only fetch record during each while the loop iteration. If you want to retrieve 302 records you will need to specify 302 files in the horizontal Timing.vi to configure. For more information about scanners, you might find the DevZone, hereuseful.

    To determine the amount of time it takes for each while the loop iteration, you can consider using the structure of code in the example comparison community calendar, which is located here.

  • structure of the event + while loop

    Hello, I am trying to understand how to unite two while loops in attached VI for half a day

    The first loop creates a state machine solid which reacts on each key and runs one of the structure cases. (that part works very well)

    The second loop, always generates the random number, but it stops the generation during the time where one of the structure cases events are executed. (this is the part ticky)

    Any suggestions?

    If you want your random number to stop so that the user triggered events are running, you should be able to simplify your design a lot.

    It can be done with a loop using the case of timeout.

  • Retaining the last value without a while loop

    Hello

    I'm using LabVIEW 2013. My VI is attached. I'll send in a 'Curr. Random random numbers TestPlan Row"time. I'm eager to keep his last number, whenever this VI is not called and then reset the value to its new value whenever the VI is called again and a new number has been sent. Also attached is a screenshot at the VI.

    Please note that I can't use a WHILE loop, so it must keep its value in a different way...

    Thanks in advance for any help!

    SM

    Maybe a feedback node?

  • convert loop timed to normal while loop

    How convert a while loop time normal while loop with exact same properties and performance?

    I have donot need to worry about the exact date. But it takes the timed loop time will be run similar to loop.

    And also, is there any issue encountered when we use Timed loop? problems such as that crashing exe?

    Hello

    1 kHz is the used base clock. Then, you decide to use 10 as period (dt) which is 10 ms.

    The clock is selectable in real-time systems, you can use the 1 MHz clock, giving resolution µs

    But for your needs, using 1 kHz clock with dt = 10 and using a ms of waiting with 10 connected to it is exactly the same.

  • Functions don't run when a loop running in a while loop

    Hi all

    I have a loop within a while loop. All main functions are running in this while loop. However, once the for loop executes other functions in the while loop don't work anymore until the loop for stop execution. Could someone help me with this problem? Thank you.

    Kind regards

    Nicky

    Hi Nicky,

    Ah, well I don't have much suggestions but maybe you can try with a conditional for the loop. I've attached an example. You can go through it. I don't know if it's a good idea to use this way, but again, if this can help, so I'm glad that.

    To create a condtional for loop, place a normal for loop on the block diagram, right-click and select terminal condtional.

    Kind regards

    Amine31

    (Give congratulations to good answers and Mark as a Solution If your problem is resolved)

  • CPU utilization while loop

    Manual LabVIEW declare a while loop must always contain a "wait for ms" vi to unlock the task for this period.

    However, I thought that it the same fate if I use the same timeout ms for the timeout of a structure event inside the while loop

    and omit the "wait for ms" vi.

    Unfortunately the time-out of the structure of the event does not seem to unlock the task so that the façade reacts very inert in this case, even if it reacts
    prompt in either case.

    Does anyone have an explanation more in depth of this behavior?


  • What is READ the array returned by the DAQmx meter? How can I know the two functions DAQmx READ data stream in the same WHILE loop?

    I have a question about the order of execution.  In the WHILE loop, I have two things to measure, period and tension using the DAQmx READ functions for voltage and the meter.  In the end, I want to collect these data as points almost simultaneously as possible, as a pair and then send them together to another piece of code (not shown here) which them will result in some sort of command for an engine.  It would be run, and then I want to perceive the tension and the period at a time later and do the same thing.

    (1.) I'm a little confused on what the meter of the READ function is back because it's a table.  What is a picture of?  I thought that it was up to the value of the individual periods between rising edges.  The output of the counter 1 DBL d's a table. How many elements in this table, and what determines the size of this table?  Are the elements of the array the individual delays between the edges?  How many values are stored in the array by executing?   We take the AVERAGE of the last 15 items, but do not know if we are throwing some of the data or what.  How to understand the composition of this painting?  How can I change the composition of this painting?  Is it possible to measure only one period at a time, for example the time between TWO edges?

    2.) Will this WHILE loop execute as it gathers tension and a "period table ' (remains to be understood by me) by TIME running in a loop?  In particular, we want that the value of the tension associated with the value of the AVERAGE of the period "array", so we can use two data items to create orders of next control every time that the two values are reported.  The structure for the delivery of vi will be attached data in pairs like this?  I understand that one of the READING functions run not before the other function of READING in the WHILE loop.  I want that the period "means" and "strain (Volt) collected at the same pace. This vi will he?

    Thank you

    Dave

    Hi David,

    I suggest including the DAQmx Start Task function. If it does not start before the loop, it starts the loop and work very well, but it is not as fast and efficient. In the model of task status, task wiill go to run the checked each iteration of the loop and then back the time checked running when it restarts.

    The status of the task model: http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/taskstatemodel/

    Kind regards

    Jason D

    Technical sales engineer

    National Instruments

  • While loop, wait for the function and the stop button!

    Hello

    I have a while loop and a stop button. Inside my While loop - I have a 'Wait (x ms)' function. If I press the stop button, it does not block the program immediately, he expects ms x then stops the program. How can I get rid of this?

    Thanks in advance for the help!


  • A result of sending the data to a while loop through another loop of TCP communication

    Hi all

    I have 2 screws

    1 matching model (using the method of Grab) which is put inside a while loop. This VI works correctly and returns a string in a specific format (position and the angle of the object).

    2 TCP server who always listens to a specific port, if it receives a correct command string, it sends the string above VI - 1 (position and angle).

    The two 2 screws works if they are in separate VI. But I want to combine them into 1 single VI and I get the problem: Pattern matching doesn't work anymore (the video has only first frame then stops).

    I tried to put the two while loop in parallel or put the TCP while loop inside while loop Pattern Matching. Nothing has worked.

    Pls see my attached VI and the TCP module.

    What is the solution for requirement?

    Thank you all!

    What I would do, is be your two screws at the same time.  Given that you do not send the last result, store the result in a global variable.  Your comparison models written VI the global variable of the results of each iteration of the loop and the TCP bed module global variable results when it receives the right to order and then send it.

  • How to have a while loop inside a structure of matter?

    Hi all

    I would like to know how to control a while loop by using the structure of the case? I would like the person to check if the object has is in its original position or not.

    If this is the case, go...

    The object must then do its job, as mentioned in the while loop... as up and down 10blocks...

    Later, when she returns to its original position, the entire process must stop...

    I checked the forums on this http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loops-inside-a-case-structure/m-p/591259

    It is the closest, I can have... but can someone tell me how to program for this? How logic should be?


  • Timeout on while loop

    Hello

    I need to insert a time-out on a while loop to exit this loop in the case of the device is not able to answer.

    How can I do?

    Best regards

    Create a local Variable:

    Locals.StartTime

    In a stage of expression before the while loop set Locals.StartTime = Seconds()

    As part of the condition of the loop While use: (Seconds() - Locals.StartTime)<>

    where X is your timeout in seconds.

    Hope this helps,

  • While loop stops unexpectedly

    Hello world

    I have a problem with while loops.

    Im trying to write a program that allows me to control the temperature of a hot plate, using as a starting point one of the examples in LabVIEW (basic series writing and reading). So basically the program sends an order asking the real temperature of the heating plate and it then reads a response with the State, then the user writes a temperature (the sub - VI creates the command that is sent to the cooking plate), then he reads a confirmation response. the while loop is to monitor the temperature and change it if necessary

    Sometimes it works for about 30 seconds and sometimes for a few minutes, and then everything stops playback, I don't get the error messages, it stops just a response.

    The hot plate is a pro H550 MS7 and im using a USB to RS232 converter

    PD, I'm pretty new using labVIEW, sorry for my bad English.

    Greetings and thanks for the help

    Bob_Schor wrote:

    Found the manual.  Here is a summary (edition - in fact, it is essentially all of the manual, just condensed and without 'images'):

    • The statement format: prefix, Instruction, data frame, Checksum
    • Command: Prefix is 0xFE
    • Answer: The prefix is 0xFD
    • Add at least 50 msec between pairs of bytes
    • Data frame, send high and low bytes
    • Checksum = sum of the instructions, the frame data, but not prefix
    • Commands and responses seem to be mainly sequences of 6 bytes

    OK, this helps a lot.

    The first issue with the OP code: turn off the stop character.  The protocol uses binary communication protocols.  The stop character is only useful for communications ASCII protocols.  Nor if he was being a 0x0A in data, VISA Read stop reading right there because it's the stop character and it is enabled by default.

    Second, always do not have need of the bytes to the Port.  You know what you send and you know what should be the answer.  Therefore, suffice to say the VISA of reading to read the required number of bytes.  If your delay is long enough, you do also not waiting for him by saying the VISA must read the number of bytes to read.

  • problems of operation of two while loops in a VI

    Hi forum,

    I am developing a project for the acquisition of data continuously for two types of signals (voltage and temperature), each consisting of 20 channels. The sampling frequency is different so I used two call loops of different period to take account of the sampling frequency. It is within the VI that is deployed to the target device. On the host VI, I have two loops while put each containing a VI write_to_measurement express so I can connect the data to two different filepaths. However when I run the program, that a signal is registered correctly while the signal remains would have only one row of data. Looks like one of the while loop is only on the iteration while the other is running smoothly. This is an example of the famine of memory? How can I solve this problem! Any help greatly appreciated! Thank you!

    Vincent

    What asked Fan Ravens is why do you use static variable to stop the loop?  You do something remotely?  Simply use a local variable in your second while loop to stop him.  You need to change the action of the button stop, but that would be the way to do it.  Stop buttons are perfect for debugging and development, but generally I will use one other mechanism to stop the program runs outside the environment of LV.

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

  • sampled while loop

    I use a NI 9401 mounted NOR cDAQ-9174 with two attached digital fiber sensors. When something breaks the laser, it sends a signal to the Commission. I use this experimental code, play with a few things to try and do so 'see' one of each edge and then stop.

    I'm trying to get a while loop at the end when one edge of each series is collected. Currently it ends on time to "timeout". Any ideas?

    Neil_Helsel wrote:

    I'm sorry I meant right now, I put at a time and want to stop when a value is set to true for the two DigitalIn_1 of DigitalIn_0 &.

    Sounds like a simple AND when you look at the two channels.

Maybe you are looking for

  • Add ringtones to Messages on my iMac

    Is it possible to add text tones to the list of Messages on the iMac as you can do on your mobile devices?

  • Firefox will work on a Warp ZTE?

    Just wondering because I think of her being of Boost Mobile.

  • Issue of recovery with Satellite L755 - 12G - blue screen at startup

    Hello, my name is Johann and I'm from the Germany (sorry for my bad English, I hope you understand) I have a TOSHIBA Type: * Satellite L755 - 12 G *.REF.: * PSK2YE-03E015GRSerial number: * 7B144840W *. My problem is that I have a blue screen before I

  • 2515

    Hello I bought a printer HP 2515 here at the Belize and need to order ink.  US lists do not show the same ink (662XL) I've been sold here at the Belize.  Is there an another ink cartridge that works (for example, 61XL...) Thank you

  • Non-genuine Windows

    I ran a Deep Scan of Norton and now I have no more a genuine copy of Windows 7, how do I get it back? It may still be some parts of the active threat on my computer. As I have bad to shoot the question my computer stops. In most cases, the device wil