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.

Tags: NI Software

Similar Questions

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

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

  • the loop does not stop until an exact number

    When I get the data via the shared variable table, the moment where I click on the 'Ok' button it opens 25 sheet of my workbook

    what I want, it's if my table has just 5 full rows of data, the moment I click 'Ok', only 5 sheet of my workbook opens.

    I think it's indexing related issue.if could someone help

    Thank you


  • In the attached VI why looping force the type of data while the other does not?

    In the attached VI why looping force the type of data while the other does not?

    I'm guessing that you have created the Enum on the front panel.  If you right click and create an indicator, it corresponds to the type and be an enum.  LabVIEW represents enums as U16, but because the types are not the same (for example, your enum has 3 values, but a U16's 65 536 values), LabVIEW automatically converts value (or converts) the smallest representation (enum) in the largest value (U16).

  • After updating my iPhone 6 (9.3.4) the WiFi signal becomes very low! I did everything, but the problem does not stop! I don't a not update my other devices & their very good WiFi signals. Please help me solve this terrible problem...

    After updating my iPhone 6 (9.3.4) the WiFi signal becomes very low! I did everything, but the problem does not stop! I don't a not update my other devices & their very good WiFi signals. Please help me solve this terrible problem...

    Here's a tip for the user on the problems of Wi - Fi. Suggest from the top and bottom. Maybe one of them will help you.

    (1) restart you device.

    (2) resetting the network settings: settings > general > reset > reset network settings. Join the network again.

    (3) reboot router/Modem: unplug power for 2 minutes and reconnect. Update the Firmware on the router (support Web site of the manufacturer for a new FW check). Also try different bands (2.4 GHz and 5 GHz) and different bandwidths (recommended for 2.4 to 20 MHz bandwidth). Channels 1, 6 or 11 are recommended for 2.4 band.

    (4) change of Google DNS: settings > Wi - Fi > click the network, delete all the numbers under DNS and enter 8.8.8.8 or otherwise 8.8.4.4

    (5) disable the prioritization of device on the router if this feature is available. Also turn off all apps to VPN and retest the Wi - Fi.

    (6) determine if other wireless network devices work well (other iOS devices, Mac, PC).

    (7) try the device on another network, i.e., neighbors, the public coffee house, etc.

    (8) backup and restore the device using iTunes. Try to restore as New first and test it. If ok try to restore the backup (the backup may be corrupted).

    https://support.Apple.com/en-us/HT201252

    (9) go to the Apple store for the evaluation of the material. The Wi - Fi chip or the antenna could be faulty.

    Council: https://discussions.apple.com/docs/DOC-9892

  • Firefox seems to have recently developed seemingly random usually do not remember bookmarks, particularly when the pc does not stop correctly. Thank you

    Firefox seems to have recently developed seemingly random usually do not remember bookmarks, particularly when the pc does not stop correctly. Thank you

    If Firefox detects that the places.sqlite database is corrupted then Firefox can create a new database file and import bookmarks from a JSON backup that does not contain the most recent bookmarks (a new JSON backup is created when you run Firefox for the first time on a day), then you may lose the bookmarks in such a case.

    You can check for problems with the database places.sqlite file in the Firefox profile folder.

  • Tecra M3-264: the fan does not stop

    Hello

    I have a labtop Toshiba Tecra M3 264, it's wonderful BUT,.
    The fan does not stop and this sound is a bit noisy in comparison with the other all I have.

    Is this normal in this model or should I take it to the service?

    Hello

    It is normal activity on new laptops cooling fan is very noticeable on older models. I recommend you to check what happen if you change the settings of cooling method in power management.

    By the way: allow the unit to take a breath. Make sure that the ventilation openings are free and that there is nothing that can stop the flow of air. If the vents are dirty and full of dust, it can also be responsible for cooling fans runs often and with a higher speed.

    Good bye

  • LabVIEW 2012 while the structure of the event does not stop

    I am LabVIEW 2012.

    An example of a while loop with the structure of the event inside can not be stopped with the stop key, Boolean.  Something wrong?

    Please see the attached VI.

    Thank you.

    Yes, something is wrong. You must add one for the event in order to detect a change in value on the stop button.

    The thing is now your structure for the event rest waiting for one of the event which she handles and ight now, it handles the "close panel" event, the 'timeout' event is too manipulated, but since you do not have anything related to the terminal of timeout (top left of the structure of the event) the timeout is - 1. So, when you run the VI the while loop is stuck in the first iteration and is waiting for a sign nearby, the stop button will only take into account after that same structure intercepts an event; I think it's because LabVIEW will execute the code related to the Terminal stop of the while until after the rest of the code that he has completed execution of the loop.

    Hope this helps

  • pass the loop does not work in a MIAW

    Hello

    Try to open a movie in a window (MIAW) with this code:

      wndAbout = window().new("about")
      wndAbout.open()
    

    The film about.dir has a few simple tricks, a label on the first image, and a script "go loop" at frame 10 on channel script.

    The window opens and about fine display, but the problem is that the loop go does not work. The playhead continues. I also tried with a go the frame without success. The channel of script is activated, I checked with an alert() call.

    If I try the code above in a new movie with only one button, it works.

    Tried to remove all of the original film but the script and the button, it doesn't always.

    Someone has an idea of what could be the problem?

    Thank you.

    Edit:

    Windows 7 64B, Director 11.5.

    The problem only occurs with the projector (heel). In design mode, there is no problem.

    After hours of tests, I found the solution.

    The problem was buggy text by hyperlinks members in previous versions of 11.5.

    First solution was to remove the members of text.

    Then I've upgraded all xtras (external to the latest version (11.5.9r629) projection) and all problems where gone.

  • Embed the video does not stop when moving to the next slide...

    Hello

    I have a swf file that has 10 slides.

    2 blades have video integrated inside. His works well when I look at continlusly and better bandwidth, but when I tried on lower bandwidth then the video takes time to appear. On average while when clicked on the next slide to ignore the video, overlapping sound happens.

    So what are the best way to stop the previous video of the slide with voice so overcome that problem.

    Please let me know.

    Thank you

    Jonathan morsa

    Have you tried using Insert > FLV or F4V option to see if it works differently to you regarding audio turn off when you switch to the next slide in the file?

    Insofar as the loading time of your videos, try adjusting your project to a higher percentage preloader, for example 50% or more.  However, in general, I would say that you don't place video files even moderately heavy on the slides to the beginning of your project.

  • indicators inside the loop does not display a value in hand VI

    I have little indicators one table and another is the display image to the inside OF the loop in the sub vi (see attachment of files). If I'm running under vi individually, it works fine, but when I call these indicators in my main vi It shows something, and these indicators appear to be empty or blank, although at the same time the sub vi indicates the values of these indicators perfectly.

    Can any body guide me why I can't see these indicators correctly in vi main even if I can see them in the sub vi correctly.

    Control references that you want to pass to your VI are the images and output array references If you want to update.

    Then, in your Subvi, write in the nodes property of these references If you want to see the updates on your hand VI.

    EDIT: Although this method can you work around your immediate problem, I don't think it's something you really want to do often. There is probably a better way of this option to get the results desired real architect.

  • Microsoft windows xp home edition - stuck in the loop does not restart

    Has conducted the check by wear hard to watch for the F2 key issues all passed.
    Tried to restart with powerDVD application and drivers and utilities DVD.  no answer

    A problem has been detected and windows has shut down to prevent damage to your computer.  A thread has attempted to relase a resource, that he was not owner.
    Stop error message
    Let you not restart in safe mode

    Mechanical information"* STOP: 0x000000E3 (0x80558E0, 0x00000000, 0x00000002

    attempted to restore the last well-known Confiuration, debug mode and restart

    facekitty,
    You can read this article.  It's kind of a long thread, but she has a few answers.  Let us know if they help. Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Bluetooth remains plugged in car while the radio does not work

    When I'm in my car (after IOS10 upgrade on my 6s), Bluetooth my car (UConnect) stayed on and wouldn't let my radio not play until I'm gone in my phone and unplugged my Bluetooth. Any ideas?  I like to use the hands-free, but it would be a hassle of having to connect bluetooth whenever I answer the phone

    The same problem.

Maybe you are looking for