stop Subvi nonstop main VI

Hello

I a Vi that has a Subvi within a structure of the event, and this sub - VI runs a measure, and to stop it that I have implemented the code for that ater the measure that ends the program stops, by using the STOP button, which is the same as pressing the run button abandon.  But which also stops the main VI.  What I want to know is y at - it a way to stop this Subvi without stopping the main VI

You should never use the node to STOP unless you use it for debugging.

Your code should follow the best practices of data flow and you can stop all your curls using Boolean logic. Within your Subvi, you will need to find a way to stop the strap using Boolean values. This can be done 1 million different ways according to your code.

Looks like maybe you must specify the Subvi to prevent outside the Subvi? This can be done by using an architecture of the queue waiting, a notifier, or similar. I suggest that take a look to different architectures if you aren't familiar.

Tags: NI Software

Similar Questions

  • Crashes Subvi VI main

    I have a main VI with a front with several indicators.  I unloaded several indicators to a Subvi to my main table less frequented.  I want to start this sub - VI when the user clicks on "more" on my main VI.

    To do this, I created a new event and recorded for a mouse, an event on the button "more".  Inside this event, I put only my Subvi.  I right click and choose the Subvi node installation, then checked the "display front panel, when it is called ' and 'close while initially closed then' check boxes.

    The Subvi launches as planned when I click on "more".  The problem is, once I close the Subvi, my main VI is locked.  I can't do anything at all.  It nothing happens in the Subvi... No loops, no logic... just now, it's just a collection of flags.  If I click on the button "cancel execution of ' in my Sub, and then he quit as my main.

    My suspicion is that - as far as my main VI is concerned - my Subvi never stops running.  How to achieve this?  There is no real indicators user interaction just the Sub... the user it would be watching and then close the window under VI.  So I guess what I want to do is abort only the void VI when the user clicks on the X in the pane of VI.

    Thanks in advance for the help.

    I see exactly what is in your sub - VI of the image.  But I do not see a queue and a Structure of the event.  Or the other of these situations could cause a situation of 'wait infinitely.  The Structure of the event is the likely culprit here however.  In fact, I like to handle the event before narrow Panel if you already have the structure of the event.

  • In the Subvi VI main event

    Trying to raise events from a main vi.

    I created an example vi as a basic unit of a much larger program.

    The high level vi called a Subvi that contains a structure of the event.  The Subvi works permanently and will close when the program is stopped by the user.

    The upper level has controls that are passed to a global and overall can be read in the Subvi, which should trigger an event.  (it is not)

    The Subvi should be able to run as a Subvi or higher.

    For context:

    The project, of which this comes is a test system.  The Subvi prepresents the control panel main for the test system.  We want to automate the test system and so to use as a Subvi main control panel so we can automate a number of individual test.  (Frequency response, gain of linearity, etc..)

    See below for additional attachment that contains the file project and global variable (can attach only 3 files at a time)

    The overall is just a stop button and a cluster that contains 3 Boolean values.

    It does not work, I was hoping someone could explain to me how to do this without making many changes to the existing Subvi.  If necessary, a case statement could be added which is active when the program works as a Subvi, which would contain the code to raise events to the occurrence can cope.

    I'm looking at the code, now, I'll update the congratulations if it works

  • Pass data to Image update Subvi VI main

    I try to get under VI containing a for loop to pass data to an indicator on the main VI update. I followed this explanation...

    http://digital.NI.com/public.nsf/allkb/0F4EA104660C0AF38625726F0069B27E

    .. .and am able reproduce the example with a digital command, but I was not able to extend the example to an indicator of image output. I suspect that I use the control bad, Refnum reference or property. Can anyone suggest corrections?

    Details:
    I use a control reference [line] to a [Picture] indicator of my main VI [Center of manufacturing] to the Subvi [SUB mask display].

    I placed a Refnum control on the front of the sub - VI, he linked to a property on the block schema node, selected the property "Value" and hooked up the output of the image of a VI IMAQ to this property.

    If 'Run of Images' on the sub VI is set to FALSE, a static image 'test0.jpg' must be returned to the main VI. If 'Run Images' is set to TRUE, a loop is supposed to pass 'test0.jpg', "test1.jpg", etc. to the main VI at regular intervals. Instead, the indicator Image is empty.

    Hi MaryamAli,

    I think you are doing everything correctly but you are having your image inside the Subvi so the will of image ever seen in the main VI. Try to remove the IMAQ dispose VI in your TRUE and FALSE cases and see if it works.

    Tim O

  • Stopping Subvi and returns a value of Subvi to MainVi

    Hi all

    I have a MainVI that calls a Subvi. The call in sub - VI of the MainVI is done inside a while loop. If the necessary calculation in Subvi time exceeds say 1 second I want to stop the Subvi and at the same time I want to feed a default value to the MainVI which is supposed to given by the Subvi. With the next iteration, I must call the Subvi again to accomplish my task. Please let me know how this is possible thanks in advance.

    Kind regards

    Magi

    Magi,

    The Subvi terminals will always have a value when the Subvi back.  If you do not set any other value, the value will be the default value. Add a Boolean result to the Subvi to indicate if it has expired or it terminates normally.  That test boolean in primary VI to see if the data value is valid or not.

    The questions you are asking are quite fundamental to how LabVIEW. I suggest you sepnd online some time with the tutorials on getting started with LabVIEW. What you learn, it will be over for the time spent to ask fundamental questions.

    Lynn

  • How to close a Subvi loop Main.vi

    I have a Subvi running (like a pop-up). Inside this Subvi, I have a while loop that will come out once I read a string via a port COM series.

    I was wondering if it is possible to change the value of the loop out button while in

    beside this Subvi. So far, I can stop this sub - VI, with a local variable, but it happens in the same Subvi. I want to know is if we can make outside the while loop from / to another VI.

    I read control references, variables global but still failed to understand this.

    Could someone help me with this issue, please!

    Thanks in advance!

    Hi, thanks for all you answers. I managed to get out of the Subvi using 'Strict Refnum boleean control'. This example has saved my day:

    http://www.NI.com/example/28769/en/

    Thank you very much and have a nice day! Later, I'll try to break out of a Subvi, using global variables and the case of event-driven.

  • Indicators clears when stops Subvi

    Hi all.

    I have a problem with a Subvi, which contains as an output terminal, a graph and a table. When I run the vi everything is ok, but when I stop, erase them and resets to the initial value (0).

    I noticed that if I disconnect the indicators terminals, data remains and do not disappear. Why has it happened?

    Thanks in advance and greetings to all.

    PELICAR,

    When you call a sub - vi, any high level vi, all controls that have no data provided by your high level vi is reset to their default values. To avoid this, you should store your data somehow (using global variables, of the shared variables or records).

    That being said, and because you cycle has a connected to theiteration 1 count terminal, it seems to me you're trying to do a comprehensive functional.

    Shift registers retain their previous value if they are not initialized and you initialize your.

    I enclose a vi with a slightly different implementation. check if this is what you need.

    Hope this helps,

    Paulo

  • Control a Subvi VI main using the event Structure

    Hi all

    I'm moving hand Vi VI Sub values...

    However, my Subvi works with a structure of the event. (Change in value).

    So when I run my main VI and I press the highlight (yellow bulb), the sub vi does not run...

    I'm sure... I m missing something very basic.

    My main and the Subvi operate with a structure of the event.

    Please see my attached files.

    Each event structure listend to a button to calculate different: one on the respective fromt Panel. (Even if they have the same label, they are completely separate!)

    Events are mainly for any user, they won't be triggered if a terminal is written by program. If the front panel of the Subvi is closed, you cannot press the top button.

    Can you explain the purpose of your exercise? You seem to confuse you upward in some misunderstandings based on the flow of data and events.

  • Say a Movie Clip to play/stop on the main timeline?

    I have a main timeline that has a movieclip called "clock". At some point in the main timeline, I want the movieclip to play and at another time, I want him to stop. I can't get the script to control the movieclip.

    Any tips?

    I thank very you much for your time.

    Large. Thank you.

    I set the stop on the first frame of the main timeline for all the movie clips and then when I want to play, they play. Wonderful.

    Thanks a lot for your time for such a basic question.

    Scot

  • Start a second vi without stop (pause) the main vi

    Hallo,

    I would like to start a second a main vi vi. The second vi should run separately so that the user could use functions in hand-vi and the "child-vi.

    Thank you for your help.

    Letting go

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=412491#M412491

    Have a look: you'll just need to re - use 'DynamicVI_Launcher.vi '! :-)

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

    Hello;

    Sorry for my English

    I have to stop to a Subvi my main VI, the Subvi contains a while loop and an event structure, so I need to stop this loop while I tried directly from my main vi, global variable, but it did not work

    any help please or example!

    How about something like this (solution see attachment) using a user event.

    Explore the User Interface--> range of events and dialogue. To display the dynamic event of the terminals in the structure of the event just right click and select 'display the dynamic event posts '.

  • Queue return error out when calling Subvi in vi main

    Hello

    I have problems with the help of queues in a project where it is called a Subvi VI main. After the Subvi call first, when I press any button labview returns following error.

    "LabVIEW: an input parameter is not valid." For example if the input is a path, the path can contain a character not allowed by the operating system such as? or @ ".»

    Please find attached the file explore vi and project. I'd appreciate your comments.  I use the suite of Labview 2010 development.

    Kind regards

    Austin

    Hello Austin,.

    Looks like you post your queue in the sub vi when it ends (destroy force is set to TRUE so it destroys the queue, not only the reference to the queue)

    I tested it by putting a hell structure diagram around the queue of the vi in the sub vi version and it works now without raising an error.

    Setting Force destroy false so that it destroys only a single reference to the queue.

    Chris

  • stop the main timeline in AS3

    I searched the forum and maybe to find relevant solutions, but I still don't understand. How to make simple "stop()", "play()" and check "currentFrame" on the main timeline of an AS3 class file?

    I have an animation of script for Flash AS2 older I'm conversion in AS3 and also import an AS3 swf into.

    Everything works fine, except that I had to remove the "stop()" on the main timeline (if the animation does not loop) and trying to do it from the main .as file in the document.

    I get an error when you try to access the "currentFrame" of the scene.

    HOW CAN I PUT A 'STOP' ON THE MAIN SCENARIO?

    - - - -

    If the banner is your document class, this means that your main timeline must have only 1 frame (because the banner extends Sprite) and this means that it is foolish to check currentFrame and it has no sense to goto any image.

    do you know what you do picking the Sprite class or do you really want banner to extend the MovieClip class?

  • Average displacement Subvi does not refresh the data in time real host VI

    Hello!

    I time real host VI that has evaluate the NI 9215 cRIO block data 9073. He takes analog data and calculates the phase shift. It works well with the connected equipment and displays the results. I need to get the moving average value of phase shift, so I add moving average Subvi, where main VI entries - new value (phase shift measured) and ms and output - average value of travel time. When I run real time host VI it gives me a single data and stop get new data from Subvi. It refreshes not even values measured in real time. So the problem somewhere in the accommodation, with sub - VI. How it can be solved? How can I get real host VI with the moving average value of Subvi update running time?

    Thank you.

    Your problem is that you have a loop that runs until you press the Stop button inside your Subvi.  If you try to use a Global Variable that is functional, you have a few things wrong.

    1. the loop should run only once.  A TRUE to the conditional stay Terminal wire.

    2. the shift register cannot be initialized.  That is how he can keep the old elements in a story.  Use a first call? with a case structure so that you only initialize the table of history inside the loop on the first time the VI is called.

    But if you really want to make your life easier, just use the PtByPt.vi mean.  NOR did all the work for you.

  • Someone help me please understand what is this block? -Call Subvi

    Hi all
    During playback of a sample project a block stopped me. I could not understand what it is... once I click it (offline), it opens a Subvi, while runing the labview, it is clear that he will automatically call the Subvi. My Info is the one to call a Subvi VI main, you must use a static reference of Vi. Can someone help me understand what about this block?
    I am attaching the picture of her and a container VI she also well... Simply open the block diagram of the file: "Caller.vi"... The Subvi associated with this block is fixed as well: "Config.."

    I would like to know what is this block name, how it is related to the Subvi and how the Labview call it automatically. .. I really appriciate any suggestions.

    Thanks in advance

    Concerning


Maybe you are looking for