Control the execution of different threads in TestStand

Hi all

I'm trying to control multiple threads in a sequence file.  I have if I'd be able to use the following

ThisContext.Thread.Execution and then terminate / break / etc as you wish.

I'm starting a new sequence threaded in the process configuration.  I want to close the original sequence and then displays a message that the user clicks.

I have two problems:

1 ThisContext.Thread.Execution is identical in both threads.  If it should not be different?

2. everything stops when I complete the thread and not only the sequence called the new thread.  I imagine that this is directly linked to the 1.

Does anyone know how to close a message from another thread?

Thank you

Sean

Hi Sean

1.) it is clear. An execution can contain multiple Threads

but, a thread can belong to just a single run for.

(2.) in my opinion it is not easy to terminate, if I'm honest do not know if it is really possible!

If you have to terminate beside a thread I always use a new run rather a thread.

It seems that Ray has had the same problem

http://forums.NI.com/T5/NI-TestStand/in-TestStand-how-can-a-stop-a-thread/m-p/54455

Concerning

Jürgen

Tags: NI Software

Similar Questions

  • Can the Format date/timestring service that can control the execution of the loop to a VI?

    Can the Format date/timestring service that can control the execution of the loop to a VI?

    Example,

    a VI is running at August 25, 2010 and print a txtdata(3)) '100825.

    Then follow when time system running at 2359hrs, August 25, 2010 at 0000hrs, August 26, 2010.

    and print a txtdata(3)) '100826.

    How?

    When the system changes a new date, problems occur.


  • How to control the execution of a sequence of flat have the Cancel button

    Hello
    I have a question for you guys.
    Suppose I want to write a program to control a set of materials by sending commands via a serial port
    In fact, he calls a 'round '. Because a series of specific commands will send via a serial port at once specific time. What I call one a time Cycle.
    Between each send command steps there is a delay (waiting in range of Timing). The joint part of my VI.

    I was wondering how I can integrate a Cancel button which is able to act in any image of the flat sequence Structure?
    As you can see it is not everything in loops to have the best control of the program because I want to run commands in the series only once.
    Where to put the button 'Cancel' in frames?
    I want to show a confirmation message when the user clicked the Cancel button, and if the answer was 'YES' LabvIEW stops running flat sequence Structure and of the specific procedure to cancel (which is not included in above VI) takes place. Otherwise (by clicking 'NO') program continues to run...

    Note that home is just a simple version of what I intend to

    For example in some frames, it will be a while loop and so on...

    But there will be only on flat sequence at all

    Excuse me for my bad English

    Hi mostafi,.

    General answer: convert your flat sequence in a correct state machine States!

    Now, you can check your "Cancel" button after each State is treated...

  • Find child cursors due to changes in the execution plan

    Hi all

    I have a situation to provide the list of execution of the plan for a particular SQL_ID. The particular SQL toggles between 2 paths (FTS and Index scan), but at this point in time, I can see that a single (current) plan_hash_value for instruction. That is to say - the previous cursor gets disabled (due to a statistical series application package which in turn disabled the previous cursor - this is my guess).

    I can get it from dba_hist_sqlstat for the specific SQL, but curious, it is only possible to get it from the dynamic views such as V$ SQL and V$ SQLAREA for a list of all the plan_hash_values for a particular SQL, where the child_number is 0.

    Any idea please?

    Note: I am interested to extract cursors of the child due to the execution of different cursors of the regime and not child created because different settings for the same plan (mode ex-optimizer etc...)

    > is it possible to capture the two dynamic views PHV even if the first cursor is invalidated

    Once it is invalid, it is out!  Is no longer present.

    Hemant K Collette

  • Problems during execution of a LabVIEW VI in a new thread under TestStand sequence and execution of the MainSequence in step by step mode

    Hello

    We want to run a VI in LabVIEW (LV2011) at the same time to the execution of a sequence of test of TestStand (TS2010). The VI should view the condition of the equipment, while the test sequence is written in TestStand. It would be a nice feature of debugging the TestStand sequence while watching the State of the material in the LabVIEW Panel, too.

    This is where it's our problem. Imagine that you have a MainSequence calling a subsequence in a new thread, which runs the LabVIEW VI. After the call, the MainSequence continues its progression, as it is configured to do this. But if we want to execute the MainSequence in step parallel execution of VI mode, we can do that. The controls for "Step Out" etc. are grey.

    I tried to build a very simple example to explain what I mean. It's just a sequence and a LabVIEW VI, no real functionality, just take as an example for our problem.

    Any tips? What we're doing wrong? Is there something that needs to be changed in the LabVIEW VI?

    Best regards

    Manual

    You should use the monitor of the termination and the ExternallySuspended APIs for the EIS to running asynchronously. There are screws of wrapper around these APIs in the LabVIEW TestStand palette.

    For more details see using the API for the following:

    Thread.ExternallySuspended

    Execution.InitTerminationMonitor

    Execution.GetTerminationMonitorStatus

    Unless I am struggling to understand what you're asking, if you are using these APIs, you should be able to make it work as you are eager to do things.

    -Doug

  • The execution of the sequence TestStand in LabVIEW via TS - API: execution different times for the same sequence

    Hello - the members of the Forum.

    I have a problem about the execution of a TestStand sequence into LabVIEW. I created a VI that offers the possibility to choose a sequence TestStand-file and then executes the sequence using the TestStand API. The implementation is based on an example in C++-Application found the following link:

    http://forums.NI.com/T5/NI-TestStand/unreleased-references-using-engine-API-in-C/m-p/2927314#M46034

    The app works pretty solid where the VI is executed the first time. The VI treats the sequence chosen in an acceptable time.

    But where execution is started again, the sequence takes approx. 30 sec more than in the first case.

    So far I have not found a solution and hope someones got a clue about this problem...

    I use 2013 LabVIEW and TestStand 2013.

    I enclose my own VI, a sequence of the specimen with a small sample of VI, so you can reproduce the problem.

    Kind regards

    TobiKi


  • How can I retrieve the execution of TestStand 4.0 Test results in a c sharp Application?

    I am writing a c sharp application to launch a test sequence in TestStand 4.0.1 and then collect the results of the tests to update our own screens / report (s).  I'll need some sort of recursive routine to collect the following information (if available) for each stage: name, result, Min value, Max Value, measured value, units.

    My attempts have been to an event to end execution allows to collect data:

    void EndExecution (sender As object, EndExecutionEvent ev)
    {
    Results PropertyObject = ev.exec.ResultObject.GetPropertyObject ("ResultList", 0);

    int numContainers = Results.GetNumElements ();

    for (int i = 0; i)< numcontainers;="">
    {
    PropertyObject resultData = results. GetPropertyObjectByOffset (i, 0);
    String testResult = resultData.GetValString ("Status", 0). ToString();

    PropertyObject testStep = resultData.GetPropertyObject ("TS", 0);
    Dim testName = testStep.GetValString ("StepName", 0). ToString();

    MessageBox.Show (i.ToString () + "". "") testName + "=" + testResult);
    }
    }

    But this only gives me MainSequence data.

    How to cross the ResultsList tree to access the results of all the test steps?

    tlaford,

    There are a couple of big problems with what you are doing:

    (1) it is best to call the code from a test report of the result of your sequence treatment reminder (just use an action step) or change the process template to call your code rather than to call for EndExecutionEventHandler of the user interface, because if you use Test DUT and then there is a separate resultlist by USE not by execution, and it is generally processed at the end of each use not at the end of execution. If you use the EndExecutionEventHandler then you should NOT use the process templates provided with TestStand because they don't work that way. Instead, you just run your sequences without a process template. Although I really recommend the path of process model, even if you write your own a custom, because it is more flexible, and then hardcode your treatment result in the user interface as you do. A few reasons why a process model is that more flexible or better are that it will work in any user interface, including the sequence editor (no changes to the user interface is needed), and it can do everything you can do in a sequence, for example to call a code module in any language supported , asynchronous sequences, call sous-séquences, etc.

    2 recursion) through each property at such a low level is bad because the names of the properties are not guaranteed to be unique for what you expect them to be. Anyone can write their own types step custom with some result properties that they would like. You must make sure that the full path to the properties is what you expect it, and you can even check that the type of step is one you expect. You should rather loop through the result of higher level items ONLY and are looking for the complete data lookupstrings that you expect from these elements. For example, instead of WalkTree you might have the following instead:

    This must be called from a step in a test recall report or in a custom process template
    rather than from EndExecutionEventHandler of the user interface, because if you use Test DUT then
    There is a separate resultlist by USE, not by execution, and it is usually processed
    at the end of each use not at the end of execution.
    Sub ProcessResultList (PropertyObject resultList)
    {
    numElements int = resultList.GetNumElements ();
    < numelements;="">
    {
    Element PropertyObject = resultList.GetPropertyObjectByOffset (i, 0);
    String stepTypeName = string. Empty;

    If (point. There are ("TS. ((StepType', 0))
    stepTypeName = GetValString ("TS. (StepType", 0);

    If (stepTypeName is "NumericLimitTest")
    {
    If (point. Exists ("Limits.High", 0))
    {
    Double highLimit = item. GetValNumber ("Limits.High", 0);
    Do something with the value
    }
    }

    NOTE: The two step type SequenceCall and NI_Wait can have subresults like that. A stage of waiting waiting on an asynchronous thread or the execution will have this.
    If (point. There are ("TS. ((SequenceCall.ResultList', 0))
    {
    Recurse for results call sequence.
    PropertyObject sequenceCallResultList = item. GetPropertyObject ("TS. (SequenceCall.ResultList', 0);
    ProcessResultList (sequenceCallResultList);
    }
    }
    }

    Hope this helps to clear things up,

    -Doug

  • How to stop the Thread in TestStand

    I'm a 'newbie' to TestStand parent in this aspect.  I create a sequence to generate CAN Bus traffic in the hope to arrive at a more precise measurement of the flow.  The subsequence that I create is an infinite loop designed and I am specifying that the loop is executed in a separate thread from the setting of the execution Options.

    My question is how I can kill this thread in my sequence cleaning.  Since I plan to run that the sequence several times wouldn't have multiple threads running not checked on my machine.

    I don't see an easy way to do it.  I imagine that something like this has been done before.

    Any suggestions?

    The best way to proceed so that your main thread tell the other thread when it is time to get out and then after the main thread doing this should then wait for the other thread exit (the wait will be done automatically if you had the box "Wait automatically at the end of the sequence" checked in your approach to asynchronous call of sequence).

    One of the easiest ways to do this is to pass a Boolean parameter by reference in your asynchronous sous-suite and have your subsequence as boolean check periodically to see if it needs to close. The main sequence can set this value in its cleanup steps.

    Another way is to use a type of synchronization step as a notification step enter and have your asychronous sequence looking for a notification that your main sequence will be put in its cleaning.

    It is important that your expectation of the main sequence for the other thread to leave before the end so either use the sequence "Wait automatically at the end of the sequence" call option or adds a step to explicit waiting in your cleaning of your main sequence once you have notified the other thread to exit.

    Hope this helps,

    -Doug

  • Report Generation Toolkit, production of the 2147417842 error, "The application called an interface that was marshalled for a different thread."

    Hello world

    I have an application that stores data in an Excel worksheet by using the report generation tool.  My VI have worked well in the past using Excel XP, but since I have upgraded to Excel 2007, I get COM errors like this:

    "2147417842 error occurred while the application called an interface that was marshalled for a different thread. in Excel_Insert_Text.vi', this is the exact wording, even with the odd punctuation and capitalization.

    The first occurrence of the error is not determined.  Sometimes, to the record 10 sessions, involving a new .xls file, may occur before this error.  Once this error occurs, I must leave LabVIEW to solve.  If I try to do something with Excel, I still get this error, even if sometimes it comes out different source Excel_Open.VI is another.

    These screw logging worked fine until upgrading to Excel 2007.  I checked and I have been using a very old version of the report generation tool, v1.0.1.  I read the documentation and had a big sigh of relief when I realized that I needed to upgrade to v1.1.2 for Excel 2007 help.  However, even after the upgrade, I still get the same errors.  I'm using LabVIEW 8.0.1 and I also build these screws in an application.   The error occurs in the application built both in the IDE of LabVIEW.  Anyone out there have any idea what I can do to fix this?  I google a bit and discovered it is a COM error, but I can't find any reference to the report generation tool specifically.

    Thank you

    Phil

    I think that suits him!

    Here's what I did: I left privileged execution environment level upper VI as "as the appellant.  I tried the "user interface" configuration, but it seemed to slow down considerably the program.

    Then, I found each sub - VI, calling the report generation tool and define the environment for running favorite "user interface".  All the errors went away, and the program is much happier now.

    Big assumption on what a Christian, thank you!

  • Run another module after the generation of the report before TestStand ends the execution

    In my application after that TestStand generates and saves the report, I would like to initiate a stage to send a flag informing that the test is complete and the report is saved. How do I get there? The report is saved at the end of execution of TestStand.

    I don't want to On-the-fly reports because I don't like the information during execution. On-the-fly reporting, also saves the report at the end. I would like to save the file and then sent indicator. It is fine if the results of the stage to send the flag are not saved in the report.

    Hi Sumit,

    You can change the sequentialmodel.seq itself as indicated in the document that you referred. (process template customization).

    After reminder Post USE in the "TestUUTs" sequence that you can add your custom steps that will search the report exists and that the flag.

    The path to the report file will be in the local variable as shown below. (full runtime).

    "Locals.ModelPluginConfiguration.Plugins [0]." PluginSpecific.RuntimeVariables.PerSocket [0]. Path. "

    Generally, please copy the model of process changed in the equivalent public folder with a new name.

    User can select this new process model in the menu set up--> stationoptions--> model tab.

    Your new process model must be detected automatically if you copied into the right directory public and restarted TestStand.

    I hope this helps.

    Ravi

  • How do 'Enum Control' disabled during the execution of an executable application and make activated when the application is stopped/abandoned?

    Hello

    I use a "Enum control" on the façade of an executable application built with application builder for LabVIEW 2013 full professional development system. I want Enum control remains activated prior to execution of this request so that I can choose any value from the list of available numeric values, but when I run this application; Enum control should become disabled so that the user can not select another value in the list of data during application execution values so that the default setting remains unchanged during the execution of this application. Enum control must also be activated when the application is stopped/abandoned so that the user can select any value.

    Could someone pls suggest a solution to this problem?  If I select the active state' to 'Disabled' in appearance tab then all listed values becomes disabled.

    Concerning

    Jamal

    I suggest to use the node property of persons with reduced mobility.  You can then disable the enum at the beginning of the program and then activate it in the judgment.

  • Control the order of execution of the init/release

    I have a small program that I write in LabView.  It has an API (one set of screws to wrapping the functions of the DLL to control a device).

    Other such programs in the Gayshop make liberal use of the structures of the sequence.  I understand that the sequence into LabVIEW structures are not usually recommended.  I am writing my program with the best style of LabVIEW (as far as I understand - I'm still a relative novice in LabVIEW).

    I found that I could wire together the error / mistake Terminal to create a data flow to control the order of execution and it works beautifully.

    However, there are some cases where it is not enough.

    Here is an example.  I hope that the answer to this will answer my other questions.  If this is not the case, perhaps that I'll post more.

    One of the first live I call is an Init function.  One of the last screw is the release function.

    The release function must be called at the end, after the rest of the program executed (in this case, it is after the user requests the stop).  It should be naturally at the end (or almost) of the error string in / out connections error (as it is currently).

    However, the error it receives, which will determine whether or not he will run, should be the output of Init.  Release should work even if something else has failed.

    I enclose a photo showing the problem, with most of the code snipped out (as exactly what is happening in the middle is not relevant).

    What is the elegant way to handle this in LabVIEW.  Is it really a deal for a structure of the sequence, or is there a way more pleasant or better?  How would you recommend handling?

    Thank you very much.

    BP

    I agree with what pincpanter said, more you will need to use the status of the function 'Init '.

    Note that you can ignore the error and make the merger within the Vi version if you wish.

    Steve

  • Cost of the execution plan is different in the two databases

    Hi gurus,

    I have two databases, which are 12 C.

    The execution plan cost is different in the two databases for the same query.

    is it possible to copy the execution to another plan.

    Thank you in advance

    Kind regards

    REDA

    Jr.Raj wrote:

    There are a few differences.

    The machine that has a high cost, has setup up, linux, 2-node RAC, more CPU.

    and

    other machine windows server less Setup and less cpus.

    Please explain, cost really makes a difference.

    Thank you & best regards

    REDA

    You simply can't compare costs like that. It does not work like that. Especially through two different systems.  Here is a very good read: column the COST of the PLAN to EXPLAIN. Oracle FAQ

  • Unable to modify a VI after the execution of TestStand sequence

    If I open a VI after the execution of my order, it cannot be edited. I assume that it is loaded in memory and ready to be run again. What should I do? Normally, I close LabVIEW and open it again. There must be an easier way.

    Thank you

    CT

    File-> unload all Modules

  • BlackBerry guaranteed changed in different countries after the execution of autoloader 10.2.1 Z10

    Hello

    I bought z10 in last month. I was getting job alert for a software update to 10.3.1 a few days back, so I downloaded the same. Once this version installed and rebooted legacy the pssword for currency prompted, I tried to enter the password, but no keys were working.

    Then I reset my phone to factory setting by using blackberry link but still no function to call and the buttons were not working but device password does not ask this time.

    So far, guaranteed remained in India.

    So I decided to downgrade my os 10.2.1 to version and I downloaded the autoloader down the link.

    https://supportforums.BlackBerry.com/T5/BlackBerry-10-OS-device-software/upgrading-OS10-devices-USIN...

    After the execution of automatic loader, I'm able to use my phone if little featuers weren't there because of change of version, but changed in the US (United States)

    Could someone please suggest what to do and how I can restore my old version and security.

    Thanks in advance.

    Piyush-

    Warranty has not changed after installing by the downloader, at startup, the language of the country must be selected.

    The default value is normally WE (in English).

Maybe you are looking for