Execution in new thread

I have a Sequence File composed of a Mainsequence & Subsequence.
Inside of the MainSequence, I called a Subsequence in a new thread.
Now, I want to run Subsequence until the Mainsequence triggers stopping of this Subsequence.
Any suggestion on how to do this? By notification, passing of variables, etc.?

xxxNOAHxxx wrote:
Now, I want to run Subsequence until the Mainsequence triggers stopping of this Subsequence.
Your subsequence contains a loop?
Does the "trigger" only prevent the subsequence from further looping or does it immediatly terminate the subsequence?
How about reporting?
How long does it usually take the MainSequence to generate the "trigger"? How many steps execute in the subsequence till that moment (referring to memory issues because of result collection)?
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.

Similar Messages

  • Step as new execution or new thread

    is there is a  way to make a single step  to run as a new Thread or execution . ?
    or  it could be only done through  a Seq Call(which runs as a separate sequence thread )

    Hi Aparab,
    Except for Run VI Asynchronously step, which can run a LabVIEW code module in new thread, there is no option provided for running individual steps in a new thread or execution.
    -Needhi

  • TestStand 2010 Memory Leak when calling sequence in New Thread or New Execution

    Version:  TestStand 4.5.0.310
    OS:  Windows XP
    Steps to reproduce:
    1) Unzip 2 attached sequences into this folder:  C:\New Thread Memory Leak
    2) Open "New Thread Memory Leak - Client" SEQ file in TestStand 2010
    3) Open Task Manager, click Processes tab, sort A-Z (important), and highlight the "SeqEdit.exe" process.  Note the memory useage.
    4) Be ready to click Terminate All in TestStand after you see the memory start jumping.
    5) Run the "New Thread Memory Leak - Client" sequence.
    6) After seeing the memory consumption increase rapidly in Task Manager, press Terminate All in TestStand.
    7) Right click the "While Loop - No Wait (New Thread)" step and set Run Mode » Skip
    8) Right click the "While Loop - No Wait (New Execution)" step and set Run Mode » Normal
    9) Repeat steps 3 through 6
    I've removed all steps from the While Loop to isolate the problem.  I've also tried the other methods you'll see in the ZIP file but all cause the memory leak (with the exception of the Message Popup).
    I have not installed the f1 patch, but none of the bug fixes listed appear to address this issue.  NI Applications Engineering has been able to reproduce the issue (with Windows 7) and is working on it in parallel.  That said, are we missing something??
    Any ideas?
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs
    Solved!
    Go to Solution.
    Attachments:
    New Thread Memory Leak.zip ‏14 KB

    Good point Doug.  In this case parallel sequences are being launched at the beginning of the sequential process model, but I'll keep that in mind for later.  Take away:  be intentional about when to wait at the end of the sequence for threads to complete.
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs

  • What is the difference between new thread and new execution?

    What is the difference in creating a new thread and a new execution. Basically, what is the difference between thread and execution?

    Try this link...
    http://zone.ni.com/devzone/cda/tut/p/id/4823
    Thanks,
    PH

  • How to call a sequence in a new thread from C++ dll

    Here is what I am trying to do:
    I implemented a dll that monitors network traffic, and it also supports message handlers that can be triggered when a specific message has been received. Essentially the receipt of a message is like an event causing additional code to be executed. What I need to do is have the message handler in the dll call/execute a sequence (either is the same sequence file that originally called the dll, or in a different sequence file). Also I want the sequence to be executed within the same execution object for the purpose of result collection and report generation. I am expecting the dll to have to launch a new thread to call a sequence because of the asynchronous nature of the message received event.
    There are easier ways to achieve the same result, but one of my goals is to make it easy for a test developer to configure a message handler, by having only one step in their sequence to configure the message handler. I want the rest to be transparent to the user.
    I am unsure about how to implement this feature, so I am asking for any examples, ideas, comments before I start trying things out.

    Assuming that I understand your question correctly, it would seem to be the best way to do this would be to pass the Execution object to the DLL (either through a direct pass of the Execution object or passing the sequence context, from which you can get the Execution).  Then simply call Execution.NewThread, specifying the SequenceFile object (accessible from Engine.GetSequenceFileEx) and then passing the Thread object out as an output.  Your sequence file in which your DLL is called could then simply have a Wait step which is configured to wait on that Thread object.  What happens in this case is that the results are collected for that thread (which is being executed asynchronously) and returned as the results for the Wait step.
    Although you are probably not using LabVIEW, I have attached an example of this in LabVIEW that might be helpful just for seeing the flow.
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    thread_test.seq ‏32 KB
    testthread.vi ‏19 KB

  • Calling sequence in a new thread multiple times gives debug warning "reference not released properly"

    Hi,
    I am including steps inside a sequence which calls sub sequences in a new thread. After calling each sub sequence in a new thread, I am putting Wait step which is configured to wait for the respective sub seueqnce to complete its execution. When I include these steps (call a subsequence in a new thread and then configuring wait to complete it) once, it executes properly but when I includes these steps twice, I get debug warning when I close Teststand sequence editor. Due to this behaviour, when I run this sequence through operator interface (Simple OI), I get run time error R6025.
    I checked if there is any object reference which might not be released, but could not figure it out here. Please see attached sequence and the debug warning message.
    Used version: Teststand 4.0.1, LabVIEW 8.5, Windows XP
    Kindly help.
    Thanks in advance,
    Nirmal
    Attachments:
    Sequence_new_thread2.seq ‏37 KB
    Debug Warning2.JPG ‏34 KB

    Hi Nirmal,
    Thanks for the detailed instructions. I tried exactly what you said and I still do not see the leak. The problem is likely specific to something customized on that machine or in the very least does not happen every time or on all machines. I'd recommend trying to narrow down by eliminating the possibility of an unintended customization. If you can try installing a clean install of teststand on a clean machine and see if you can still reproduce the problem then that would help narrow things down a little. If you can't reproduce it on a clean install on a clean machine then I'd start looking at what's different on the machine you can reproduce it on. You could remove your config files to eliminate customizations to settings such as search directories. You could remove files from your components\User directory to eliminate the possibility of using those. Just a few ideas. Other people might have some other ones.
    -Doug

  • Suggestion to improve post messages for new threads

    Hi all,
    Is possible to add some 'banner' in the top of the screen of 'Post Message: New Thread' to help and improve new posts? Example:
    Please, take care of:
    1. You must place a descriptive name for the thread. Avoid ambiguous names (like: "Help me") or imperative names (like: "Help me now!!, i'am in a hurry")
    2. You must put enough information to prevent the initial first response is asking for more information
    general:
         - database version
    table issues:
         -full description of table (column names, datatypes,...). Scripts of creation for tables.
    performance issues:
         - execution plan.
    data issues:
    - post some example data. Scripts of insertion of some minimal data.
    3. You must put formatted code using 'code' tags, enclosed by '{' and '}'; start tag and end tag are the same,you don't need to put '/' in
    the close tag.
    Note: I know there a FAQ Section (very good) but a lot of people don't follow it. Maybe, a solution could be some minimal recomedations on page 'Post Message: New Thread'.
    Regards,
    Edited by: Walter Fernández on Nov 1, 2008 12:06 PM

    I agree that if the title of a post was done last instead of first, that we would perhaps see an increase in titles that actually make sense. However, I wonder how many would remember to tab (or click) to the Subject window to type in the title and just close the thread because they are done typing their problem. And I somehow doubt it would deter those that put "PLEASE HELP!" and "URGENT-MUST HAVE ANSWER NOW!" from continuing to do so.
    And lastly, I don't think Jive allows that much customization of their software. Alas, we must live with those that "don't get it," and simply choose whether we will answer any particular post or not.
    It is hard to educate the masses. Sigh.

  • GUI freezes when new Thread object start()ed. Neat, brief code included :)

    The title says it all really.. I have the code below in a method startScan() that is called when a button is pressed. The thread executes fine, but the GUI locks up while the thread is executing. I don't really understand why, since a new thread is implicitly separate from the event dispatch thread.
    Must I use a SwingWorker to get things working? Would someone be kind enough to explain why, if this is the case?
    private void startScan() throws InterruptedException {
              final Runnable breadthFirstComparer = new Runnable() {
                   /** Sleep interval used when scan paused */
                   private int interval = 1000;
                    * Kills the current thread
                   public void stop() {
                        scanProgressLabel.setText("Scanning complete");
                        scanComplete = true;
                    * Sleeps the currently running thread if user has paused the scan,
                    * otherwise initiates comparison of the trees' next depth node sets
                   public void run() {
                        while (!scanComplete) {
                             while (scanPaused) {
                                  try {
                                       Thread.sleep(interval);
                                  } catch (Throwable exc) {
                                       Gecko.logException("Scanner thread could not be paused", exc);
                             compareTrees();
                        // Stop thread execution once scan is complete, and disable
                        // scanner-related buttons
                        toggleScanButton.setEnabled(false);
                        stop();
              scanner = new Thread(breadthFirstComparer)
                   public void start() {
                        scanProgressLabel.setText("Scanning in progress...");
                        breadthFirstComparer.run();
              scanButton.setEnabled(false);
              scanner.start();
         }Many thanks.

    it's getting really irritating that pretty much every thread out of the last
    20 I've made, you've criticised me for not posting an SSCCE. How do you think I feel. I'm donating my time to help you solve a problem, but you are not willing to spend 5-10 minutes to post a SSCCE so that we can fully understand what you have done and what the problem is.
    You don't have to post a SSCCE if you don't want to. Thats fine, I just won't answer your questions.
    what's the point me spending 30 minutes or more my end creating an
    SSCE, and you spending 10 minutes or more compiling, running and analyzing it your end?It should not take 30 minutes. If it does it just goes to prove that you don't really understand what you are attempting to do. And if you don't know what you are doing how do you expect us to guess what you are doing? One of the benefits of a SSCCE it to help you learn to develop problem solving skills by learning to simplfy the problem.
    Also, what if we can't figure out the problem based on your verbal description of the problem? If you post code it gives us the option of compiling and testing the code if we so desire. Without the code we give up and move on to the next question.
    but since the simple information that you've provided, and the chunk of code that Michal so kindly donated, are likely more than enough of an explanationThis time we were able to guess what the problem was, but that is not true in all cases. You seem to think that we are all miracle workers, that you can place a couple of lines of code in front of us and we can automatically tell whats wrong. Well, thats not true (at least for me). Many times I use my problem solving skills to solve the problem.
    I really should learn to scroll down and read all the posting before replying. es5f2000 pretty much said it all for me.
    Message was edited by:
    camickr

  • Teststand New Thread VS LabVIEW "Call & Forget" Asynchronous call

    Hi everyone,
    Here is an example taken from the ni.com website showing how to use LabVIEW to post a TestStand Notifier.  I have modified the example to fit the situation I needed to use it for.  I have an example which works fine (When I use a TestStand new thread to launch the Notifier VI) and an example which does not work (When I use a LabVIEW "Call & Forget" Asynchronous call to launch the Notifier VI).
    I would like to understand why it doesn't work in the second situation. The reason why I would prefer the 2nd situation which currently doesn't work is that I try to eliminate all multi-threads from an obsolete sequence written by someone else a few years ago so that I can troublesoot it and update the code to make it work with today's new reality.
    Also, for my personal knowledge.  I don't understand why the second strategy doesn't work.  The Testsand notifier reference is the same and hadled the same way.  I have included my example files with the 2 situations in seperate sequences files.
    Thanks in advance to the person who will be able to enlight me.
    Nien 
    Solved!
    Go to Solution.
    Attachments:
    New Thread Or Dynamic Call.zip ‏41 KB

    Hello Nien,
    This isn't a TestStand issue.  I suggest you take this to the LabVIEW forum.  Looking over your code your Notifer and Forget.vi is dependent on the notifier.vi.  So it's not necessarily anything wrong with the sequence steps but actually within your LabVIEW code itself.  One suggestion is to insert a simple error handler.vi in your Call Notifier and Forget.vi.  You have error wires connected to the functions itself, which is good practice but you don't have anything to inform you if an error occurs or not.  I would suggest you to run try to debug your LabVIEW code, such as using highlight execution, while you're running your code so you know where exactly the error is happening.  
    Thanks,
    Jonathan R.
    Applications Engineer
    National Instruments

  • How can I create a new thread to run PulseOutput.VI

    Hi:
      I use NI-94729(cDAQ system) to generate pluse and want to output  pulse continuously and to check the pulse is 500Hz.
      In TestStand, the steps as follow:
      1: Call PulseOuput.vi to generate 500Hz pulse, VI use Finite Mode to generate pulse.
      2: Verify the pulse is 500Hz.
     Howerver, after the first step finishes, the pulse output stops, te 2nd step is failed. If a Continuous Mode is used in PulseOuput.vi to generate pluse, the 1st step can't finish.
    Thanks a lot!

    Hello MotionBoy,
    There are two ways to go about creating a new thread to run a step.  The first is to create a new sequence, into which you put the LabVIEW step you want to run and any other steps that may go along with it.  Then use a sequence call step to call this newly created sequence.  Set the Execution Options of the Sequence call step to 'Use New Thread.'  This will allow you to run a set of steps in a new thread, not just a VI.  The second method, which is only available for a LabVIEW VI, is to use the “Run VI Asynchronously” step.  This can be accessed if you right-click within your sequence and select Insert Step » LabVIEW Utility » Run VI Asynchronously.  This step will allow you to call a VI and have it automatically open in a new thread.  You can further customize this step by opening the configuration menu in the Step Settings.
    To address the current behavior of your steps I would like to know if the modules in steps 1 & 2 pass data between them or it would be desirable for them to do so?  If so you are going to need a more complex synchronization structure such as TestStand/LabVIEW queues. There is a simple example you may want to look at in the TestStand examples, under the Synchronization folder that demonstrates how to use queues. Otherwise the above solution should be all you need.
    John B.
    Applications Engineer
    National Instruments

  • How to let new thread to access EJB

    I start new thread in Servlet class and I want this thread to call EJB business method but I get following error:
    javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:"
    Probablly because thread has no credentials and so on. I know this concept violates J2EE specs but I don't know how to make timer to call business mathod every N minutes (I use J2EE 1.3 so I can't use Tiemr EJB).
    I suspect that this new thread has no credentials and no role. What happens if I set run-as some role in servlet? As I saw new thread still has no credentials and role.
    Can anyone suggest me how can I set credentials to new thread so it can call EJB business method or how to implement timer service in J2EE 1.3.

    I start new thread in Servlet class and I want this
    thread to call EJB business method but I get
    following error:
    javax.naming.NameNotFoundException: Name comp/env/ejb
    not found in context "java:"It may happen because you'r new thread doesnt have information (JNDI environment) about EJB references.
    Can anyone suggest me how can I set credentials to
    new thread I guess it's server specific.
    so it can call EJB business method or how
    to implement timer service in J2EE 1.3.Don't use EJB reference. Lookup EJB by it's global JNDI name.

  • As Requested New Thread DSL low speeds and drop outs ref: Anthorny Verizon.

    Please see post by Jerrold concerning the form for information requested, I have never been able to fill this out. Note also I had to sign in three times just to access your private letter to me today.
    Here is a summary of problem:
    When my line was first installed line speed was always between 9 to 12 Mps, which is fine for a 15 Mps line, sometimes would even go higher, so line was ok.
    In October 2012 my line speed dropped to about 5 to 7 Mps, I contacted support and repairs were attemped, but did not correct the problem in fact problem became worst.  My line speed dropped to about 2 to 3 Mps.
    Now from October to end of November, all repairs did not correct problem.  I was told by chat tech support that the problem was being worked on and there was an open ticket.
    In December my line speed returned to normal speed was between 9 to about 13 Mps.  No one had contacted me about this so I again contacted chat tech support who said my line had been fixed and there were no open tickets so have a nice day.  I accepted this at face value and accepted that my line was now ok.
    In January 2013, My line speed dropped again to 2 to 3 Mps.  I contacted chat tech support who tested line and put in a repair request.  No one had responded back to me and a week later my line started to drop in and out losing the connection completely.  I again contacted tech support who told me they had no open tickets on my account, they tested line and while we were talking on voice connection my phone started to have heavy static, both my DSL and Phone dropped out at that point.  Tech support called me back and said he was putting a repair request and that my line had problems. That night Tuesday January 29 my Phone and DSL both died, no dial tone on phone and DSL showed only power light on.  Contacted tech support by a friends cell phone and informed them of this, was told ok it would be fixed by open ticket for next day.
    Repair was to be made on Wednesday January 30, no one showed up, called tech support and told repair would be made on Thursday.  Thursday late repair person showed up around 4:30 or 5:00pm, landlord gave access to building.  I did not know they were here at all, when he told me( my landlord) I tested my DSL and found it running at 1.7 Mps or below that.  When I attempted to call tech support found my phone was still dead, no dial tone at all.  Contacted chat tech support who told me ticket was still open and would be fixed by Friday, or Monday.
    On Monday, phone still dead, DSL running at 1.7 Mps contacted chat support who had me take a phone to the junction box outside of building, plugged in two phones to this no dial tone at junction box (both phones work ok checked using a neighbors phone jack)  should note that on the outside of building there are two junction boxes, but one has lock on it so could not use that one.  Anyway told that DSL could not be fixed until phone is repaired.  Tried contacting phone repair and all I get is auto wait then line drops using a neighbors phone and pay phone my is dead.
    Tuesday again contacted chat support now told to bad, until phone is fixed cannot help me ( was'nt that suppose to be done in first repair, fix phone and DSL given both were reported dead).
    So why am I upset well look at history I now sit with No Phone service, DSL running way below what I pay for and a tech support who has said to bad not our problem.  I also do not want to hear that my line does not and cannot support the speed I pay for ( it has shown to support that speed at beginning of install up to October and again in December).
    Well anyway your letter did not say where to start new thread should I do that here, or in open forum?
    Oh, auto phone repair has given me a date for phone service as this Friday, I hope that at least gets done I cannot contact them any other way it seems.
    You may also ref: my thread on ping rates over 600 on long distants calls for any other history, but as per your request here is new thread.  Please note as of today I have No Phone so can only be contacted by email or here.  Untill phone is repaired that's all there is.

    Please go to your profile page for the forum by clicking on your name, and look in the middle towards the bottom where you will find an area titled "My Private Support Cases".
    There you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions. Please keep all correspondence regarding your issue in the private support portal.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer that solved your issue as the accepted solution.

  • I am trying to have some LabVIEW code called in a New thread exit when the testStand sequence terminates

    I have a Sequence that launches a sequence in a New Thread that happens to launch some LabVIEW code.  The problem is when the LabVIEW code finishes, it will not close even when the TestStand sequence terminates. Is there a way to tell this LabVIEW code to Exit, I've tried the Quit LabVIEW function, but that causes a C++ RunTime Error.  The LabVIEW code does end though, and it is set in the VI properties to:
    Checked - Show Front Panel When Called
    Checked - Close Afterwardds if originally closed
    The sequence call that the LabVIEW code is launched from has the following options:
    - New Thread
    Unchecked - Automatically wait for the thread to complete at the end of the current sequence
    Unchecked - Initially Suspended
    Unchecked - Use single threaded apartment
    Any clues on this would be appreciated.

    Hi ADL,
    Everything should close correctly if you check the checkbox "Automatically wait for the thread to complete at the end of the current sequence" in the thread settings.
    With it unchecked, I am seeing the behavior you are. 
    Gavin Fox
    Systems Software
    National Instruments

  • I group messaged from my ipad and this has screwed up the way my messages are reveived by my friends (it creates new threads in their phones with my email in place of my contact name) I've stopped messaging from my ipad but the problem remains. Any help?

    I have an iPhone 4S and use the group texting feature ALL THE TIME. I recently updated my iPad to the latest software and made the colossal mistake of continuing my group messaging from my iPad while connected to wifi. Doing this has successfully screwed but every group text thread I am in, to the point where its very hard for those involved in the thread to keep up. When I initially messaged those I was already engaged in text threads with it created a new thread in their phones replacing my name in their phones with my email. At first this was not a big deal but ever since then the people I am messaging have become increasingly frustrated with how my messages come through. If I am messaged in a group text and respond to it, sometimes when I respond it will create an entirely different thread in my recipients phones. So at that point they have to switch threads in order to read what I wrote. The new thread that my phone creates will send the message under my email not my name (related to the contact they have me saved as in their phones). The worst part about it is that there seems to be no rhyme or reason to why or when my phone will send the message as normal or under my email like it did with my iPad. I haven’t messaged from my iPad since these problems immediately began a month ago but the issues still continue. I have tried everything to get this to stop, I’ve turned off my wifi, I’ve had my friends delete the threads that my messages create in their phones. I’ve had them delete my email in their contact lists and nothing has worked. Can you help me? Any info you could provide would be greatly appreciated.
    Note: My phone message no different whatsoever. All the threads have remained the same. The issue is what it is doing to the people that I am messaging.
        Best Regards
             Rick Mulhern
    Message was edited by: Rickapplehelp19

    I have this identical problem.  For a while my group texts didnt show up on my ipad.  Then one day they did, maybe everyone in the group started using the same os version or something.  Ever since my first reply to the group there have been complaints of multiple threads.  I can not find a pattern for when my group text's decide they want to create a new thread. (it doesnt happen every time)  Everyone in the group has deleted the thread, we've all toggled imessage on/off etc.  There still hasn't been a solution.
    Any help would be appreciated.
    Thanks

  • Cannot post new thread in Calendar forum

    I have a question about Oracle Calendar, and I'm trying to post my question in the Calendar forum. But when I click the "Post New Thread" link, I get an error page that says "Error: you do not have permission to view the requested forum or category."
    What am I doing wrong?
    I am signed in as a registered user, not a guest. I originally created this account a few years ago but have not used it in a long time until today.

    How did you get to the forum? Are you trying to post to an archived forum? You may need to use a different forum, perhaps someone can tell which forum to ask such a question, or you can get a clue by searching here (as opposed to google searching). This is a huge site, sometimes it takes a bit of work to find the right place. For me, the google search generally works better, but that may not apply to what you are searching for.

Maybe you are looking for

  • Account assignment category Q and G/L account mapping during purchase order

    Hi, When we procure stock for account assignment category Q,then it will trigger G/L Account Please can any one tell me where it will maintained

  • Update Rules to ODS

    I have created an ODS which includes 3 key figures as data fields. When I create update rules to this ODS the key figures do not appear in the Update rules.  Is there any reason why and how can I resolve? Thanks This is specifically for an update rul

  • Alternatives to "Hiearchy node does not show total of nodes & leaves"

    Greetings, I am having a problem with a query I created and am looking for suggestions on how to get around my problem.  The problem is a classic one that I have seen numerous times on various discussion boards. InfoCube Definition Dimensions    Mate

  • Mobile Me to iCloud - is it time to cancel my Mobile Me subscription?

    So I'm pretty sure I have made the switch over to iCloud successfully, my iPhone now says iCloud instead of Mobile Me and when I log into the website for Mobile EM it tells me Mail, contacts and claenders are now in iCloud. So that's all good. See as

  • Oracle SQL Developer - TNS

    Hi. Before installing Oracle 11g, Microsoft Loopback adapter installed. During the installation I did not have any errors, but I can not connect to database XE tnsnames.ora: XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.101)(PORT =