Time loop and events (again)

Good morning,
I still have problems with time loops and events.
I have an event structure based on run time menu (two buttons: start stop).
When I push start, an automatic sequence is started made of a state machine (so a while loop).
I want to stop the process by means of presing stop in the run time menu. The problem is that the system doesn't respond when I press the button (it's not locked since I unchecked the option to stop front panel acitivity in the event structure configuration). I see that the pression of the stop command is made, but the code inside the event structure is not executed.
How can I avoid this?
Thank you,
Fede

Events don't react to changes in local and global varables, and that's usually a good thing.
To trigger an event programmatically, you should write to a signaling property of the control assigned to the event, and the event will fire (even if the value does not actually change).
Attached is a simple modification of my example that forces a stop of any ongoing measurments every 10 seconds using the above method.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Prova Loop MenuIII.zip ‏15 KB

Similar Messages

  • Run-Time Menu and Event Structure~~HELP~~

    Hi, brothers,
    I'm new user for LabVIEW. Use the version of LabVIEW is 8.6
    One problem describe as below:
    Can Run-Time Menu and Event Structure exist simultaneously?
    Without Event Structure, Run-Time Menu works well, but Run-Time Menu works abnormally.after adding Event Structure,
    How do I modify the problem?
    Thank you for your help.
    Attached is the program.
    Attachments:
    PC_Adjustment.zip ‏44 KB

    Yes they can coexist, but not how you did it.
    Every iteration of the while loop you wait for an event in the event structure, and you look if the user has selected anything from the menu.
    To get this working you should add an event for <this VI>\Menu Selection (User):
    Ton
    PS you should add a stop button, the only way you can stop the VI is hitting the 'emergency stop' button, with hardware connected (like you have) this is not the adviced routine
    Message Edited by TonP on 09-26-2008 07:34 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Main_BD.png ‏5 KB

  • Imac beeps 2 times then 3 times over and over again

    Turn on Imac and it beeps twice.  Screen is white.  Then it beeps 3 times over and over again until I turn it off.

    You can run the Apple Hardware test (on your install disk #2) - run the extended test at least twice; also you can take out one of the RAM modules and test, then test the other one.
    You can purchase new RAM - best place is one of the two most recommended vendors OWC (macsales.com) or Crucial.

  • How to delete all content on a time capsule created by Time Machine, and begin again creating a new savings bundle

    How to delete all content on a time capsule created by Time Machine, and begin again creating a new savings bundle ?

    You make a sparse bundle.. but don't ask me how that is different to a bundle of savings. Sparsebundle is what the special TM backup is called. It is a kind of disk image I think.. what makes it sparse is unclear as well.
    Anyway.. you are on Lion I guess.. download 5.6 utility for Lion. http://support.apple.com/kb/DL1482
    So you can get a utility that does utilities.. and not pretty faces.
    And go to the disk page and erase the drive.. a quick erase is plenty and is pretty fast.

  • I changed a setting and now my nano only plays one song at a time over and over again.  What and Where to I need to change

    I must have changed a setting because the nano will only play one song and then repeat the one song.  How do I change it back so it will play all the songs on the list?

    Sounds like you turned on the repeat single song feature.
    Go to now playing, then swipe right to left to get to the second screen. At this second screen you will see three icons. The one on the left looks like a loop and I am going to guess that there is a little "1" there on the loop. Hit that button until the 1 goes away. You will be able to find all this info in the online documentation for the Nano. That planb linked to above.
    i

  • How can i clear a full time capsule and start again

    how can i clear a full time capsule and start again

    Open the airport utility .. Click on the TC.. click on edit and go to the Disks tab.
    Click Erase Disk.
    Choose quick erase.. it takes 2min to reformat the drive.

  • How to stop a while loop of event structure from a main vi

    Hello;
    sorry for my english
    I have to stop a subvi from my main vi, the subvi contains a while loop and an event structure so I need to stop this loop while directly from my main vi I have tried global variable but it did not work
    any help please or example !!!   
    Solved!
    Go to Solution.
    Attachments:
    stop a while loop and event structure from main vi.png ‏16 KB

    IYED wrote:
    Hello;
    sorry for my english
    I have to stop a subvi from my main vi, the subvi contains a while loop and an event structure so I need to stop this loop while directly from my main vi I have tried global variable but it did not work
    any help please or example !!!   
    If this is an example of how your code looks, I'd clean it up before the developer who has to work on it next hits you over the head with his LabVIEW Style Book. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • I keep getting message "mozila Firefox not responding." It takes minutes to down load a site - some times it just gets in a loop and never down loads. Then when I try to click on it again screen goes opaque and i get the same message.

    I 'm getting message "Mozila Firefox not responding." It takes minutes to down load a site - some times just gets in a loop and never down loads. The little circle at top just keeps going round in circles .
    Then when I try to click on the screen again the screen goes opaque and I get the same message re " Mozilla Firefox not responding" - and it is minutes before I can get back in to close down screen.
    I have downloaded Fire fox version 4 and this is still happening.

    See:
    * http://kb.mozillazine.org/Error_loading_websites

  • I noticed that any other code in my while loop only gets called at the 1st time through the loop and when a event is executed.

    HI there!
    I have a while loop, in which i am reading from/writing  to a compact rio. Furthermore, i added a event structure, its the 1st time i'm using it so i'm a bit lost at times.
    I have the event structure set up for all my button i want to trigger an event. However, i have some other code which i would also like to be executed, evebn though no event has been executed.
    I noticed that the other stuff in the loop only gets executed the 1st time through the loop and when an event is triggered.
    My question therefore is, how do i get the other stuff to execute as well?
    Please advise.
    Thanks.
    Regards,

    Put the other code in the timeout event case.  Wire some positive value to the timeout hourglass input.  That code will execute everytime a timeout occurs.  For instance, if you wire 100 into the timeout, the code in that case will execute every 100 mSec.
    - tbob
    Inventor of the WORM Global

  • 1ms Time Loop / Event Trigger from Counter

    Hi.  I'm pretty new to LabView so I'm am hoping this is an easy question:
    I need to read the pulse signal from some reluctors (toothed wheels that pulse a signal with each passing tooth).  The amplitude of each pulse is above 2.2V so I was planning on using TTL counters.
    I need to record the status of 5 counters with each increment of one of the counters  For the RPM and tooth count, I can do this with a 1ms timed loop.
    Question:  Can windows successfully give a 1ms (accurate) timed loop?  I know this depends on how much I am doing inside the loop but, for now, I just need to read 5 counters and store the data with a timestamp.
    Is it possible to make a counter throw an event?  If the counter is incrememented, can LabView be notified to then go off and handle a block of code?
    Thanks for any help you can offer!

    I assume you also have an analog input card for the chasis?
    So, it's probably possible to get 1ms timing with software timed loops, however based on my quick check of the manual for your chasis
    http://www.ni.com/pdf/manuals/372780c.pdf (see section 2-2 for example)
    You can use an Analog Comparison Event or a PFI channel to trigger a sample (i.e. your generated pulse is the sample clock). This could allow you to use your pulse to trigger an analog sample. Now, this doesn't get you timing information (it just gets you the value of the analog input at the time the event occurs). To get a time, you can use the counters on the digital card in the same way. You have the counters be driven by a fast sample, on-board clock. Then you can use your pulse events again to sample that clock. So each pulse, you get one analog voltage sample and one time sample from the counter. The resolution on this counter will be great, depending on how fast your counters can be driven (sometimes NI counters can actually be driven faster than the fastest available clock on the card or chasis). 
    Or you can just do the software loop.

  • When I open FireFox i get the blue screen of death and then vista restarts. I get to login and then afterthe welcome window it crashes and restarts again. I can open in safe mode but if I open firefox again it restarts this loop.

    The other day I opened firefox after the latest update in September. Firefox then closes and then i get logged off and vista(32 bit) restarts. I get back to login and when I try to login it gives me the blue screen and restarts again with the selection screen (start in safe mode....)I was able to login on safe mode and then on admin afterwards. Thinking the problem was just an error I went back and opened firefox on my account and the loop started again. I was forced to remove firefox but I want ti back and I want to know how this can be fixed so I can put it back on my computer.

    See below -- the way I asked the question the first time may not be clear. This post was a goof but I can't figure out how to delete it

  • Data acquisition time not continuous, but starting over and over again

    Hi,
    My data acquisition time is not continuous but loops over and over
    again.  Could someone please take a look at my vi to see if you
    have any thoughts on how to fix this.  Also, I tried to set up my
    vi so that I could take the mean of the signal at any time I
    choose.  However, at the same instance that the data acquistion
    time "starts over" again, the mean is calculated (before I trigger it to take the mean)
    I have attached my vi and my output file as a text file so that what
    I'm trying to say will (hopefully) make a bit more sense. 
    Thanks for your help in advance!
    Sherri
    Attachments:
    Datalog1 71805.vi ‏1252 KB

    Hi,
    Thanks for responding to my question. Attached is the vi with added
    comments as to what I think I am doing.  By DAQ time, I mean the
    first column of data that is in the data file that I attached
    previously.  I am only simulating a signal (at the beginning) so
    that I can program in my office.  I do, however, have the same
    problem as stated above when I change the simulate signal to DAQmx
    using my instrument.
    I hope this clearer.  If not, I'll try again. 
    Thanks so much!
    Sherri
    Attachments:
    Datalog1 71805 83.vi ‏1228 KB

  • Why can't I download Textplus on my 4th generation iPod touch?  It's not jailbroke or anything but it says the terms and conditions have changed. When I agree, it says your session has times out. Try again. But it doesn't give me an option to try again an

    It's not jailbroke or anything but it says the terms and conditions have changed. When I agree, it says your session has times out. Try again. But it doesn't give me an option to try again and has a done button underneath it. I press done. The textplus app says "Waiting..." and is gray. What can I do to download this app?

    iTunes has to contact Apple to send your agreement to the new conditions, but your security software has to allow this contact. If blocked, you'll get a time out message. Follow the instructions here to check your security software settings: iTunes for Windows: Troubleshooting security software issues

  • Every Time that I try ot download my songs that I have purchased from Itunes and error message come up, "error 450." Make sure that your network connection is open and try again. What can I do to fix this problem?

    Every time that I try to download my music from I tunes an error message comes up it says, ( err = 450) Make sure that your network connetion is active and try again.  What can I do to fix this problem, I have tried everthing that I-tunes has told me but with no luck. Thanks

    Try disabling your parental controls. Does that help with the 450?
    iTunes: Using Parental Controls

  • HI there, I am having trouble updating my CS5 Master's Collection Suite for at least a month now. I keep gettin this message "There was an error downloading this update. Please quit now and try again later" every time and do not know how to fix it.

    I am having trouble updating my CS5 Master's Collection Suite for at least a month now. I keep getting this message "There was an error downloading this update. Please quit now and try again later" every time and do not know how to fix it.
    Any help will be highly appreciated.
    Thanks a lot in advance.
    Sincerely,
    Uvaldocj@@
    Here is a list of the products I am troubled with:
      Adobe After Effects CS5 10.0.2 Update
    There was an error downloading this update. Please quit and try again later.
      Adobe Bridge CS5 4.0.5 Update
    There was an error downloading this update. Please quit and try again later.
      Adobe Extension Manager CS5 5.0 Update
    There was an error downloading this update. Please quit and try again later.
      Adobe Illustrator CS5 15.0.2 Update
    There was an error downloading this update. Please quit and try again later.
      Adobe Pixel Bender Toolkit 2.5 Update
    There was an error downloading this update. Please quit and try again later.
      Adobe® InDesign® CS5 7.0.4 update
    There was an error downloading this update. Please quit and try again later.
      Dreamweaver CS5 11.0.4 Updater
    There was an error downloading this update. Please quit and try again later.
      Fireworks CS5 11.0.2 Update
    There was an error downloading this update. Please quit and try again later.
      Photoshop 12.0.4 update for Photoshop CS5
    There was an error downloading this update. Please quit and try again later.
      Photoshop Camera Raw 6.7 Update
    There was an error downloading this update. Please quit and try again later.

    I'm having the same issue. And Dreamweaver now crashes after just a few seconds.

Maybe you are looking for