Work around a dialogue button in While loop

I had a crash in VI where the user Alt + right, click on the control and a dialog a button triggers to display the description of the control.  The only bad thing is, the dialog a button inside the decline of the stops of the whole program up to what the user clicks OK in the dialog box.  A way around this problem?  It blocks my program if the user forgets to click OK after a too long.  Any help is appreciated.

Nathan_S wrote:

Can't seem to understand why, in its own loop, it freezes the whole program... a little weird.  Take a look at the code if you wish.

I'm going to guess that this is related to the root 'loop' - there are a few notes here: http://labviewwiki.org/Lessons_learned_from_plugins. Some operations, including the display of dialogs of Windows and menus, go through a section of code that cannot (or at least is not) multithreaded. Any other operation that must also go through this same section of the code crashes until the dialog or menu box is dismissed.

APOK solution can work, but this dialog VI should always be placed in its own loop, of course - in the case otherwise the dialogue always block the loop in which it is placed (other parallel functions will work, but the loop will not be an iteration) until the dialog box is dismissed.

Tags: NI Software

Similar Questions

  • Can not on the button while loop

    Hi all... hoping to get a few design tips as I am very, very new to LabVIEW. I got a project that someone else had started and I've encountered a problem that I don't know how to solve.

    I'm using LabVIEW version 8.0.1 and I think my problem has to do with the help of DAQmx in a while loop. In "Working.vi" (including the Sub - VI 'Temp data to CSV.vi'), I copied - and stuck the while loop in a vacuum VI for testing. In this VI, with nothing else, it works - slowly, but it works.

    In the real VI, I can see the data of temperature updated every 4 seconds, so I know that the program is not frozen or something like that. However, by pressing the button "Return to main Menu" does nothing - the image of the button does not show that it is to be depressed, regardless of how many times you click or click and hold the button. I've attached a screenshot of the while loop inside the real VI; I prefer not to fix the real VI (especially because it contains references to many of the Subvi, and it is not currently contained within a LAW degree).

    I'm this coding the wrong way? I have the feeling that it might be caused by my settings DAQmx (continuous samples, 2 samples to read, 250 mHz). The very low rate would be the cause? Is there a better way to have readings of temperature taken every 4 seconds (approximately)?

    You have your case of event the value "lock the front panel" until full?  If so, then no other presses the button will be recognized until the ongoing case event complete.

    It is never a good idea to have a code in an event business that takes a long time to run.  It will make your UI seems to lag or even functional.  Any time I see someone with a while loop inside a case of the event, I'm afraid.  (By the way, I am also concerned all nodes comments hovering over the structure of your event?  What are doing?  Why some operate on the default data?)

    In general, events should take is no longer running then what ordinary person could be expected until they feel like the user interface is delayed.  Perhaps at the top of 1-2 seconds.  You should look at a model of design of producer/consumer with events.  The structure of your event should respond to UI events, then pass orders by a queue path to the part of your program that does the real work.

  • 2 while loops can work at the same time?

    I have two while loops in my program; We can read the data and the other does nothing until I hit stop on the first. I want the first and the second to run out of the time constraint, I have for it when I hit the Start button to always run. I use a DAQ and transfer data from one to another while loop. See the attached file.

    Main issues:

    How to tie the Start button?

    How to get the second loop to work with the first?

    Thank you

    Your problem is that the loops are dependent on the data.  If you want to run two loops at the same time, they cannot have wires linking one to the other.  Focus on the architecture of producer/consumer .  It uses queues to send data of a loop to the other.

  • Having trouble getting Boolean button While loop is not updated

    Hello world

    I'm trying to understand how continuous image capture works. So, I tried to implement a simple while loop with a button "continuous Capture". It seems that when the "Continuous Capture" button becomes false, the while loop could not update and stop. No idea how to solve this problem? Thanks in advance.

    Kind regards

    Han Yen

    Move Boolean Capture next to the loop of inter 2.

  • Is there a work around to show the Site identity button when the integration with facebook like/send etc. It disappears when it comes to the page, it's because of the iframe can be done if anything.

    Is there a work around to show the Site identity button when the integration with facebook like/send etc. It disappears when it comes to the page, it's because of the iframe

    What can be done if anything.

    Pages that use "mixed content" (parts of the use of the HTTP page and some use HTTPS) are not secure against tampering, they will not display the site identity button. To resolve this problem, make sure that external resources you are incorporation are available over HTTPS and you use HTTPS to nest them.

    For example, to iframe widgets like the Facebook 'Like' buttons, make sure that your iframe use src = "https://192.168.1.20 /...". »

    See also discussion here: http://stackoverflow.com/questions/3587021/facebook-like-button-breaks-https-ssl

  • Satellite P50-B-103 - light around the power button / stop does not work

    I bought this laptop a few days ago, and early on, I noticed that the light around my power button does not work.

    so now I'm in dillema it back or not?

    Everything works well, but because of the price, I expected to work correctly.

    And what is perhaps the reason for this?

    TNX

    As far as I know that the power button or to be more precise, the margin around the power button should be lit / lighted.

    In my opinion its not serious problem but if there s a problem for you and you are not satisfied with that, I recommend you contact the dealer to replace the unit.

    Greetings

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


  • Subvi with while loop + event structure works is not in multi tab VI

    Hi all

    I'm developing an interface for the control of a prober using Labview 2012, and I'm stuck with a question.

    First I provide you with a simplified version of my VI control interface and the sub - VI used to generate and manage the mappings of wafer.

    The VI is composed of several tabs: Prober initialization, manipulation of Wafer, Wafer map, status, error.

    The sub - VI can:

    1 / initialize the grid to display the map (Subvi Init grid not provided here)

    2 / coordinates XY for import a txt file (Subvi Wafer map Import)

    3 / view contact information and the index of the sector under the cursor

    4 / and what position die is double clicked and the Boolean 'Edit Wafer map' is true, then the user can change the State (color) of the matrix between die on platelets and selected Die

    My question:

    If I use the sub - VI by itself, it works fine. However, when I use it as a Subvi in the 'Wafer map' tab, the plan does not rise and I can use any features incorporated into the Subvi.

    I suspect that the while loop + structure of the event of sub - VI the bottleneck here.

    However I do not know which way to go, that's why I'd be happy to have some advice and help here.

    Thank you.

    Florian

    The question arises because your hand loop 'for' cycles of 33 times.  In the loop of 32, appears your Subvi and execution is passed to your Subvi.  During this time your main VI expected Subvi in the end, she never does.  You could spend your Subvi out of the main loop of the program and run in a separate process, in order to pass data using queues, but you have to find a way to close the Subvi (i.e. a queue).  By moving the Subvi on the main process, it is independent and you can do what you want to do with the events and others.

  • While loop with stop unwired FPGA button?

    I've seen examples FPGA with a while loop where nothing is plugged to the stop button. On a target PC, it would throw an error. What it means?

    I think you are talking about "Timed loops" that are "single-Cycle timed loops" on FPGA.

    FPGA is intended to be run until it is powered, a 'Stop' software does not much sense.

    Norbert

  • How to pause and resume a while loop with a button

    Hi all!

    I'm back in LabVIEW, after only a few years and I cannot understand, what at first sight seems to be a simple problem!

    All I want to do is have a while loop in which, for the purposes of illustration, I have the 'random number from 0-1' function on the inside, and I want to be able to pause and resume this help from a button. There are a few other posts on the forum that are very similar and do use "event structures. The problem I encounter is that I can get the genarator random number to start the generation but the break will not stop this!

    I have the feeling that I made a stupid mistake - but I can't understand or google my way out the problem! I enclose my solution so far!

    See you soon!

    I did an example (you can drag and drop the image into a labview diagram > = 2014)

    hope this helps (I just did 2 excerpts, it's the same program)

  • Folder level Javascript executes the Menu item, but not button - need a work around... Help, please

    I have a JavaScript that contains a function of confidence with a SOAP operation inside the confidence function.

    This function is inside a folder level script.

    When calling this function to a menu item, it works fine.

    When I try to add and call this function from a button or a Signature field to the title of JavaScript execution when signed, it will not work and I get an error message.

    What I'm missing and there is a work around, I need to run it from a button or a signature field?

    Any ideas?

    How to run privileged Javascript by a button

    //    1.  Need to put the necessary Javascript inside a function in the Javascripts folder

    //    2.  Javascript must be a function of trust

    //    3.  Add the call to the function of trust to the button

    //

    The Code for the button to execute a script Javascript on the Focus of the mouse is-> Trusted_CustomCode();

    //

    The following example is a JavaScript script at level folder for security reasons

    //

    The example code SHOULD BE wrapped in a function of trust which is part of .js in the javascripts folder

    //

    var Trusted_CustomCode = app.trustedFunction (CustomCode);

    function CustomCode() {}

    app.beginPriv ();

    Insert the custom JavaScript Code here

    App.Alert ("this is my custom Code that is running from a button");

    End of the custom Javascript Code

    app.endPriv ();

    }

  • Button refresh/recycling - work around him with presentations of form

    I have a form that sends to the result page

    On the result page...

    < cfif structKeyExists (form, 'submit' >)

    Total = total + 1

    < / cfif >

    I noticed that if I press the button "Refresh" on any browser, the total increases, that I don't want.

    So I thought that I could work around it by using structDelete (Form, "submit"), but it made no difference. Look further into it, when I poured the contents of the form at the beginning of the results page, it seems that the button refresh hang 'undeletes' to 'submit' form, that's why my total increases.

    Any advice on a way around this?

    It is possible, that we have done something like this on our system as a double safety mech, but he was coding people hit submit twice quickly F5 questions.

    At the * very * top of page treatment, do something like and then false at the end of the page.

    Then, wrap the code of the page in a or similar. But the code must be at the top of the page to make sure it works as soon as someone clicks.

    Just think about it logically, there is just nothing complicated about this topic once you know exactly what you want to achieve.

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

  • Sub - VI with nodes of feedback used more than once inside a While loop

    All,

    I have a Subvi is a set of operations and using 3 feedback nodes. I use this Subvi inside a loop While 4 times in total. I noticed all instances used to share the same result in each node for your comments, but I would like to have an individual result of each of them. Is there an easy way to work around this problem? I find ways to avoid this: a) create a different vi for each time the Subvi has been used. (b) use global variables instead of feedback nodes. Is there an easier way to get around this problem?

    ExamplePlease note that the two sub - VI are the same) If on my first Subvi I calculate a maximum value and get 1.29 (then goes to the crux of feedback) on my second slot - VI 1.01 my feedback to the Subvi second node records still get the maximum value or 1.29. (and I want it to be 1.01!)

    Hope, that it is not too complicated, I was scratching my head with that for a while, can't find the "easy" button Thanks in advance.

    -Pop

    IM using 9.0.

    It would be useful to join the code. Anyway, I'm not sure how several knots of comments are supposed to work so I will defer to others to answer that. As far as being able to use separate or instances values if you are using a Subvi, you could mark it as reentrant. In this way, each call to it will behave as it were a copy of the VI and it will have its own memory space. This should include the feedback node. You end up with a single slot - VI and in reality a single node of feedback. If you need pass data between calls that simply data through wire. You can also use a motor of Action to store and retrieve values. An EA is MUCH better than a global variable.

  • Stopping at two simultaneously while loops in a sequence

    I'm under two loops while at the same time. A while loop is used to produce a square using the acquisition of data USB of NOR-6343 wave. The another while loop contains my main code. I make sure that my square wave while loop stops after the hand while the loop is over. I used the function "To highlight the Excution" to see if my code is excuting in order and the way I expected to and it seems to do, but when I hit the button stop the square wave while loop stops so that the main while loop always ends excuation. The main while loop takes a series of measures using the data acquisition Toolbox, so I need to make sure that the square wave is being emitted during the execution of the loop of mian.

    Currently to work around this problem, I wired a constant numberic (101) inside the large loop for a numberic out indicator. And I used a cheque codition "Equal" in the square wave while loop and set it so that this loop stops when he sees the value. This seems to work and made sure my square wave still series, while the main loop is excuting finishing. Even if it works, I want to know if there is a better way. Attached are a couple of screenshot of the loops.

    I vote for using a notification utility.  You must order the loop at the end.  Do a front panel indicator to stop a loop is not a good practice.

Maybe you are looking for