Why the STOP button stops not timed loop.

Hello world

I had a rather complicated code launched against me. I had to change program action unique (and many other things) when ACQUIRING a button has been clicked making timed measurements. I was able to add the time... but I want the loop to stop once you click on the STOP button.

I have attached a very simplified version of my code.

So if you start and press the ACQUIRE the program generates random numbers (to simulate the measure) and records them with a device ID. The program stops once the total is for instance in the default settings after 20 sec.

But it does not stop when you press the STOP button. MY QUESTION: why not?

FOR INFO:

In my actual code, there are 10 events instead of only 1.

It doesn't have to stop immediately, inbetween iterations (because I already tried to include the timed stop Structure VI and it did not work either).

I also used the execution to highlight, but it did not help me.

Thank you for any help or suggestion!

Lisa

Lisa,

First of all, thank you for explaining clearly what your problem and to present a simplified program.

The problem with your program is very simple. The loop inside the structure of the event begins when the acquisition: Mouse Down event occurs, which seems to be what you wanted. The default condition for the case of the event is "front Lock (defer the treatment of the actions of the user) until the end of the occurrence of the event." This is controlled by a checkbox at the bottom of the evetn installation dialog box. What this means is that the stop button is not recognized until AFTER the event is complete.  BUT the case of the event cannot complete until the while loop stops.

The Solution: Move the loop outside the case of the event.  Generally speaking, event must not contain any code that could take more than a few milliseconds to run and certainly should not depend on the user's other actions to complete.

Look at the design of producer/consumer models (events) for advice.  Also learn how to use queues to pass data between loops rather than local variables.

Lynn

Tags: NI Software

