Tutorial: how to stop a loop 'while' Subvi, which within the main program loop 'while '.

Hi ppl,

I searched through the forum on the topic above, but still don't know how to do this. Maybe one of you can post the solution of this important issue.

I have attached a very simple program: I've done a few while loop as a main program and Subvi as a post-secondary program. Inside the Subvi also manages some while loop. All I want to do is to push the stop button in the main program that will stop the while loop in the second channel; to create a kind of judgment of reference in the main program which influence only the stop button on the Subvi. During this time the loop of the main program will still work.

Thank you.

I modified the code that you have joined. check.

Tags: NI Software

Similar Questions

  • A generated within a loop in a subvi output data can be transferred to the main program for each iteration of the loop?

    Hi LV users,.

    I have a very basic question, I have not succeeded to asnwer using basic considerations.

    I made a sub - vi that performs a scan of current-voltage using a unit of measurement-source Keithley and a loop FOR.

    The subvi outputs 2 tables with my data (essentially an array of voltage and the corresponding current table). I also defined a Terminal at the exit of a group of these 2 tables in order to plot a graph XY - output. Specifically, I indexed this cluster to update after each iteration of the loop FOR, in my sub - vi (the indicator is placed outside the loop, of course).

    My problem is that I want my main program to display the XY-graph in real time, with an update after each iteration of the loop FOR which is in my sub - vi.

    I have a problem because my sub - vi output terminals are available for the main program concluded as soon as the sub - vi has completed its own execution (which is what we expect of sub - vi to do).

    How can I use a sub - vi (because it's handy) and get in the main program in the course of its performance data that are generated from the loops of sub - vi?

    Thanks in advance for your help,

    Yoyo87

    Elements of the queue in the Subvi them put your main VI where you want to display the data and the.

    It is similar to the architecture of producer/consumer. There are examples of it in LabVIEW. The examples work with 2 parallel loops, in your case a loop (the producer) will be in the Subvi.

  • How to stop screen flashing when I go to the itunes store?

    How to stop screen flashing when I go to the i tunes store?

    It is not very useful, but it seems that this problem has been resolved by only showing is not the store at all!

    Not 'progress' I was looking for. Issue still ' live'.

  • HOW TO PASS THE HEX OF THE MAIN PROGRAM VI ENUM, SUB VI ENUM VALUE

    HOW TO PASS THE HEX OF THE MAIN PROGRAM VI ENUM, SUB VI ENUM VALUE.

    HOW THEN IT WILL CHOOSE CORRECT ON SUB VI HEXAGONAL ENUM VALUES.

    Enum values are strings, you must first convert the hexadecimal value to a hexadecimal value chain represtation.

    Then that convert from the enum.

  • Subvi in the main program output data

    Hello

    I'm trying to export data from sub - VI for the main program in real time. But I found the value may be filed only when the Subvi is finished.

    I'm doing some research and I think that using the queue is the best, but the global variable. You can all give me some tip on queue using to transfer data from sub - VI for the main program in real time?

    Thank you!

    No problem.

  • How can u make a mc in this framework the main timeline is on

    How can u do mc change this frame of the main timeline is on?

    For example


    onClipEvent (enterFrame) {}
    If (_root.mc1.hitTest (this) == true) {}
    Play();
    }
    }

    I want as the mc to play the main script not his own screenplay

    Thank you for your time
    Rbr1234

    address thr main scenario as 'this ._parent.

  • How to stop a loop "for".

    Hello

    Do you know how I can stop a loop for? because when I click on the stop switch on my front, the VI didn't stop and continue to perform the loop.

    If you have a newer version of LabVIEW, you can right click on your loop For and show the terminal stop.  This will allow you to stop the execution of the loop For the earlier that you would otherwise based on the N or the number of items in an array of automatic indexation.

  • How to stop instances of a Subvi from data sharing?

    My first experience with a Subvi I created myself has no . The first instance works very well. But when I use a second instance of the Subvi that they interact with each other. They seem to be somehow sharing data.  In other words, when I probe a wire inside a Subvi instances I see values that should be present in the other instance.

    I created the Subvi in literally "manual mode". Everything falls into place as examples of 'LabVIEW Edition student of 8'.

    The code works fine if you use is not in a Subvi. In other words, when I "cut - paste" the code several times, it works correctly. But when I wrap the code in a Subvi I get interaction between bodies. Has anyone else had this problem? What do you have on this?

    Thank you

    You have several problems.

    1. your main VI which calls a Subvi is called USC_SG_subVI, but you posted USC_strain_subvi.

    2 USC_strain-sub-VI, is NOT configured for a re-entrant execution.  Look at the file/VI then execution properties.

    3. you use a node of feedback within the Subvi.  (Which is another variant of a change uninitialized records).  I recommend that you keep the Subvi feedback and make it a part of the master while loop in you main VI.

  • How to stop execution when modal Subvi open?

    Ladies and gentlemen,

    A very simple question: I sometimes modal dialog boxes, which can be closed (which can happen during programming, when logical not completed, or if one of the modal dialog boxes then opened, and then main VI is started). Then, when it happened, so the only way to stop execution is killing LabVIEW of Task Manager. I remember it was something simple how stop running without killing LabVIEW, but do not remember. Can you please give me a hint - how to stop the run in this situation? Yes, I know not Ctrl +. combination, but this does not work in this case.

    See the attachment for more details.

    Andrey.

    Try useful tool of Darren

  • How to stop up to generate a waveform of the entire cycle when click on the stop button

    Dear engineer OR,.

    I have generated three AO signals to control my scanner and data acquisition. Two ramp signals is to control the galvanometric scanner (x and y). A TTL signal is to trigger the acquisition of data. Whenever I click on stop, the ramp stops every time that it is when the button is clicked, what causes a voltage jump when will resume the program again because the ramp will start in the place original (this jump of fast voltage can damage the galvanometric scanner). Could you please give me some suggestions on how to stop after only a waveform of cycle whol's over? The VI I used is attached. The FLIM control.vi is the main vi include Subvi Galvo control.vi

    Thank you very much!!

    Hello, dgql!

    From a point of view purely programming, there are a few ways you could implement this.

    (1) create a conditional stay:

    You can add features to the code such that, once you reach the stop button, the code checks the value of your signal before you actually stop the VI. In pseudo-code: "If the signal is > 0 and less than a certain value, stop." Otherwise, keep the control of signal until the value lies in this range. »

    (2) to reset the signal from the ramp at each start of your VI. This may or may not work with your application, depending on whether you must have the previous value of the ramp carried over.

    Let me know if these are of no help!

  • automatic backup running; tell me how to stop it said please. his treatment of the file every few minutes

    has launched a backup and I forgot now, 3 months, small blue line appears on the left side a page saying "processing file" it throws my dektop for 1 second, then I click and am referred to any page, I was on;

    Please tell me how to stop this and delete its files, thanks a lot
    Aviva running professional XP 2002 SP2

    The system restore before the start date of backup

  • How to stop Nitro file converter to change all the files Adobe

    Recently, I wanted to convert a word document to PDF format and downloaded a free version of the Nitro program, but as the only free part of the downloaded program had to watch as she then asked me to purchase the full program before I can use it so I deleted it from my computer. But before he completed the uninstall is it changed all the Adobe files and documents that I had on my computer as it now changes the file type of any Adobe file or document sent to me as an attachment.  How can I stop it? Drag the manufacturer before the courts sort them? If anyone has any ideas on how to prevent or change what happened to be sent to the email address [email protected]

    Hi 117elk,

    I'm sorry to hear that you are having problems with your Adobe files. But I think it will be an easy fix. You should be able to re - associate files with their correct application names. I'm tons of course what operating system, you are on, but here are the instructions for many:

    Change the programs that Windows uses by default - Windows help

    How to change the default application for a file type. Macworld

    Please let us know how it goes.

    Best,

    Sara

  • How to stop windows from loging on everything entering the stand mode?

    So, I don't want my computer to log off after I put it in stand by mode.

    How do I get there?

    1 set the screen saver - Panel, customize, Screensaver [in the lower right corner of the window]. You can change the calendar and also turn off the setting to sign on again once after that it activates.

    You should then check the opening of session of this parameter in both part

    2 power options, [on the left side of the window] requires a password on wakeup - disable this setting

    3 power options, plan {power} active settings change, change of plan avancΘs, [you will have to click on "view the currently hidden settings] {active power plan}, require a password on wakeup - clear this setting

    Steps 2 & 3 are simply verify that the change has been defined & saved - there should be no problem under normal circumstances.

  • Operation Subvi don't update in the main program

    Hi all

    I'm having trouble with a VI I put together for laboratory research. I try to use two of the Subvi: one writes nine analog outputs through a PCI-6723, the other sends the commands M Code to a linear positioner through COM 4. Both work individually, but when I put in another VI, it seems that the outer loop only runs once. If I set a post and hit run, the track moves to this post but does not meet the additional entries. The tension control is doing absolutely nothing, predefined or not. The goal is that the two Subvi to run in real time. In other words, change the enum of the piece will automatically update the position and moving the sliders of tension with voltage indicators in real time and updated. I tried a few configurations without luck. Maybe it's because I'm trying to use a serial port and a data acquisition?

    I have attached the main VI and Subvi for review. All advice is appreciated.

    'Is it maybe because I'm trying to use a serial port and an acquisition of data?'

    No, that would be a silly limitation of the language

    There are a lot of problems with your application (on the other hand, you use a LabVIEW project to your hand and subVIs), like crazy in the Subvi DAQmx structures.

    The real bug you see, that's the reason why you do not understand how a shift register stores the data: using shift registers initialized to the two subVIs, so overwrite you the values stored in each iteration. You should learn about Global Variables functional and motor action, so you can understand the problem. If you need work on your subVIs (also), you will need to change their behavior. In their recent form, they are not able to do what you want... Do not have a state machine for the subVIs, use actions: Init, check, change, close. Therefore, it is very important that your subVIs only perform one action at a time. Finally, when you stop your hand while loop in your main VI, you call the two subVIs with action command 'Close' to close and delete tasks properly.

    Here's some reading more: http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/td-p/503801

  • How can I create a sub navigation, detached from the main navigation bar.

    I'm in the middle of the development of a Web site that features two areas of navigation. In the upper part of the site I have the main navigation, with House, about, work and communicate with, while in the lower part of the page work, I want to add navigation sub disciplines such as Visual identity, brochures and flyers, annual reports, etc.. It will be the child pages on the work page.

    I can't find the option to detach the navigation under the disciplines of the main navigation. Can someone tell me how I should create this possibility so that the sub navigation will be generated automatically, but detached from the main navigation?

    See you soon,.

    TimNavigation_SubNavigation_Example.png

    Unfortunately two unique sets of generated navigation automatically is not possible currently. An alternative is to create your navigation bar with a menu manual, low browsing with a menu widget, and then disable the top-level pages appear in the menus (on the preferences page, or by right-clicking on a page in outline view). Since there are more pages in the navigation at the bottom, this could at least save time by keeping only the automatically generated value.

Maybe you are looking for

  • TouchSmart 14-n013sa - maximum ram?

    Anyone know the Max Ram for the above please?

  • Need of reinstallation of Windows MCE 2005 CD

    I woud want to reinstall my OS (Windows Media Center 2005) but I don't want to use the recovery cd.How can I buy only the reinstallation of Microsoft CD of Windows MCE 2005? Thank you

  • Satellite L50 - C - 1 L 2 - USB 3.0 does not work correctly

    Hi, the new Satellite L50 - C - 1 L 2 has maybe a problem of USB 3.0. All the componetens that I connect to USB 2 works correctly. But some of these plugged into USB 3 doesn't work. A driver from Microsoft for USB 3.0 extensible Hostcontrolller v 1.0

  • Pavilion p6270z: adding usb 3.0 to p6270z

    Is it possible to add a USB 3.0 port to my PC.  What equipment do I need?  The motherboard is able to manage USB 3.0?

  • Display messages problem

    Dan / Tim Seem to have a problem that arose yesterday and today. I just posted a reply in the thread on the indices in this forum and the answer had to start a 2nd page. The problem is that I do not see the answer on the 2nd page, I just get a blank