Main vi stops when subvi appears

Hello,
In my main vi I have a lot of thing happening in it, one of them is giving signals to a USB relay device which I connected with DAQ Assistent.
This relay is currently working on time pulses of 3 and 6 seconds. 3 off, and 6 on.
It works fine when I use buttons or other things in my vi, but when I press a button to show graphs in a subvi the relay device stops working.
The subvi with the graphs are now on my screen and only until I close that subvi, the relay starts working again.
I changed the properties of the subvi:
Window appearance - Dialog (instead of custom)
Is there a way to make sure the relay keeps working, it's quite important...

After looking into your code, i do not understand why you didnt split up the code initially into two loops. I marked the piece of code you can easily export. You just have to take care about passing the time-intervall between the loops. But this is easy.
Easiest: If the delay does not change, just get it infront of both loops and pass it to them
Simple: Use a locale variable. Just take care that ONLY ONE loops writes on this variable.
Ellegant: Use a functional global variable (also known as LV-2-style variable).
hope this helps,
NorbertMessage Edited by Norbert B on 09-17-2007 04:53 AM
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Attachments:
SplitUp.PNG ‏16 KB

Similar Messages

  • Loop rate in main vi slowsdown when subvis window is clicked.

    Hi All,
    I have developed one USB DAQ application with 3 while loops in main vi and 1 subvi with an activex container for video display.
    This video displayer subvi has no function and it has that Activex container to display the video.
    The purpose is to playback acquired signal with the recorded video.
    So I keep both VIs frontpanel opened at all time.
    The speed of the loops in main vi are as follows,
    Loop1: Contains event structure with 250ms timeout terminal.
    Loop2: Contains an while to play the recorded data with the recorded time duration between successive data points.
     may be min of 70 ms delay for each iteration.
    Loop3: Contains another while which run min of 15 ms delay for each iteration.
    The speed problem is as follows,
    When i click on the subvi which contains an activex container, the while loop in Loop2 does not run properly and each iterations delay in millisecond is increasing constantly in terms of  250 milliseconds atleast.
    After releasing mouse button from subvi, the loop agains starts running normally.
    it would be great help for me if somebody can provide a solution for this problem.
    Thanks in advance.
    Thanks,
    Sathish

    I think I know why this happens, I am not sure how te get a workaround.
    The ActiveX interface runs in the  UI thread just like the event structure.
    The event structure forces the whole VI into the UI thread and is only triggered every 250 ms when the ActiveX is claiming all the UI power.
    I think moving the 70 ms. loop into a seperate VI should do.
    (I might be wrong about the above theory)
    Ton
    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!

  • Why do remote panel server crash/stop when subvi call is done

    My application crash/stops when I tries to call a subvi with remotepanel.  The application isn't hevy so I can't understand why.  Tried it on several computer with same result.  Use Lv8.0
    Grateful for some feedback on this.

    Patience you have already started a new thread. Please dont dig old threads and that too unanswered ones....

  • Main VI stops when using control references.

    Hi, This is my first question on this forum. I've created an engine simulation VI which uses control references. The main VI has a data acquistion loop and control references. The control references link to another VI that runs an equation loop which continuously calculates engine speed base on data collected in the main VI. The control references work but the main VI data is collected and updated only once when the main VI starts. If I remove the control references from the main VI the daq loop runs fine. Thanks in advance for your help.
    Mike

    Joe,
    Thanks for the response. I do not load the subvi dynamically. I have attached a similar vi to show what I'm trying to accomplish. The DAQ vi reads the input and calculates the power. The power is sent to the "engine momentum sub" vi where the speed, as a function of time, is generated and sent back to the DAQ vi. I created the sub vi to clean up and isolate the DAQ vi from the subvi. I wanted the sub vi to run at a certain speed (by adjusting the wait time)and not affect the DAQ vi. If you input a value of 10 into the DAQ vi and then start it you will see the speed ramp up to 100. While the DAQ vi is running, I need to be able to change the input which would cause the power to change and in turn change the speed. I thought the control r
    eferences were the way to go. In my real DAQ vi, I have many more inputs, all which do not update after the first reading. I considered putting the DAQ functions in another subvi and reading the outputs through control references but that seemed too cumbersome.
    Thanks again,
    Mike
    Attachments:
    DAQ.vi ‏27 KB
    Engine_Momentum_Sub.vi ‏33 KB

  • 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

  • Stopping a SubVI without stopping the main VI

    Hi,
    I have a VI with two SubVIs which are being executed sequently, with the second SubVI waiting for an user event in the first SubVI. The SubVI front panels are open and used as the user interface when they are executed. When I push the stop button on the second SubVI's front panel, I do not want the whole VI to stop, but only that SubVI and execute the first SubVI once again.
    Does anyone have any idea how to achieve that?
    Thanks,
    LordSnow.

    P@Anand wrote:
    LordSnow wrote:
    Hi,
    I have a VI with two SubVIs which are being executed sequently, with the second SubVI waiting for an user event in the first SubVI. The SubVI front panels are open and used as the user interface when they are executed. When I push the stop button on the second SubVI's front panel, I do not want the whole VI to stop, but only that SubVI and execute the first SubVI once again.
    Does anyone have any idea how to achieve that?
    Thanks,
    LordSnow.
    I am bit confused of what you try to achive. How you are executing your sub vi's if you can attach your ode it would be easy to see what you are trying to do.
    Regretfully, I can't upload my code. Therefore, I will try to be more precise in my description. I open the main VI and execute it. This opens and executes the first SubVI, which waits for the user to interact with the front panel. Once this interaction has taken place, the second SubVI is executed which includes pretty much all the code there is. When I did everything I wanted to do in this second SubVI I push the previously mentioned stop button in order to stop that SubVI and that SubVI only, but right now all the VIs stop. My intention is to open the first SubVI again after I stopped the second SubVI.
    Does that help?

  • SubVI appearance problems when upgrading to LV 7 Express

    I'm updating a LV 6 VI to run with LV7 and a new DAQ card, and when my main VI calls the subVIs the windows are supposed to appear, then disappear once the user is finished. Now with LV 7, either the window doesn't disappear or the program keeps bouncing back and forth between the main VI and the subVI and locks up.
    This program works fine on the other computers with LV 6. What's changed?

    OK to start out, try changing the mechanical action of your boolean switches to "Latch When Released".
    That will get you started.
    I would be out of character if I did not mention that the code you have provided is littered with race conditions. My head was spinning when I was trying to follow the functionality of the sub-VI.
    I suggest you post a new question and include your sub-VI and ask,
    "ow can convert this VI such that it no longer uses global variables?"
    Sorry but I do not have the time this AM to wander into the details.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • When playing music from Ipod in my car, music suddenly stops and message appears to restore in iTunes.  After a few minutes, it starts to play again.  I hear a click and the apple logo shows on the screen.  Any ideas??

    When playing music from Ipod in my car, music suddenly stops and message appears to restore in iTunes.  After a few minutes, it starts to play again.  I hear a click and the apple logo shows on the screen.  Any ideas??

    You may need to do a Restore in iTunes.
    Clicking sounds from an iPod that has a hard drive is probably not a good thing.  It is possible that your iPod's hard drive is becoming unreliable.

  • When I start Firefox a bar entitled "Know your rights" appears that contains information about Mozilla but I would like to stop it from appearing.

    The "Know your rights" bar appears below the normal Firefox bars and I can get rid of it by clicking on the X at it's right end. I would like to stop this from appearing when I start Firefox but I don't know how to do it.

    You can check:
    * http://kb.mozillazine.org/Preferences_not_saved

  • Recharging my iPod (3rd gen.) on my 2010 iMac goes extremely slowly (via usb port at the back). This is mainly because recharging stops when my mac goes to sleep. I just can't believe that Apple doesn't have a sollution for this, but I haven't found itth

    Recharging my iPod shuffle (3rd gen.) on my 2009 iMac (OS 10.5.8) goes extremely slowly (via usb port at the back). This is mainly because recharging stops when my mac goes to sleep. I just can't believe that Apple doesn't have a sollution for this, but I haven't found it yet... What's the most efficient way of recharging?

    Purchase a wall charger for it instead. 
    B-rock

  • Spoiler has stopped working message appears when trying to print Gmails

    When I try to print my Gmails from my Galaxy S5 mobile phone wirelessly I keep getting Spoiler message has stopped working message appears.
    I am not very technical and can only use a touchscreen device as I am a Disabled Lady so need help desperately but need dummy language please.
    It scans okay.
    PLEASE COULD ANYONE HELP ME ASAP AS I NEED MY GMAILS PRINTED BY THIS AFTERNOON.

    Hi @dolphinlady13
    Welcome to the HP Support Forums.  I understand that you are getting a message indicating the ‘spoiler’ has stopped working.
    To better assist you, would you please provide some additional information?
    Are you using the HP ePrint app to print the emails? If no are you using an HP app to print the emails?
    Do you still get the same message after you have turned the phone off, waited a full minute and then turned the phone back on?
    Have you tried the solution suggested on the Android Central Forums in the thread titled cloud print. print spooler on kitkat since the Galaxy S5 runs an Andorid operating system?
    Thank you and I look forward to hearing from you.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Howto stop a subvi

    Hi,
    I have a question, I am running a SubVI within a control VI (kind of wizard like with subpanels) and I want to use an abort button in the main VI to stop the SubVI thats still running (just like the stop button within labview (next to run and loop)) Can someone help me...
    thnx
    Bart bakels
    Labview CLD , Engineer/Manager
    Promedes and DSM
    using LV 7.1, 8.0, 8.2, 8.5 and 2009 SP1
    http://www.promedes.nl

    BartB wrote:
    Hi,
    I have a question, I am running a SubVI within a control VI (kind of wizard like with subpanels) and I want to use an abort button in the main VI to stop the SubVI thats still running (just like the stop button within labview (next to run and loop)) Can someone help me...
    thnx
    Bart bakels
    Are you saying that you want to use LabVIEW "Abort" button to stop a VI? If so, instead of using the LabVIEW "Abort" button you use a while loop controlled by a boolean button. then when the user presses the stop button execution of your top level VI will stop. Also, you can use a Global Variable to pass the value of the boolean button to your subvi. Then when the user clicks on the boolean button, the value change will be seen by the top level VI and subVI.
    You should not use the LabVIEW "Abort" button to stop execution of a program. The "Abort" button is intended to be used for development purposes.
    See the attached example and run "Global Variable-Top Level VI.vi"
    Chad
    Attachments:
    Global Variable-example.zip ‏26 KB

  • Audio stops when reconnecting external display [OSX10.10]

    When I disconnect and reconnect an external monitor, the audio stops.
    Audio appears to continue playing, but there is no sound.
    Reproducable steps:
    OS: OSX 10.10 Yosemite
    Hardware: Macbook Pro 13" Retina Mid 2014, 16Gb RAM
    System Information: http://cl.ly/image/0H1p032w0M0w
    1. Laptop connected to external display with Display Port cable
    2. Headphones connected, music playing
    3. Disconnect External display
    4. Reconnect External display
    5. Music stops playing
    Current Workaround:
    1. Stop music
    2. Unplug headphones
    3. Plug headphones back in
    4. Resume music

    Based on this post, I picked up a Ground-Loop Isolator ($17 at my local Radio Shack), connected it, and (so far) it's working perfectly. Dead silence.
    MacBook Pro C2D   Mac OS X (10.4.8)  

  • Application stops when tab is inactive, or application is minimized

    I have an application running in browser and as air(flex3/flex4.1 + air 2.6). Now we noticed the problem that our application upload stops when the tab, in which the application is running during a browser session, becomes inactive. In the air  version similar happens when we minimize it to taskbar. Anyone has some thoughts on how to prevent that flashplayer(10.1) behavior? In both versions the calls are handled async. and the swf, of the browser version, is embeded using swfObject. I know streaming is a seperated topic, but it never appeared to me that a youtube video stoped loading while i switched tabs, so there should be a workaround.
    all the best, florian

    Unfortunately, there is no way to prevent that behavior in the browser.
    Does it really stop?  Or just slow down?
    In AIR, you might be able to set the backgroundFrameRate in a Flex app.

  • Stop doesn't appear on the menu bar on Version 29.0.1. How do I install it?

    Stop doesn't appear on the menu bar on Version 29.0.1 and I can't find the icon in the customize menu. It just seems to have disappeared. I would also like words under the menu icons. Also the reload icon can't be moved or customized.
    I JUST HATE IT WHEN WEBSITES COME OUT WITH A NEW "STREAMLINED" APPEARANCE. IT ALWAYS MEANS FEWER FEATURES AND MORE TROUBLE TO USE.
    HELP!

    Have you tried Classic Theme Restorer? https://addons.mozilla.org/en-US/firefox/addon/classicthemerestorer/

Maybe you are looking for