While the loop executes only once?

I'm doing a LabVIEW program to control a power supply of Sorensen. The VI circled in red calls for supply of the voltage and current and then exports it. I want this to happen continuously, but it seems that it only updates once. Anyone know how to fix this?

Yes.  Your loop will not go again until an event occurs as the change in value on the value of the boolean values.  You might want to set a timeout on the structure of the event so that if no event occurs (I don't know if you have other manifestations), the case of delay of the event structure is running and the loop will iterate.

Tags: NI Software

Similar Questions

  • While the loop within a box Structure runs only once a target FPGA

    I have a card OR cRIO-9012 RIO for the HIL system. I have a target FPGA file when I use a While loop within a while loop I use the box Structure to check a real condition inside I have the function of activation of the ports and selecting the analog and digital ports. But for my code the code runs only once on repeted times that we have in the LabVIEW environment.

    I also need help to optimize the code. I've seen people using While loop timed in the FPGA target I don't use in both cases.

    I've attached my FPGA with the Version of LV2012 file.

    Waiting for your comments.

    Thank you and best regards,

    Ganesha Moorthy

    You have while loops inside the structure to deal with a constant of false cable to the stop condition. These loops will obviously never stop so browse your outside while loop (containing the case structure) can never.

    This has nothing to do with the FPGA target, the same thing will happen in the development environment.

  • While the loop does not stop until 2 more clicks

    I must say that I'm really not familiar with LV, but Im learning.

    So why is that after I clicked on low stop, I had to click my OK button twice, then my program stopped. Why can't it stop immediately?

    Furthermore, if I want to do some of the dice to table, which wire do I missed?

    Thank you!

    Hi RawtoLV,

    You have a while loop in loop a while. When you run the other while the loop stops when you press the stop button, the inner circle while loop always executes. Since your OK button use latch release, what I noticed is that when you pressed the OK button, it quickly into position from true to false, which never stopped during the operation of loop (maybe because of the wait). Can I ask what are you actually doing with the structure of sequence?

    I would suggest using the event structure in place (http://zone.ni.com/reference/en-XX/help/371361K-01/glang/event_structure/):

    Here are some information about the structure of the event:

    http://www.NI.com/white-paper/3331/en/

    http://www.YouTube.com/watch?v=8eO64fo3Pho

    Warm greetings,

    Lennard.C

  • My account is active, but Adobe PDF Export ask me to sign up again. The system worked only once on my PC, using the Vista operating system.

    My account is active, but Adobe PDF Export ask me to sign up again. The system worked only once on my PC, using the Vista operating system.

    You must connect prove you are currently subscribed.

  • Why my calculation at the time loop repeats only once?

    I have a series of simple calculations (multiply, divide, add, subtract) occurring in a while loop based on input data on the front panel of the user. The results are then connected to local variables that alter the parameters of a signal generator in one another while loop.

    The while containing the iteration of repetitions one calculation, unless I turn the button "Highlight execution" in which case it repeats until the loop is stopped as I expect. With the 'performance highlight' button and using a probe to check instead of the loop does not repeat itself.

    Another while loop with the signal generator allows to reproduce, but uses only the values which were concluded before the VI began to run.

    I need the VI to be recalculated each time a value on the front panel is changed and change the output of the generator signal accordingly.

    What Miss me?

    Because local variables are fixed on the LEDs that are in the position it after the end of the VI it runs correctly the first time and only executes a forward iteration to stop, all in a loop containing calculations, if you run the VI more than once. As long as the LEDS are in the off position when the VI is launched then everything works fine.

    Thanks for the advice, everyone.

  • SR400 while the loop does not work

    Hello

    I'm using LabVIEW for control SR400 through a GPIB card.

    I use SR400 to count the number of signal in a second, wait 0.05 s, then again count the signal once, wait 0.05 s once again, and so on.

    However, the while loop didn't iterate. When I started the program, it is only once.

    In execution of highlight mode, when an iteration is finished, he waited a long period starting the next. In normal mode, it doesn't have to iterate.

    Also when I clicked the stop button, it's been clicked. However when I wrote a very simple program, the stop button worked normally.

    In any case the button issue is not very important. I don't care that the program iterates forever or not. I just want to iterate.

    I searched the jury and had not could not any related problem.

    Is it better to attach my VI? The VI is in my computer lab.

    Thank you very much!

    This code just feels bad.

    (No real management mistakes, deep, stacked sequences FOR lines that are wired to iterate through only once, controls on the right and right to left, wiring weird code on average the last 10 items (Hint: means ptbypt with a length of 10 sample he would!).) If you want to use the wire of the error, the sequences would not even necessary)

    If the stop button does not reset, it means that the iteration of the loop does not terminate. It can fill in only if the two structures of the sequence ends.

    Have you tried running in execution, emphasizing fashion while looking at the diagram? Probably one of the communications is at a standstill. For example, the instrument sends really 6 bytes at the end? When you set the overall timeout and what is it?

  • Set the indicator value only once

    Hello

    I'm relatively new to LabVIEW, so I was wondering if you could give me some advice as how to accomplish a task.

    I am trying to store the timestamp at which a signal caused a block "Trigger and gate" trigger. I joined my current attempt to do this. The idea is essentially to wait the trigger signal to go out and put the component 't0' of it within an indicator. The problem is that after I store the t0, the while the iteration is complete. For the next iteration, new data comes from. Because the trigger is already triggered the previous iteration (it has no trigger stop), this new data t0 will then write to the indicator. But this isn't what I want. Is it possible to write data only to an indicator if it does not contain a value already?

    My plan is to take the blocks from the trigger and active in the end (see the picture I have attached) and create a Subvi from it. The data source will be outside the Subvi, so I can connect different sources during the tests. It means (as far as I know), that the Subvi is unclear it is integrated inside a loop, so I won't be able to use the features of a loop (ie: shift registers) to solve my problem.

    Do you have any suggestions as to what I should try?

    Thank you!

    PS: Has the computer on which the final code will run on LabVIEW 8.6

    kkrizka wrote:

    Is it possible to write data only to an indicator if it does not contain a value already?

    "" Place the indicator insde the true case of a structure of the case and the wire the "first call?" primitive to the terminal selector.

  • producer consumer loop run only once?

    Hello here

    In my VI, the loop of the producer seems to operate continuously, but the loop of consumer only run once.

    I did not use producer/consumer patterns before, could someone give me some ideas why this is happening?

    My code is attached.

    Thank you in advance.

    Faouzi

    It would be the wrong choice to use a structure of the event into the loop of the consumer.  As it is configured, you must generate a leave mouse or mouse event enter on the graph of waveform for the loop of consumer to complete its first iteration.

    Remove the structure of the event.  you don't need to update a chart.

  • While the loop records all the data

    Hello

    I have a LabView program containing two while loops. The first is used to increment a frequency on our machine and the second, which is located in the first, used to take a certain number of points of data to this frequency. After taking these data points, the frequency is supposed to rise again. This happens for a set number of times.

    The problem I have is that the data file as the data points in the second then the loop are supposed to be written in does not display do not all the data points in the program should have taken. For example, if we want the first loop increment of 10 times and the second to take 5 data points every time, we expect to see 50 data points in our files. But we see only 10. The watch file always only an amount of data points equal to the first loop iterations. If we cut our data at that time.

    Someone has an idea what could be our problem?


  • While the loop Tunnel help

    I have a variable inside a while loop, that I want to access outside the loop, that is, in my VI, I have two indicators, one inside the loop and the other outside the loop.  The variable is incremented on each iteration.  However, I am not able to see this iteration of the loop.  I see that the last value of the variable.  Is there anyway for me to access the variable inside the loop as it is running.  In regards to my VI, is it possible for my indicator "inside" correspond to the indicator 'outside '?  Any help with this will be appreciated.  Thank you.

    Kind regards

    David

    Yes.  You must use a local variable of the 'Inside' indicator that writes to the indicator 'outside '.

    There are other ways to do so, such as pass the data via a queue or a notifier.

    The concepts of tunnels, flow of data, and that data is not available to that structure, it is finished, is all notions of LabVIEW.

  • Using an NDS for an unfavorable SQL executed only once in a proceudure

    Hello
    We are using Oracle 11.1.0.7.0.

    I go through the code written by someone else. In this package they use NDS for each SQL call if it is called several times, or only once. Is it a good thing?

    I thought that NDS has been reserved for SQL statements that over and over again in a possible procedure called variant "WHERE clause" variables and so on...

    Is there AN advantage to using NDS for SQL queries called only once in a procedure?

    Thank you

    There is no benefit unless you want to convert PL/SQL SQL * more (analyze once, run once)
    There are procedures to ensure: analysis at compile time, run many times.
    The code turns in his own foot.

    Or the developer must have got hold of the unpublished book one chapter of Tom Kyte "how to write impassable applications."

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • Producing a XY chart in a While loop that adds a new point XY to the curve from each while the loop iteration

    I would like to plot data by using the XY graph as a Visual display. I have a While loop that creates a new point X and Y during each iteration. I need the XY graph to be in the While loop, because once the order to stop has been pressed the sis loop finished and the final graph to be displayed. The problem is that after each iteration, the XY graph display clears and watch point, compared to add the new point to the previous by a line connecting the two points. It works perfectly if I move the XY graph out of the While loop, but it only shows the XY graph at the end of the While loop. I would like to visually see the XY graph updated during the execution of the While loop. Any help would be much appreciated.

    Thank you

    You can add a data both point to a chart to a chart, you must pass the entire data group.  I would use a couple of shift registers in your loop.

  • OR USB-6009 daq sample following loss, while the loop iteration

    Hello

    I am trying to acquire and display data measured from a DAQ NI USB-6009 material using Labview 2015. I am using the wizard daq defined for the differential mode and n samples with the sample rate and the total number of samples registration by the user. My problem is that when the specified amount of samples is acquired and the while loop continues to the next iteration, some samples are removed (I know because I tested it acquire a wave of fishing and there is a noticeable artifact in the signal at times where the while loops - I downloaded a file showing this artifact in a wave of fishing that was recorded with a sample rate of 1000 Hz 500 samples of recording each) iteration which means that the artifact occurs every half second).

    I think that this can be corrected by simply taking off the while loop daq assistant and specifying the number of samples you want the entire test to acquire. However, I would like to see the signal in a graph as its achievements and the daq can acquire data indefinitely until the user presses the stop which, to my knowledge, it would take a while looping. I downloaded my vi for reference, and any help would be greatly appreciated!

    Set your Acqisition Mode on "samples continues."

    N samples: reads the desired number of samples and stops.  Will read once again what DAQ Assistant is represented.  In other words, that there is a gap of time between readings.

    Continuous samples: data acquisition just constantly reads the data.  The DAQ Assistant just gets the number of requested samples and data acquisition keeps just read and store it in the buffer.

  • While the loop does not stop within a structure of business

    Hi all

    I have a business structure that works an engine to a certain PWM when my metal detector does not give an amount greater than the threshold that is ' false '. The motor is controlled by a PI controller so a while loop is used inside the false state. When my metal detector exceeds the threshold I want the "true state" to perform but which does not occur. the entire program is a while loop which aims essentially to maintain the operation of the metal detector. How can I make the State of the switch works.

    Once you get the code is trapped inside the inside while loop, it will never be a Boolean wire change because change is outside. All you need is a loop that contains a structure of housing. Run your program with execution highlighting to get a better understanding of the flow of data.

  • While the loop and the passage of a string to a Subvi problem

    Hello world

    My problem is this: I have a MainVI and a Subvi, the MainVI is running a while loop in which the Subvi is called and goes to 2 parameters, 1 bool and 1 chain. the problem is, inside the Subvi the chain should be placed in a text box so that the user can see before pressing ok.

    Background of the present: normally "Get_DMC.vi" opens with just the text box and a button cancel, means to scan 10 characters of big entry. It still works fine. If the user selects the DMC model in the MainVI, it should only copy the dummy DMC of the MainVI (the above string) to the show, and Subvi in the text box as well as allow another button 'OK' for the opportunity to control themselves (Advanced) users.

    The Subvi is reloaded on every call because he'd be stuck in the while loop, I had not done that. Not quite sure why, if someone has an answer to that aswell please tell me.

    Many thanks in advance,

    Kind regards

    Pedro

    It might be that the writing of the DMC to "Value DMC" model that happens before the "reset DMC by default".  Try the error off DMC Reint default wiring to the value DMC error to force the order of execution

    Ken

Maybe you are looking for