Similar Questions

  • Why the back button will not give a list of all the places, I was like before? Now I trudged back one page at a time :(

    Since I downloaded Firefox 4, April 30, 2011, the previous button did not list that she used to give when you hovered above him, of all the places that you had been to travel to where you are on this tab. That we gave the opportunity to directly back at the beginning of his cyber-travel on this tab, or choose any other port of call on the way. Now I must return to my starting point, or to an earlier point, laboriously click after another. Hope that enough information for you to give the image.

    The arrow to open the history tab of the previous buttons and following was removed in Firefox 4.

    Use one of the following methods to open the tab history list:

    • Right-click on the back or next button
    • Press and hold the left button of the mouse on the active back or forward button until the list opens

    You can watch this extension:

  • Why the print button does not to preview before printing?

    After the Firefox update suddenly goes to the window to print preview by clicking on the print button rather than just print the page.

    Three clicks you can now print a page, rather than one.

    Second, when to close the tab that was printed to focus now goes to the tab to the right of this tab rather than one that was previously active.

    When you need to print 30 pages (a backend of ecommerce for example invoices) is now much more time.

    Why make changes that introduces additional complexity?

    I hope Mozilla will see sense and reverse this strange change in the next version.

    Maybe watching the pref browser.tabs.selectOwnerOnClose the topic: config page.

    You can take a look at this extension:

  • EMERGENCY SITUATION! Please help me! Why the OFF button would not start me in the hp recovery partition?

    I bought a hp Pavilion dm4-2015dx for a little more than a week or two to Bestbuy.ca.

    When I tried to launch the recovery by pressing F11at the start this morning, the following is the display.

    Windows could not start. A recent hardware or software change might be the cause...

    file:\Boot\BCD

    Statue: 0cx0000225

    Info: an error occurred trying to read the boot configuration

    Note: I recently made a partition, I divided the C drives in A and B, I wonder if that has an effect on my computer?

    Help, please! Only, I bought the laptop for a little more than a week

    Greetings,

    If you insert the first disc in your DVD-rom and you start your computer, the screen HP press ESC until you get a menu. Select the start menu and select CD/DVD-ROM, then enter. When it tells you to press a key to boot from the CD, press a key any. This will load the recovery software. Select immediate assistance and a recovery of the system. This will install your computer as the day where you bought everything first.

    WARNING * you will lose all files and programs that you have installed and placed on your computer that you bought the device.

    Yes, this will allow you to use the F11 key again once the recovery complete. Typical HP for the device warranty is one year. We can find this information for you. If you look at your serial number label, it should give you a serial number and the identification code of the product. With this information, you should be able to trace accurate information by the auditor of warranty status if your product has a #ABA or something similar, don't forget that.

    To find your sticker:

    http://h10025.www1.HP.com/ewfrf/wc/findModel?cc=us & DLC = in & LC =

    The guarantee verification link HP is:

    http://h10025.www1.HP.com/ewfrf/wc/weInput?cc=us & DLC = in & LC = on & os = 4062 & Product = 3204464 & softwareitem = MP-74848-1 & sw_lang =

  • The scan button does not work on Windows XP Media Center edition 2005

    Name of the printer: hp psc 1350 all-in-one

    Hi, this is happened since I reinstalled the operating system with an OEM disc, removing all the hp stuff. I got a new OEM drive that comes from hp (I think... well hp stuff works now) but the scan button does not always work. The old record was kind broken.

    I don't mind, but it will be useful, if it could be repaired. Don't want to do something big, would rather just not fix that to do something does not.

    Note: Scanning works, but I have to look somewhere else (e.g. opening scan in the Panel)

    OK, that explains why the scan button does not work.

    The complete software is required for the scan button to work, it is not a feature of the base software.

    Be sure to follow the steps below in order to get is torted:

    1. Unplug the USB from the printer.
    2. On the start menu, enter the HP folder. and follow the link to uninstall to remove the current software.
    3. If you don't find it there, go into control panel > add or remove programs, and remove any software installed HP PSC 1300 series.
    4. Download and install the full feature below:
      http://ftp.HP.com/pub/softlib/software10/COL8901/MP-23606-3/gc_w01_ENU_NB.exe
    5. You will find the Director of HP under the HP software. If you have problems using it, make sure you install the following hotfix:
      http://ftp.HP.com/pub/softlib/software8/COL17377/OJ-46104-1/CIT207355-HPCOM-patch-V8.exe

    Kind regards

    Shlomi

  • Why the stop(); function interferes with another function?

    I have the code Ned Murphy to give me yesterday and it's going perfectly, but when I put the stop() function; so my frames are not crazy, this dose of code no longer works.

    The button (b4) which has this code is in a large movieclip with the other buttons, and the code is placed on the first layer in the main timeline, and not in the movieclip. So my question is... why the stop(); function interferes with this code? What I am doing wrong?

    (B4) button also has a code which is in position in the button and we have no problems with stop();

    The following code is located on the main timeline and it does not work when I put stop(); on the timeline of the movieclip that contains the button.

    bot.bott4._visible = false;

    B4.onRelease = function() {}

    bot.bott4._visible =! visible bot.bott4._;

    }

    The code that is in the button is:

    (release)

    {

    _root. Bot.gotoAndStop (5);

    _root.bott4.gotoAndStop (5);

    }

    Thank you

    Something seems wrong with the nomination that show you.  In the first set of code that you show that you're targeting bott4 as if it were a child to the bot, which means that they are not on the same timeline.  In the second set of code you bot target and bott4 as if they were on the same main timeline.

  • Why the object_not_found exception does not work?

    Posters,

    I have the following statement in a package.procedure:

    -- (...)
    Start

    Select dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName)
    in the cDDL - clob for index DDL
    of the double
    -- (...)

    exception
    When dbms_metadata.object_not_found then
    null;

    end;
    -- (...)

    Execution is stopped in the select, not enter the exception and the following message is displayed in PL/SQL Developer MicroHelp:

    + "ORA-31608: specified object type INDEX not found." + "

    I did it another way by adding the following clause:

    -- (...)
    Start

    Select dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName)
    in the cDDL - clob for index DDL
    of the double
    where exists (select 1+)
    of all_indexes+.
    where table_owner = 'OWNER'+.
    and table_name = sTableName); +
    -- (...)

    exception
    + When no_data_found then +.
    null;

    end;
    -- (...)

    It works, but: why the object_not_found exception does not work?

    Thanks in advance for everyone!
    Philips

    Oh I just noticed:

    What happens if instead of this:

    Select dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName)
    in the cDDL - clob for index DDL
    of the double

    you say:

    cDDL: = dbms_metadata.get_dependent_ddl ('INDEX', 'OWNER', sTableName);

    ?

  • Why the 'Analyze' button is disabled?

    I was wondering why the 'Analysis' button is disabled in the new disk optimizer tool. I'm able to optimize partitions of hard drive of my computer as usual, but I can't check if it must be optimised beforehand.

    Is the drive a SSD or Solid State Drive?  If so, that's why.  These readers of should not or never be defragmented.  It puts much wear and tear on the device that have a shorter life expectancy.

  • Why the iPhone 6plus will not open photos app on mac pro for IOS 10 update.

    Why the iPhone 6plus will not open photos app on mac pro for IOS 10 update.
    A message appears on the iphone asks you to trust the computer it is attached (mac pro 10.10.5)

    You type 'Confidence' and nothing happens. the photos on mac app publishes this message.

    This Mac not yet have been granted access to the media on 'my iPhone '. To import media to this Mac, press 'Trust' on 'my iPhone '. You must first unlock the device.

    This actually solved for me after going to settings, General, reset, reset the location and privacy... and then plug in the unit and pressing the trust... hope that works for others.

  • The power button will not turn on my computer. Is there a way to solve this problem, or the computer not sleep once I do back on?

    I have a MacBook Pro 2011.

    The power button does not turn the computer on when the computer goes to black screen.

    The battery he is

    iI tried to Community assistance to research and tried to wait. The next morning, I was able to turn it back on. Now, it happened again.

    Please help me. I can afford a new Mac.

    Thank you

    Get it fixed. Make an appointment at the Genius Bar in Apple for the service. If you need a Apple Store - find a store - Apple.

  • By pressing the home button does not take me to the home screen of iOS 9.3.3

    I have recenly updated upgraded to iOS 9.3.3 and I noticed that pressing the home button does not take me to the home screen. The only way to get there is by using the creature of multitasking. (double pressing the home button) Also, some applications seem to freeze if turn my phone off and then turn it back on, or when I access it via the multitasking function. Can someone please help?

    Try a forced reboot. Hold down the Home and Sleep/Wake buttons at the same time for about 15 seconds, until the Apple logo appears. You won't lose anything.

    If a force restart does not help, try a system restore. First save your device via iTunes. Also import your photos on your computer and copy all the important data. Reconstruction of the support first test and test. If this does not help, you may need to restore as a new and reconfigure from scratch as the backup may be damaged. It is important to have your photos and your saved data separately from the backup. Here are the steps for a restoration:

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

  • Am unable to use the master password, when I try to add the 'OK' button will not highlight or save it.

    I recently uninstalled then reinstalled Firefox but now can't use the master password. The 'OK' button will not activate, won't save password.

    Thank you
    Marilyn Brann

    It is possible that there is a problem with key3db and signons.sqlite files that store the encrypted names and passwords in Firefox.

    In the Firefox profile folder, rename the files key3db and signons.sqlite.

    You can add .old files (key3.db.old and signons.sqlite.old) names or move them to another folder to make it possible to cancel the action.

    You must define a new master password after renaming or removing the signons3.txt and all the currently saved passwords are lost.

    If that worked, then you can delete the renamed files that are no longer needed.

    See:

  • Firefox automatically updated itself, would not add new bookmarks, then deleted all mine, will not always add new, now the back button does not work. I'm Livid.

    I think I'm on Firefox 13.0. He put itself as part of the update of my computer up to date (at least I guess that's what happened, because it has changed). I noticed yesterday that he would not favorite Web sites, but I thought it was just the website or bookmarks have been full-time or something. Today, I tried to remove a few bookmarks to make more, but they would not remove. I tried to register a new site, and it wouldn't work. I tried to close/exit firefox and re-opening of the program. While the program was closed, I installed the next set of updates on my computer. When I have opened firefox, all my favorites, and the tab menu (or what you call personal small bar on the actual tabs) were gone. I can't always favorite of new sites, so I can't even re-do all my favorites (and I got a lot, all of them arranged so it's a big loss and incredibly annoying). Then I realized that the back button does not work. And the cursor remains on the typing that I symbol, it does not change the arrow, when I click on a link.

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

    You can also try to repair the database of places with this extension:

  • I updated Firefox on my Mac (10.6.8), and now the story is not known (that option is checked) and the back button will not work. Help?

    I updated Firefox on my Mac (10.6.8), and now the story is not known (that option is checked) and the back button will not work. Help?

    One possible cause is a problem with the places.sqlite file that stores the bookmarks and history.

    You can also try to repair the database of places with this extension:

  • Why the new apple is not available to the Canada

    Why the new apple is not available to the Canada?

    Because Apple has not currently media partners to the Canada to provide reports to fill out the app.

    By the end of 2012 mini Mac, OS X El Capitan 10.11.5 beta 2;  Watch, 38 mm silver AL, Watch OS 2.1; iPad 2 Air & iPhone 6 + iOS 9.3.2 beta 3;  Apple Airport Express

Maybe you are looking for

  • DVD tray opens on the Satellite C650

    Hello I'm sorry if this question has been posted before, but I can't get my DVD tray to open without having to stick something in the small space. When I try and open it normally, a little light beside the button just flashes orange. How to solve thi

  • Help create a USB bootable for mini HP.

  • Tecra A2 - message "NTLDR is missing".

    Hi all.My Tecra A2 has been left uncharged for about 12 months until yesterday when I fully loaded.When I turned on I have the Toshiba screen, then Cmos settings should be corrected.After the time and date setting, he went straight to NTLDR is missin

  • Are there examples of niScope send software trigger edge

    This is the sub VI: In my case, PXI-5105 and 6368 are used for the acquisition of synchronization. Post_trig_event and pre_trig_event of data are needed to analyze what analog channel has abnormal evolution. The trig source is not unique, which inclu

  • Songs from Itunes to blackBerry Smartphones

    After downloading my songs on the device, they play well, but then later they are gone.  Often after I sync my calendar.  What is happening and what should I do?