Main VI stops fucntioning after i open and close a subvi from an event structrue.

Hi,
I am trying to open a pop up vi from an event. I have been struggling with this for a while now. When i open a pop up vi and close it, the main vi stops running properly.
I have narrowed it down to the fact that the event which calls the subvi never finishes when the subvi is closed.
The attached image is an example of what I am currently doing. When I run this, i never see the dialog box that says 'here'
maybe useful as a hint to the problem...
This does work properly if I run the vi, click to open the subvi, close the subvi, (here the main vi is not working properly, cant click anything)  then stop the main vi, run the main vi again, open and close the subvi, and then i see the 'here' dialog, and my main vi functions properly.
thanks
J
Solved!
Go to Solution.

What is actually happening is you hit the Ok button and your panel closes and you set the Stop 2 to True.  Ok, that is fine except for the fact that the Stop 2 terminal has already been read during that iteration of the loop.  So the loop will go again.  This time is has read the Stop 2 at a TRUE, but the event structure needs an event before the loop can complete.  But the front panel has been closed already and you are stuck.
As Dennis said, get rid of the Stop 2 and just wire the TRUE constant straight out of the event case.  Wire a FALSE for all of the other event cases.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Whenever i start my ipad2 the applications automatically starts to open and close automatically jumps from one screen to another

    Whenever i start my ipad2 the applications automatically starts to open and close automatically jumps from one screen to another cannot operate the ipad at all, tried switching off and back on again, also restored the ipad but of no use

    try restart
    http://support.apple.com/kb/HT1430

  • Why can't I open and retrieve my files from iPhoto and my address book after importing the files from my Power mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    Why can't I open and retrieve my files from iPhoto and my Address Book after importing the files from my Power Mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    For your addressbook, export the files to vCard on the PowerMac, then bring them over to your Mac Pro. For your iPhoto, copy the Users -> yourname -> Pictures folder to your Desktop on the Mac Pro, and open iPhoto on the Mac Pro holding the command and option keys.  Select the library file from that Pictures folder and open it.  It should import all the pictures into iPhoto as part of the rebuild process.  Other PowerPC to Intel migration issues are covered here: https://discussions.apple.com/docs/DOC-2295

  • After I open and read an email how do I get back to email.  I am closing the open email then having to go back to the home screen and then reopen the mail app.  There has to be a better way.

    After I open and read an email using my mail app, how do I get back to the email app to open an read others.  I am closing the email open, going back to the home screen and reopening the mail app every time.  There's got to be a better way to do this.

    If you are using the iPad in portrait mode, swipe from left to right in order to bring up the preview window of your emails again.

  • Time capsule POS! stopped working after a month and no ability back up data for 71 days now. Apple never returned my calls!

    Does anyone have a better suggstion than waiting for apple to return my call? 71 days with no back ups and my new 2T unit stopped woprking after a month and living in the Turks & Caicos Islands there is no locoal support (I bought the unit from APple in Miami) According to the diagnostic tests I ran the unit is shot and needs replacing.. Wireless works fine though.. Seems to be a common problem with this unit. Would ahve been better off with my old airport extreme, I ahve had for five eyars, but it no longer hs enough capacity.

    Does anyone have a better suggstion than waiting for apple to return my call? 71 days with no back ups and my new 2T unit stopped woprking after a month and living in the Turks & Caicos Islands there is no locoal support (I bought the unit from APple in Miami) According to the diagnostic tests I ran the unit is shot and needs replacing.. Wireless works fine though.. Seems to be a common problem with this unit. Would ahve been better off with my old airport extreme, I ahve had for five eyars, but it no longer hs enough capacity.

  • Hello! I have installed Photoshop on PC WIN 7 64bit. When I store first time a Photoshop docuument, it works fine - after re-opening and doing changes I trying again to store it - it does not work anymore! First it does not accept the name (message "It ca

    Hello! I have installed Photoshop on PC WIN 7 64bit. When I store first time a Photoshop docuument, it works fine - after re-opening and doing changes I trying again to store it - it does not work anymore! First it does not accept the name (message "It can not be stored because the nam is invalid" With 2. trial it tells me that the data is blocked and I don't have the rights - and I should chenge them. But I am working as the Admin on my PC - and each trial to change the rights of the data is as well not possible because of missing rights - even I am Admin! I must always store the data with a new name, then it works, but I also cannot remove the old datas or shift them into the waste paper - because of no rights! -- sorry for not perfect english, I am German native speaker! Tahnks a lot for help!

    Hi,
    I am using a Nvidia 4200M adapter in my Laptop, Driver 266.96, Direct X 11
    In my desktop I am using an ATI XFX 6950, latest revision drivers (I am not at home right now so I cant get that info).
    The issue I did describe above, but it was a long explanation.
    In some flash games the game files load initially and get as far as the "click to start" button. Then the flash area usually goes either all white or all black (usually depending on the falsh game default background color) and then it stays that color. Cant see anything after hitting start (usually most games have an intro video or animation before the game starts, but I cant see any of it.
    For the very few games that do start, the flash game or application does not seem to work correctly in that when the rare game starts, it wont save any game files or save files to the pc and so if I exit the game (navigate away to another page or close browser) and then later come back, even though I click the option to save games (and ensure that the flash application slider shows it can save files and lots of space) it does not save and I have to start from the beginning all the time.
    More explanation I gave above.

  • First USB port stops working after random time and won't work until I restart

    Hey guys
    I have this problem on my late 2011 Macbook Pro 13 inch,
    It's been for a year already and it really freaks me out and drive me crazy
    My first USB port next to the thunderbolt stops working after like 3 days, and it won't respond until I restart my computer or log off and log in again.
    If I restart my computer, USB stops working after 3 days and won't respond until I restart
    If I log off it works for like a couple of hours and then stops again
    I have tried EVERYTHING, SMC reset - no luck, PRAM reset - same results, Upgraded to lion same results, Upgraded to mountain lion - SAME RESULT
    And I can't take it to an apple store because I'm not from the US
    I am 100% sure this is a software problem and I've seen here that many people have faced this problem
    Please help, it really freaks me out

    ElectroSpyzz wrote:
    Hey guys
    I have this problem on my late 2011 Macbook Pro 13 inch,
    It's been for a year already and it really freaks me out and drive me crazy
    My first USB port next to the thunderbolt stops working after like 3 days, and it won't respond until I restart my computer or log off and log in again.
    If I restart my computer, USB stops working after 3 days and won't respond until I restart
    If I log off it works for like a couple of hours and then stops again...
    I'm sure this isn't what you want to hear but unless you really are using your laptop 24 hours a day, is there any reason why you don't just shut it down and reboot when you're ready to use it again? I have to wonder how many other MacBook Pro owners potentially have the same problem but when they quit computing for the day, their computers quit too.

  • TS2771 After updating my software my apps open and close immediately when selected

    After updating my ipod software my apps open and close immediately when selected.

    See:
    iOS: Troubleshooting applications purchased from the App Store
    Restore from backup. See:
    iOS: How to back up
    Restore to factory settings/new iPod

  • Pinch open and close function not working after upgrade

    I'm having trouble with the pinch open and close function on my trackpad. It was working fine until I installed the new Google upgrade and now it doesn't seem to be working. Any suggestions. The other functions are working fine.

    Click on the Apple icon at the top left of the screen. Select "System Preferences", then "Trackpad".
    Be sure to select:
    "Pinch Open and Close" in the "Two Finger" Menu...
    Sly

  • Open and Close Front Panel of SubVI

    Hi all,
    Running LabVIEW 2011 on Windows 7 x64.  I am trying to get a subVI front panel to open from my main FP with the press of a button and then close with a button press in the subVI.  Here is the piece from my main FP that calls the VI and opens the FP 
    Plots is defined in another loop and all of the loops are in a flat sequence.  I did it this way because I want it to start with the first press and not stop my main loop from running.  I have moved the item in the left loop around a lot so I'm not sure if I can run that in the same loop as the event or not.  Either way opening the VI seems to work fine.
    The problem shows up when trying to close the subVI for the SECOND time.  The code is here:
    As I said, the first time I open and close the VI everything works as I expect it should.  I am then able to open it again but now the "blank button" doesn't function and I can't close the window or even open the block diagram to probe anything.  I have been trying to figure this out for awhile, any insite would be greatly appreciated!
    Thanks
    Solved!
    Go to Solution.

    Its good that you found the bug.
    This code may serve as a way for you to compare notes.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Open and Close Shelf Effect

    Relative newb to Flash and not sure what the issue is but I have a shelf opening and closing effect  The timeline is 45 frames long and when the shelf is out it has this AS3 code in it:
    import flash.events.MouseEvent;
    stop();
    ShelfOpen,addEventListener(MouseEvent.CLICK, closeShelf);
    function closeShelf(evt:MouseEvent){
    gotoAndPlay(17);
    Once clicked, the shelf closes and only a sliver of the shelf appears.   The person can re-open it by clicking the sliver at frame 30 using this code:
    import flash.events.MouseEvent;
    stop();
    ShelfOpen,addEventListener(MouseEvent.CLICK, openShelf);
    function openShelf(evt:MouseEvent){
    gotoAndPlay(31);
    In the last frame (45) I have the code:
    gotoAndStop(16)
    which should return the shelf to its open position and allow the user to close it again if they click in the shelf, but it seems to be listening at at frame 30 and just running the Open Shelf motion again.  I would just like the user to be able to open and close the shelf as they like.  Any help would be apprecaited.
    -DC

    See if removing the event lsteners in the event handlers helps, as in...
    ShelfOpen.addEventListener(MouseEvent.CLICK, closeShelf);
    function closeShelf(evt:MouseEvent){
       ShelfOpen.removeEventListener(MouseEvent.CLICK, closeShelf);
       gotoAndPlay(17);
    (similarly for the other)
    and make sure you are not using commas after ShelfOPen like you did in the code you posted.

  • [bdb bug]repeatly open and close db may cause memory leak

    my test code is very simple :
    char *filename = "xxx.db";
    char *dbname = "xxx";
    for( ; ;)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    I try to run my test program for a long time opening and closing db repeatly, then use the PS command and find the RSS is increasing slowly:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 466 588 4999 980 0.3 -bash
    2615 pts/0 R 0:01 588 2 5141 2500 0.9 ./test
    after a few minutes:
    ps -va
    PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
    1986 pts/0 S 0:00 473 588 4999 976 0.3 -bash
    2615 pts/0 R 30:02 689 2 156561 117892 46.2 ./test
    I had read bdb's source code before, so i tried to debug it for about a week and found something like a bug:
    If open a db with both filename and dbname, bdb will open a db handle for master db and a db handle for subdb,
    both of the two handle will get an fileid by a internal api called __dbreg_get_id, however, just the subdb's id will be
    return to bdb's log region by calling __dbreg_pop_id. It leads to a id leak if I tried to open and close the db
    repeatly, as a result, __dbreg_add_dbentry will call realloc repeatly to enlarge the dbentry area, this seens to be
    the reason for RSS increasing.
    Is it not a BUG?
    sorry for my pool english :)
    Edited by: user9222236 on 2010-2-25 下午10:38

    I have tested my program using Oracle Berkeley DB release 4.8.26 and 4.7.25 in redhat 9.0 (Kernel 2.4.20-8smp on an i686) and AIX Version 5.
    The problem is easy to be reproduced by calling the open method of db handle with both filename and dbname being specified and calling the close method.
    My program is very simple:
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/time.h>
    #include "db.h"
    int main(int argc, char * argv[])
    int ret, count;
    DB_ENV *dbenvp;
    char * filename = "test.dbf";
    char * dbname = "test";
    db_env_create(&dbenvp, 0);
    dbenvp->open(dbenvp, "/home/bdb/code/test/env",DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL, 0);
    for(count = 0 ; count < 10000000 ; count++)
    DB *dbp;
    DB_TXN *txnp;
    db_create(&dbp,dbenvp, 0);
    dbenvp->txn_begin(dbenvp, NULL, &txnp, 0);
    ret = dbp->open(dbp, txnp, filename, dbname, DB_BTREE, DB_CREATE, 0);
    if(ret != 0)
    printf("failed to open db:%s\n",db_strerror(ret));
    return 0;
    txnp->commit(txnp, 0);
    dbp->close(dbp, DB_NOSYNC);
    dbenvp->close(dbenvp, 0);
    return 0;
    DB_CONFIG is like below:
    set_cachesize 0 20000 0
    set_flags db_auto_commit
    set_flags db_txn_nosync
    set_flags db_log_inmemory
    set_lk_detect db_lock_minlocks
    Edited by: user9222236 on 2010-2-28 下午5:42
    Edited by: user9222236 on 2010-2-28 下午5:45

  • Would you Open and Close DAQmx tasks within a function or Globally

    Hi Guys,
    This should start something.
    The subject is DAQmx Tasks.
    If you were writing a function that is called many times, say MeasureVolts (double *Value) to obtain a reading from an Analogue Input Channel.
    Would you.
    1. open and start the task inside the function, do the measurement and then close the task inside the same function.
    or
    2. open the task globally and later do the measurement inside the function using the global task then close the task only when the application is closed.
    I am mostly concerned with the overhead of task generation and closing, what do you guys and girls out there do?? and what is the general opinion?
    I would appreciate your views.
    Regards
    Paul.

    I would definitely NOT keep configuring and clearing (I think that's what you mean by open and close) the same task over and over.  I would configure once, read many times in my main app, then stop & clear once.
    I typically like to package such data acq into an "Action Engine" that keeps track of its own DAQmx task id so I don't need to sling that task id wire around into multiple parallel loops / vi's.  Attached is a very stripped-down example for Digital Input. 
    I would typically do more with error testing and would make the "Action" enum into a typedef custom control, but this gives you the basic idea.  The action engine approach works very nicely when there's a small # of different kinds of input parameters and output info needed to support all the necessary action cases.   When you start needing a large number of differnent kinds of inputs and outputs to support the desired actions, then you start having difficulty with (1) having enough terminals to wire and (2) remembering which inputs and outputs are meaningful for which actions.
    -Kevin P.
    Attachments:
    DI Action Engine.vi ‏75 KB

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • Apps in iPad 1 open and close quickly

    Hello,
    My mother has an iPad 1 (she has her own itunes account) but had never synced and updated her iPad with a computer (pc or mac).
    Today I had to use it and connected to my iTunes on the pc but only to update her iOS on the iPad wich was 3.x. After the whole update process (wich went normal and smooth) almost every app that I woud open, closed imeadtly. I say ALMOST because, a few from the default apps (like Mail, Photos, Safari, System, etc) opens normaly. Though iBooks doesnt and all 3rd party apps also doesnt open normaly.
    I've tryed to reboot it one more time thinking it was some kind of strange bug or something but didn't work. The apps continue to open and close almost instantly.
    I'd like to know if anyone had a similar problem and how they solved it or if my only resource is to roll back to the iPad backup made in my pc.
    Thanks in advance.
    Luis Felipe

    Try double-tapping the home button, then holding the app icon until the minus sign appears. Touch the minus sign to kill all the apps. Then restart the iPad with the home/power buttons (hold for ten seconds) until the apple appears.

Maybe you are looking for

  • Oracle.DataAccess 2.112.1.0 - Connection Pool Problem

    Hi, Oracle.DataAccess 2.112.1.0 is having connection pool problem. The no. of TCP connections to Oracle database keep increasing untill the server's session run out of limit. My application created connections, use them, close them, and dispose them

  • 5800 internet access

    I have a 5800 with v3.0 firmware. I am having trouble internet browsing At times it will connect perfectly and then other times it will not connect at all and gives messages like: Service is not part of active profile Gateway time out and something a

  • Bridge craching in CS4

    Bridge keeps coming up with an error and then windows closes it down. have restarted and gone back into Bridge for it to do the same thing after a minute or so. This has happened 4 times this am. I am trying to edit a WEDDING!! Brides wait for NO ONE

  • Catalog in SRM

    HI Gurus, Could you please let me know that which is the best method to maintain the catalog: employee maintained, 3rd party maintained, or vendor managed? Thanks in advance, Regards, Ankur

  • HT5278 how do you upload software updates

    how do i upload the latest software