How to interrupt running subvi with global variation

Hi,all
   I want to use global variation STOP to interrupt the running VI at anytime, but the subVI must be running until executing the WHILE. I knew when one action is  operated in the EVENT case, the other action will not be iperated. My question is how to solve the problem without  POP subVI and the DATA transmitted to MAIN panel. Give me a suggestion, THKS!
  Lioncsu  
Attachments:
Main VI.jpg ‏43 KB
Sub VI.jpg ‏41 KB

Hi Lioncsu,
      In Main, when a Start event occurs, the Value of Stop (False?) is immediately written to the Global (once), and SubVI starts running.  The Start event case won't complete - or write another value to the Global - until the SubVI is done.  I haven't run this, but I think pressing Stop may cause the SubVI to run (again) - for one iteration! 
Attached is a simple VI which uses two loops - one to handle GUI events (the buttons) and one to start a while loop.  Maybe you can replace the while-loop with your SubVI?
Hope it helps!
"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Attachments:
Notifiers.vi ‏51 KB

Similar Messages

  • How can I run MP350 with Windows 8.1 computer? Works OK with Windows 7 machine. Need drivers.

    How can I run MP350 with Windows 8.1 computer?
    It works OK with Windows 7 machine, using drivers from original CD.
    Windows 8,1 machine doesn't find those drivers (which I copied to its C drive).
    It doesn't find needed drivers on the internet.

    Hi Larry-R,
    I see that you made a later post regarding this.  Please refer to the answer on that post regarding your inquiry.
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • How to build a subvi with a path

    Hi everybody
    I am using, in a main vi, a subvi with reentrant execution. Therefore I used a path to indicate the location of this subvi.
    It works very well.
    My problem is:
    When I build an application, and use it on another computer, the file.exe does not execute the subvi, since it does not find it on the specified path.
    How can I change this and manage to have this subvi run by the file.exe?

    Donc
    - le VI est chargé en mémoire dans l'application s'exécutant sur le second PC
    - son FP peut s'ouvrir
    - aucun message d'erreur lors de l'appel
    Mais
    - le VI ne fonctionne pas correctement comme il le fait sur le premier PC.
    En ce qui concerne LabVIEW, tout semble correct. Il s'agit peut-être d'une action spécifique de votre VI qui ne se fait pas de la même façon sur les 2 PC. Utilisez-vous des chemins pour localiser des fichiers?
    LabVIEW, C'est LabVIEW

  • How to setup Business Group with Global Legislation?

    Hi All,
    We are exploring possibility of creating International Business Group with no Legislation Code for our client. The client has operations in multiple geographies.
    I found following document in Metalink
    How an International Business Group be created with no Legislation Code? [Doc ID 851711.1] It mentions "Global legislation must be installed in order to set up a Global Business Group. The business group is created just like any other, but with Global legislation selected. You will need to use Global responsibilities to access it."
    When we tried to create a business group with Legislation Code as 'Global" we did not find any such Legislation Code in dropdown of *Business Group Info classification.
    Has anybody implemented Global Legislation before? Any information on Setup Steps, Challenges faced, bugs and issues faced with other modules especially OTL would be appreciated.
    Thanks in Advance,
    Amit
    Edited by: user10450466 on Jan 22, 2010 12:23 AM

    I wasn't aware there's any such thing as 'Global Legislation' in HRMS and I think the Metalink Note you mention is misleading. There are multiple concepts here being mixed up.
    hrglobal and Data Installer
    Oracle deliver legislative seed data through hrglobal and Data Installer. When a DBA runs this they pick the legislations they wish to install. That includes legislations such as US, GB and all legislations where Oracle HRMS deliver seed data (Fast Formulas, balances, etc). One of the options here is 'Global', which ensures that common seed data used across multiple legislations is installed. This process does not create new legislations - it just creates the seed data used by those legislations. 'Global' is not a legislation - it just means that the relevant seed data (Fast Formula, balances, etc) is typically delivered without the legislation_code column being populated.
    Business Groups and Legislations
    A Business Group is intrinsically tied to a Legislation Code - they have a one-to-one relationship. When you define a Business Group you have to pick a Legislation and that list of Legislations comes from fnd_territories_vl. The list in fnd_territories_vl has nothing to do with hrglobal or Data Installer. There is no 'global' territory.
    International HR & Payroll
    If you are implementing HRMS in a country where Oracle HRMS do not deliver any specific legislative seed data or functionality (ie, the legislation isn't listed in Data Installer) you have the option of using International HR & Payroll. This allows you to install generic seed data into the legislation of your choice, which is again a list from fnd_territories_vl. Again, there's no concept of 'global' legislation. Information on that is available here:
    International HR and Payroll [ID 261452.1]
    International Implementations
    Customers, like yours, who are rolling out Oracle HRMS to multiple countries have a big choice to make: single or multi Business Group. If you opt for one Business Group you create employees in multiple countries all within the same Business Group. That Business Group is tied to just one of those country's legislation codes - which you go for is up to you but that's generally the Legislation Code of the International HQ. The problem with this approach is that you can't leverage the legislative-specific functionality for each of the other countries.
    If you opt for multi-Business Group you typically define one Business Group for each country so that you leverage the legislative-specific functionality for each country. This is generally more popular but doesn't suit everyone: you can have problems with employees transferring from one country to another, etc.
    Global Structures
    Oracle HRMS has forced you to tie a Business Group to a legislation code for many years. As mentioned above, this causes a number of problems. To mitigate those, Oracle have delivered a number of enhancements that help you model global businesses:
    1. Global Organization Hierarchies
    2. Global Security Profiles
    3. Global Overseas Deployment functionality (nickname GOD/GOLD)
    4. Cross Business Group profile option
    5. etc
    I hope that helps.

  • How do I run Safari with a proxy on start up by command line?

    Hello,
    I am using a piece of software called Sahi to perform automated testing of websites. It uses a local proxy to accomplish this task, so it runs the browser with parameters needed so that that instance of the browser is running with the proxy settings. For some reason it's not correctly setup by default with Safari on the Mac. But it has a configuration file where you can set the command line parameters that it runs the browser with.
    So when I use Sahi in its default configuration, it doesn't work because the proxy is not configured, and I get an error ( http://sahi.co.in/forums/discussion/4607/sahi-doesn039t-work-with-safari-5-0-1-o n-macosx )
    So I need to set the proxy. When I set the 127.0.0.1:9999 proxy in the System Preferences it works. My question is how do I run Safari so that it provides the proxy settings as a command line option?
    This way I can add the command line option to the Sahi configuration file so that it runs Safari properly. I don't want to have the proxy settings system wide because I need other programs to work. I don't want to have the proxy settings set for Safari permanently because I also need to be able to run Safari normally outside of this special context.
    Any assistance would be appreciated.

    I should mention this is Safari 5.0.1

  • How I can run Firefox with enabled Responsive design mode from command line?

    I trying to find a way for running Firefox with already enabled Responsive mode with predefined resolution (for selenuim testing) for standartizing a viewport size in different OS`s.
    Thanks!

    These are all the command line options [https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options Command Line Options]

  • How to re-run query with bind values

    Hello,
    I have a sql statement which I obtained from statspack report. After looking at explan plan, I created an idex. Now I want to re-run the query and exame the explan plan again and see if newly created index helped. But how to re-run the query when it contains bind variables? Thank you.

    Have to define and exec them first (if you know the values; null otherwise, so if you can get values, you will have a better idea of what takes place).

  • Running SubVIs with state machines in parallel

    Hi,
    I'm new to labview, working on it for a couple of weeks.
    I'm building an application where there are a number of identical elements atht each is controlled by an identical state machine which is independent from all others.
    My problem is how to place each state machine in a subvi and running them in parallel.
    Each of the subvi has a while loop for the state machine, and the program gets stuck inside never entering another subvi.
    Is there an elegant way to run a couple of SubVIs each holding a state mchine in parallel?
    I come from the VLSI world so there is no problem implementing this kind of logic in hardware description language but the labview way to do it eludes me...
    thanks you very much for any help,
    Eyal.

    braxat2000 wrote:
    Hi,
    Thank you everybody for your kind help.
    The problem was solved and my application is OK now.
    For future reference,
    I used the execution reenter subvi to allow multiple instances of it in parallel, and added a global variable that the subvis can change, and the main can read from.
    Used semaphores to make sure correct parallel write to common sources.
    Cheers,
    Eyal.
    Great solution- but how to avoid race conditions in the global variable?  Globals are notorious for causing headaches, nightmares and nausea so if there is a way to avoid them and enforce a bit of cause- effect its highly desirable.  In this case you have clones of a re-entrant vi running in parallel so you CAN'T use a functional global (the most common solution see Ben's famous Action Engine nugget)
    Since we can't enforce data dependence we need something else as a cause-effect team..... Change event dependency would be a good substitute.  Two methods for getting this type of dependence would be a dynamic event or my favorite the "Named Queue"  set the data type of the named queue as a cluster of instance of source and data from your global and the main loop will be able to see EVERY write to the queue AND the source.  Moreover the queues datatype can be expanded to offer any information the main vi needs to be a good executive. In fact a new sub vi that "monitors status" of the clones would make the application highly scalable and robust. 
    Jeff

  • How do you run procedure with declare on sql plus

    Hi i am a newbie in sqlplus so please forgive if my question sounds to0 silly as i was watching a tutorial on sqlplus procedures i know how to run a simple IN procedure like
    create or replace procedure inparameter
    p_name IN VARCHAR2
    )AS
    BEGIN
    DBMS_OUTPUT.PUT_LINE('Hello' || p_name);
    end;
    to run
    start inparameter;
    procedure created
    set serveroutput on;
    exec inparameter ('newbie');
    hello newbie
    procedure successfuly completed
    but now i have a procedure with a declare
    now wich from what i see on the video tutorial as two box to create procedure and on the next the declare i dont know if i am meant to put them together and run it as one this how it looks like
    DO I RUN THE FIRST BOX AS MY PREVIOUS PROCEDURE DESCRIBED ABOVE (start procedure, then exec procedure)
    then run the second box which is the declare as the same way or do i put the all code in one single box (start declare then exec declare)
    BOX 1
    Create or replace procedure addition
    P_A IN NUMBER
    ,P_B IN NUMBER
    ,P_C OUT NUMBER
    )AS
    BEGIN
    P_C := P_A +P_B;
    END ADDITION
    BOX 2
    declare
    x number;
    addition (5,5,x);
    dbms_output.put_line('the result is' || x);
    end;
    the tutorial can be seen on this youtube link
    [http://www.youtube.com/watch?v=Vvn30o_ctpk&feature=related]
    fastforward to about 9mins 18 to see the boxes that i mean
    sorry in advance if its a stupid question

    You have to create the first procedure (addition), then run the pl/sql block:
    SQL> Create or replace procedure addition
      2  (
      3  P_A IN NUMBER
      4  ,P_B IN NUMBER
      5  ,P_C OUT NUMBER
      6  )AS
      7  BEGIN
      8  P_C := P_A +P_B;
      9  END ADDITION;
    10  /
    Procedure created.
    SQL> declare
      2  x number;
      3  begin
      4  addition (5,5,x);
      5  dbms_output.put_line('the result is' || x);
      6  end;
      7  /
    the result is10
    PL/SQL procedure successfully completed.The procedure is stored in the database, the pl/sql block is anonymous, it's not stored in the db.
    Max

  • How to create a template with global buttons and copyright?

    Hi,
    We are trying to rebuild applications using 11G. In 10133, we use panelpage as the base of the template. With Jdev11g, I cannot find the panelpage component anymore. Then which component should we use and how to start with it? Is there any article talks about it?
    Thanks,
    Annie

    Hi Annie,
    Indeed the panelPage layout component is not present in 11g. In the other hand, for 11g we have done a lot of improvements for templating JSF applications. You can find an article from Steve Muench here http://www.oracle.com/technology/oramag/oracle/08-jul/o48frame.html
    Basically in order to replace your panelPage you can use a PanelGroupLayout's facets or the ones from the panelHeader.
    Goodl Luck
    Juan C.

  • How to call a subvi with event controll?

    Hi:
         I got a control vi written extensively by front panel events. I want to use it as a subvi,  can I  fire  a  event trigger programmably by anyway?
    Thanks

    菊花烧饼 wrote:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=134729&query.id=80280#M134729
     I didn't sure waht you means,maybe the link have some help to you
    Really, it is ireelevant to this post, but very much needed for me, because I was searching for calling a .VIT dynamically.
    Thanks for that.
    BTW, what is your name ? It is showing 4 squares.
    But, I hope this is not your name.
    - Partha
    LabVIEW - Wires that catch bugs!

  • How to interrupt running PS batch or script?

    Is there any shortcut in Photoshop or Bridge to stop running script or batch? I tried the usual suspects like Esc, Ctrl-C, Ctrl-Break and none worked. I am running Dr. Brown Services and by mistake I let it process 850 photographs instead of 34... The script has finished, but I would like to know for next time...
    Thanks!

    you could try to kill the whole application by pressing Ctrl+Alt+Delete and end the task from the Task Manager

  • How to run servlet with tomcat

    I have a probrom that how can I run servlet with tomcat?
    I have new a folder classes in webapps\root\WEB-INF\,and put the .class
    programme in it ,but http://localhost:8080/servlet/HelloWorldExample
    can't run ,it give me a error than http:404 not found.
    could you tell me how i can solve the problem.
    Thank u very much.

    Hi,
    Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
    Regards

  • How can I run a SubVi in background when a sequence is running in the main VI

    What I want to do is this
    When I push a button on the main VI, a SubVI (#1) must run and take data.
    At the same time, a sequence, in which there are other subVIs must run.
    My problem is that the subVI #1 does not run when I push the button. The sequence is running well. How can I run both the sequence and the subVI at the simultaneously?
    Solved!
    Go to Solution.

    Hey Hugo,
    Sounds like you'll just want to do some parallel loops. I'll attach a screenshot of a VI that has a sequence where the counter goes up to 3, then restarts, each time it reads the iteration count from the subVI above. (The subVI is just a while loop with the iteration count attached to the global)
    Each iteration of the sequence shows an increased count from the subVI via a global variable.
    Is this what you are looking for?
    Keep in mind that I just threw this together to show functionality, its got a lot of rough edges to it.
    Message Edited by Chris_VH on 03-30-2009 03:59 PM
    Chris Van Horn
    Applications Engineer
    Attachments:
    iteration.jpg ‏43 KB

  • How to call a subvi to run in background?

    i have a timed loop which is gathering data and storing it in an array.  when the array reaches a certain size, i would like to store it to a file while continuing to process new data into the array quickly.  how can i pass the array to a file storage vi from within the loop without preventing the loop from continuing to iterate until the file access is complete?  in other words, i would like to pass the data out of the loop and have the loop continue to run at the same rate while the data is written to a file as a lower priority task.
    thanks.
    Ben.

    Hi Ben,
          ...well, last-things first...
    > if i call a subvi with an invoke node, i can set "wait until done" to false.... but then how do i pass the data?
    Once you have a VI reference, you can us the "set Control Value" method to hand your array to the dynamically-called sub-VI, however...
    What happens if the sub-vi doesn't finish by the time another 2D array is ready? (I know that's not supposed to happen, but what if?)
    I think having a queue to which the entire 2D array is written as a single element would be better, and I doubt that launching a sub-vi and passing an array would be any more efficient than writing to an existing queue.  To be honest, I don't know whether the call to the sub-VI will pass the array by value or by reference.  If by value, then a copy is being created - why not create it in a queue?  If by reference, then you have two sections of code writing to the same buffer at the same time - opening the door for data-over-runs.
    In the old days, code took a big performance-hit by using Globals this way - frequent writes/reads.  Your application seem to fit a "Producer/Consumer" paradigm - which is routinely implemented using queues.
    With that much data, I'd be looking for ways to keep it in binary format for Excel - (LabVIEW uses a conventional binary representation for storing floats) - I'd be surprised if it isn't possible to keep it that way.
    If anyone else has ideas to share, I'm happy to step aside.
    bs05442 wrote:
    here's a little more about my situation, and why i am not using a queue--
    i am running two instances of the same dynamometer control application to allow a user to control a pair of dynos for tracked vehicle testing.  each instance of this vi is gathering status and measurement data off a CAN bus.  i want to log this data as well as (in the future) data from other control VIs running on the same computer.  so i set up a global variable to which each vi writes it's measurement data, and i have a logging application periodically (up to 100Hz) capture the status of the entire global as a new row in a 2D floating point array.  because i am adding a couple dozen elements each time the logger cycles, i did not want the performance hit of dynamically resizing the data structure to which i was storing the data, so i predfine the 2d array and then use an integer to store the index of the next row i want to write to.  the problem comes when i fill up the array (64k lines, the most that excel will process from a csv file)--i would like to store it to a file without inturrupting the logging, but the conversion from float to string plus the file access time takes up too much time to handle inside an iteration of my logging loop.  so i'd like to pass the array to another task which would take care of converting and storing it in the background.
    i'm afraid if i store the data in a queue, the application might slow down once the queue gets too large, and i don't want to bog down the other control vis that are running on the same machine.  if i call a sub vi to write that data, the current loop iteration does not complete until the file write is done and i miss a few periods of data.  if i want to  use a seperate  loop to monitor the array size and perform the file access, i need to make the array available to both loops, which seems to require making it a hidden control on the front panel.... but then i have to access this large data structure via local variables, which will give me a huge memory hit, right?  so i think what i would really like to do is pass the entire contents of the array off all at once to another vi, then let that vi store the data in the background while the fast loop continues to begin filling up its array again.  if i call a subvi with an invoke node, i can set "wait until done" to false.... but then how do i pass the data?
    thanks for any advice...
    Ben.
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

Maybe you are looking for

  • Logical font special characters in AWT Choice

    Font FONT=new Font("Dialog",Font.PLAIN,12); String TEXT="re\u0123istr\u0113tiem"; TextArea textarea=new TextArea(); textarea.setFont(FONT); textarea.setText(TEXT); this.add(textarea); Choice choice=new Choice(); choice.setFont(FONT); choice.addItem(T

  • Latest nvidia drive upgrade crashes gnome-shell

    Hi, After latest nvidia upgrade: [2015-04-22 22:25] [PACMAN] Running 'pacman -Syu' [2015-04-22 22:25] [PACMAN] synchronizing package lists [2015-04-22 22:25] [PACMAN] starting full system upgrade [2015-04-22 22:26] [ALPM] transaction started [2015-04

  • Coherence extend Proxy service with no storage.

    Hi I am implementing coherence where I have the requirement as follows. 1. Create two Coherence Servers in Weblogic console. These are cache stores using replicated cache scheme. 2. Create tow Coherence servers which acts as proxy. These should not c

  • Running JFrame on browser

    I wrote a program that makes small calculations in JFrame. My question is, how can I integrate it in a browser like JApplet?

  • Problem: Jstl update query with Jquery script

    Hi all, i'm writing a jsp page with this 3 star rating Jquery script to show and vote some <div> (results) .         <script type="text/javascript">                                     jQuery(document).ready(function($) {