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.

Tags: NI Software

Similar Questions

  • 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

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

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

  • I'm stuck on a sign without end through the loop. Help!

    I'm stuck in an Adobe Indesign CC sign in infinite loop. Help!

    Adobe Creative Cloud connection errors

  • While the loop helps... I think so

    All,

    I have a fairly simple VI who catches the units of measure (send an 'A') of a MARK-10 test bench and MARK-10 dynamometer. I am struggling with how, and where, I should place my While loop. I want VI to do this is if the units of measure are not correct, change the units (send a 'U') and try again the comparison.

    Thanks in advance.

    Like this?

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

  • RandomGen elements, case structure nothing if it's false, while the loop passes iterations, can not get the values in table outside the structure of the case

    Hello!

    I tried to build a trigger that triggers a true value each 1000 milliseconds (from the first real);

    which real command structure box to a value of the randomNrGen of the sample and place it in a table.

    but I would like to USE this table and I can't do this beacause I can not get out of the structure of the case.

    AND:

    the while loop ignores samples; If you run the vi and look at the speed at which the table fills, ypu notice it is not periodic: the first few items are inserted at 1 second interval, but then it jumps one;

    would it be because of the wait time 1ms?

    1. How can I create a structure that does this:

    If set to True, it samples a value from Genesis at random and places it in the table

    OTHERWISE, it does NOTHING, without zeros sent to the table just waiting for the next true and only the values sampled at True remain in the table?

    2. How can I stop it pop samples (multiples of 1000 in my case)?

    In conclusion: I need to be able to take samples on the sample generator and store them in an array of 3d in a zig - zag (1.jpg) way, but able to think about it, we need to go beyond these two questions.

    Please ignore the meter.

    Please help me!

    TibiG wrote:

    Thanks, Crossrulz!

    This did not omit all values and it works fine.

    Is it possible to get information in a case without making use of the large loop?

    My program will become very complex (I need to synchronize a magnetometer and a stepper motor to make a 3d map of the magnetic field of the magnet) and I want to do everything as simple as possible.

    If there is a way to get information about a case structure, other tnan using registers with shift on the big loop, and you know it, please show me.

    Thank you!

    You could also use a Feedback node, just keep it out of the structure of the case.

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

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

  • iMac 2012 - sierra installation failed, caught in the loop, please help

    Hey everybody.

    That's what I have:

    iMac 27 "mid-2011. He had on El Capitan.

    This iMac contains two hard drives and drive superdrive.

    A disc is 256 GB SSD and the other a regular 2 TB internal HARD drive.

    As SSD is faster that I keep my OS X and programs on this SSD drive, all the other stuff like photos, music, documents, are put on the classic 2 TB HDD.

    This is what happened:

    Attempt of I:

    Everything was going well until the installer has discovered that the SSD did not have a sufficient space to install. I quit the installer, the option pop up, I called "Startup Volume" has chosen my SSD and restarted it. Has been 2 attempts, if I'm not wrong, but worked. I killed and moved the files, I think now would be enough disk space on my SSD tried the Sierra ad install again.

    --> Attempt II:

    This time Sierra Installer arrived at the stage language choose where he welcomed and asked to choose the language. The next screen it tells me once again: not enough space, the bigger internal drive offers enough, but I don't want that. So, I tried the same exit to leave the program and launch then boot Volume installation...

    ... that in trouble:

    My SSD drive now no longer appears in this window of the boot Volume.

    When you try to access the boot Volume it will skip in the app language choose, sometimes shows this window choice animation multilingual, sometimes simply stays gray but will show when moving the mouse upwards arrow to the top of the screen, choose language drops in when I try to open the boot Volume after leaving the installation program. In addition, the language choice (can not be exited by cmd Q is said by the way) seems to open before the boot app Volume and the boot volume app does not appear my drive more-> Catastropheeeeee!

    Also option to restart regular off the menu above will not help. After about half to the top of the boot of the SIERRA Installer keeps new hindsight. No chance to reboot to my previous El Capitan based OSX. I am bound to this loop.

    Is turned off, wait and switch back to does not help, even in a loop.

    Then I tried also open disk utility, I also have an external time machine backup drive connected. Tried this way to restore my SSD of time machine, which fails on every attempt.

    I'm totally caught up.

    Help, please!

    just in case.

    I did the job.

    Launched my iMac in disc mode on my mac pro book. A few items to the disc hard iMac deleted, then restarted, macos sierra resumed and concluded correctly, in other words: all and working again!

    Even a message to Apple to look bad when insufficient disk space is detected, see my first post, thanks.

    Best regards

    Max

  • While the loop stops before the countdown ended

    Hello everyone

    I have a problem with this scenario:

    What I want is that I can enter a series of tables and then he will choose the first line being the first cycle of number is 0, the second 1 and so on. I want this loop to continue until I left my empty tables. The problem is when I test, it stops immediately, but when I select all seems to work fine.

    This is a program I am writing so he can control some pumps - I put in a number and weight, and then it converts it to a % of setpoint that will trigger the pump. When the countdown is finished then it should start the dosage with the following weight and time.

    I'm relatively new to labVIEW. I tried to look around, but I have not found who could help me, I'm counting on you!

    Thank you very much

    Theis


  • While the loop is in need of a countdown

    Hi all

    I use aTeststand/Labview/Vision system to watch different channels on an LCD screen. TestStand while loops but sometimes the expected text text LCD monitor is not captured and the 'little' will make a loop forever because the product of the screen shutsoff after x seconds. Is there a feature in Teststand where I can init a timer with a seconds value and start running? So if the LCD screen timesout after a few seconds the timer reaches zero and the while loop will ideally end move to the next step (or closing sequence would be ok). While running the timer in parallel with the acquisition of the vision.

    I could do in Labview but I have a lot of while loops that need this feature so much prefer a solution Teststand. LabVIEW would be at least 2 additional steps by while loop. An example would be greatly appreciated.

    I tried to download files from this site xyz.seq, but they save as html format am I doing wrong?

    Thank you, Chris.

    Try this, it can do what you want.

  • While the loop does not stop when the two values are equal using equal to comparitor

    Hello world

    I have a really, really strange bug. I have a LabVIEW VI that change a chain on a power supply. I have a start and a stop voltage and use a while loop to increment the device. For example if I want to scan from 1, 2V to 2.2 V in 0.2 V incremements, the program will end when "The current tension" = "stop the tension." And it works very well!

    However, when I start - 3 V and want to stop to say-0.8 (new in 0.2 V incremements) the program does not stop when "The current tension" = "stop the tension." I checked with the probe close to what should be the end of the race and - 0.8 V goes both of the entries ' equal to ' comaprison operator, but that his can't trigger a real result.

    It's very strange for me. Espeically as if I'm going - 0.8 V to-2 V but decrement of-0.2 V, the program stops correctly!

    I am very confused!

    See you soon!

    Search on: comparison of floating-point numbers

    The second thread is particularly relevant. This discussion was 2009, but you can find that the same "bug" being reported to enter the end of the 1980s.

    Mike...

Maybe you are looking for