Actions of an asynchronous thread in a main sequence

Hello

In my application, I have 2 son:

-A main thread: the test sequence

-A second thread: it defines some asynchronously parameters corresponding to the types of different actions that must do the test sequence

These actions must be possible at any stage of the test sequence. different possible actions to do are:

-Stop the test sequence (go to the cleaning of the sequence part)

-Break set the test sequence

-Call another sous-suite

-Repeat the current step

To do this, I use the post action options to allow every step. There is an example of my first try to integrate attached to this post. In this example, I create a simple asynchronous thread where I update a value of a variable, considering that an action is a particular value of this variable (see the StationGlobals variables in this file).

The problem with this approach is that I need for other reasons (for example a test failure) to use the post action options but this is not possible with this.

You know better ways to allow an asynchronous thread provok of stocks in a main sequence? If not how can I improve my sequence?

Thanks for your help

Configuration

TestStand engine Version: 4.2.1 (4.2.1.83)

4.2.1.83 sequence editor

License: development system

OS: Windows XP

You can use a SequenceFilePostStep callback sequence rather than an action. It is a special sequence that will be called after each step runs and you can put whatever you want in this sequence. To create such a sequence use the Edit-> sequence file reminders... menu point and add the sequence of SequenceFilePost reminder not to your file.

Please note that this will affect the speed of execution as a sequence will now begin to run after each step, however if your done a lot of work and you have many of them, the difference can be important.

NOTE: I haven't looked at your sequence at all, but make sure you use a lock or other synchronization primitives to protect access to shared global data between threads.

Hope this helps,

-Doug

Tags: NI Software

Similar Questions

  • How can I include results of a subsequence, which takes place in a new thread in the test report from the main sequence

    Hello!

    I have ", working with the Version 4.2.1 of TestStand. I have a main sequence, which sous-séquences of different calkls. All these steps are reported correctly. One of the subsequences works like "new thread". How can I include his results in the common test report of the main sequence?

    I have variable markes of the subsequence as is required for the test report (it works OK if it's not a new thread). If the digital test, which is performed in this subsequence is correct, I get no results at all. If the digital test could not get a "message in red" who whithout having failed to test any reference to step somewhere in the report of the main sequence or values of vaiables that were not correct.

    I tried an option 'on the fly' in the Configuration of the report, but n ' got no useful result. What should I do?

    Best regards

    Hello Pericles,

    You can use a queue time for the results of the wire once it ends. Place a waiting time after the call to the thread in your MainSequence at the location where you want the results to add to the report (compared to other results). In the waiting step Setup tab, select wait: Thread the threaded sequence, and then select call to specify sequence call the radio button. You can also use an object reference if you need results if poster somewhere where elsewhere - you would just add an object reference to the appeal of sequence threaded in its thread settings dialog box.

    I hope this helps.

    -Jack

  • Checking the status of the main sequence in reminder PostUUT

    I'm checking the State of the main sequence in the PostUUT callback, running TS 2014 SP1.
    Say, the main sequence generates an error. PostUUT I check and get the following

    Parameters.Result.Status "error".
    Parameters.Result.Error.Code

    Parameters.Result.Error.Msg

    Parameters.Result.Error.Occurred False

    Parameters.Result.Error.Occurred should not be set to True? If this isn't the case, please explain why.

    Thank you.

    In the process model of the step that calls the MainSequence reminder is set to ignore errors.  It is for the rest of your group of main step can run.  That is why we only sets result false but retains all the error information.

    If it were me, I would trigger on the State channel.

    Hope this helps,

  • Go to the list of the results of the main sequence in my plugin...

    Hi guys,.

    OK, first post here, but I'm a little stuck. I am writing a plugin model to generate a custom HTML report (my requirement has a very specific layout for the report, which is not at all compatible with the html reports generated by teststand normally). Anyway. I generated all labview code, I want to make the report in the format I need, but I'm really bad at actually get information of teststand in a way that is easier.

    What I want to do is browse through the list of the results of the main sequence in the callback sequence DUT-Done of the sequence of pluging, which is stored in

    Parameters.MainSequenceResult.TS.SequenceCall.ResultList according to the documentation, but how can I really access it as a table I can go? All I have in my list of parameter is a reference to the parameters. MainSequenceResult, and for the life of me I can't work out what to call this knowledge actually just get it into a format that I can then use to browse in a loop "foreach" to get out of these settings.

    I'm on a windows machine and teststand 2014 7.

    Any help you could give would be really appreciated!

    J

    The list of top level result is: Parameters.MainSequenceResult.TS.SequenceCall.ResultList

    To find it, I dragged Parameters.MainSequenceResult in the Watch window to a breakpoint and developed it until I found the list of results.

    The ResultList is a PropertyObject which is an array of containers, so as the methods GetPropertyObjectByOffset and GetNumElements are going to work on that.

  • Transfer data from DoPreUUT to the main sequence

    Hi all, I am working on editing a sequential model existing in NI TestStand.

    In PreUUT do that I just wanted to have mu, own VI Custom which will require a path and once the path is selected, the VI will extract 2D Array of string values that I have to move my hand Sequence.I am facing a question of transfer data from table 2D-doPreUUT to mu from the main sequence.

    http://forums.NI.com/T5/NI-TestStand/pass-parameters-from-PreUUT-to-main-SEQ/m-p/2850684#

    who says the best way is to use the globals file, but I'm not able to get my values transferred to my main sequence.

    Need help to solve...

    Thanks in advance

    If you are adding a FileGlobal to Test DUT and expecting to access this variable in your file of the client's sequence, you will not be able to read the FileGlobal directly. You will need to use the "RunState.Root.FileGlobals" string... »

    for example if you have an array of strings FileGlobals.MyDataPaths you MainSequence, you can access using RunState.Root.FileGlobals.MyDataPaths of MyDataPaths.

    Remember that this will only be available when you use the process model, therefore, it would be wise to test that you run with the process template.

    Hope this helps

  • Note the serial number of the UUT in the main sequence

    Hello

    I want to write the serial number of the object to be measured on the main sequence.

    I know that I can access this value through RunState.Root.Locals.UUT.SerialNumber. I can write the serial number in this variable and it works as long as the report is not generated on the fly. If activate on the fly to have pointed out, my serial number of UUT report rest to 'NONE '.

    Is it possible to force the regeneration of the report with the last value of variables? I noticed that there's something similar for the runtime. During the execution of the sequence, on-the-fly feature enabled, the report indicates "0 seconds" for the period of performance. However, when execution is complete, this report field is updated with the actual value.

    How to do the same for the serial number?

    Thank you

    Alex

    OK, ATML seems to create the problem. Using XML reports, it works as expected. What is a work around for you?

    Norbert

    EDIT: Classified CAR 491296 against ATML OTF reporting

  • Add Label (and other things like SequenceCall, statement etc.) on the main sequence?

    Hi all

    I try to add the label on the main sequence, but the problem is how to run there. Have been made successfully subsequences and their content, but I now want to add content in the main sequence (labels, SequenceCall, statement etc.). You can someone help me with this code? (CVI/LabWidows). This code seeks to add labels (szName) on the main sequence.

    Before entering the Label, have referred to the hand in the file in the sequence. The missing part.

    tsErrChkMsgPopup (TS_EngineGetSeqFileEx (EngineHandle, & errorInfo, SeqTemplate_path,  TS_GetSeqFile_DoNotRunLoadCallback, TS_ConflictHandler_Prompt, & SequenceFileHandle));
    tsErrChkMsgPopup (TS_EngineNewStep (EngineHandle, & errorInfo, '',' Label', & labelStep));
    tsErrChkMsgPopup (TS_StepSetName (labelStep, & errorInfo, szName));
    error = TS_SequenceInsertStep (SequenceFileHandle, & errorInfo, labelStep, indexL, TS_StepGroup_Main);

    I tried with TS_SeqContextGetMain(), but does not work.

    Best regards

    branar

    Hi Ray,

    reason why is used SecuenceFileHandle was I have change the existing file (only not by creating a new). Simply, add subsequences of default file and save as a different name. Problem is now solved by

    TS_SeqFileGetSequenceByName (SequenceFileHandle, NULL, 'MainSequence', & SequenceHandle)

    I get "MainSequence" and adding animals here. Previously, MainSequence has been created and two sequences with the same name were existi.

    Best regards

    branara

  • Can I use charger property on a main sequence to load the properties in the subsequence?

    Hi, I tried to use the shipper of the property to load limits and variabels local values in subsequences of the main sequence.

    I can export all properties for my main sequence and all subsequences in the export function within selecing .

    When I try to load the file exported by using the property loader I get different errors depending on the format, with that I imported/exported.

    For the error of iget text files or csv-17100

    "The file format is incorrect near 'StationGlobals' section.  Make sure you use start and end markers correctly. »

    To get an xl format I get error - 18

    "Stage of charger property has no import or export properties.
    310 property values have been found.

    43 property values were imported from 920 or lines of data.

    There is no where close to 920 data lines or 320 properties in the file exported.

    If I use the property loader to load the properties to just hand it works very well, is it extra formatting that I do for the file before you import it or is it not possible to load the properties in a subsequence of a property to hand charger?


  • How can I check the status of the main sequence TestStand?

    I have a main TestStand sequence that calls several subsequences. I want to take a decision at the end of the test to perform a function or not based on any pass/fail criteria for the entire test. If no fail subsequences that I don't want to perform the function that it will do a lot more time to re - test after the Board of Directors is fixed. Basically, I want to follow the same status as TestStand monitors for the end of the test pass/fail indication. Thanks in advance for any help.

    I did some more research through the browser of the expression Tab API TestStand and found a variable that works. It's ThisContext.RunState.Main.SequenceFailed. For my assessment, I am using an IF statement and check if the value is false. If it is while I do my job. If one of my failure of subsequences three it is then set to true and the IF condition evaluates to false and goes to the end function.

  • change the original size of external swf in the main sequence

    I have an external swf that loads into my main movie using loadMovie. The original .swf that is loading is greater than what I would like to appear in the main movie. Is it possible to say the clip that externally is charged in, to reduce the size of the loaded .swf?

    any input?

    Yes, you can set the _xscale and _yscale of clip that you load. If you know the percentage you can just hardcode it... If you don't need to wait until the external swf file is fully charged and then check its _width and _height and discover how much will have to resize it you.

    I advise to use the MovieClipLoader class instead of loadMovie. It has nice events who will tell you when the file is loaded.

  • Calling a function in the main sequence of a loaded swf file

    I know this is probably a very basic question, but I loaded a SWF file in another film. Now, I want to call a function in the main SWF file. Is it possible to do? Otherwise, I have a custom class where I could put the function, but I was not able to understand how to call it from the SWF loaded either. Can I somehow associate the class with the main movie, or...?

    Nevermind - I did something very stupid and was not calling the function as a method of a clip. I was just calling checkTarget (event) and not event.currentTarget.checkTarget (event); that seems to work.

  • External film is at the top of the main sequence



    Hi, I am a beginner in flash... im trying to do 1 thing, but stuck in it for a long time.
    I have 1 main movie that loads an external movie, logo.swf.
    and in the main movie, I put 1 button, which shows a kitten on working capital.
    the cat is coming behind this external clip. I moved it the topest layer. but it's always the same

    the external film contains the following script in its framework:


    loadMovieNum ("logo/logo.swf", 1);
    this.createEmptyMovieClip ("listenerLevel1", this.getNextHighestDepth ());
    listenerLevel1.onEnterFrame = function() {}
    _level1._x = 29; _level1._y = 15;
    If (_level1! = undefined) delete listenerLevel1.onEnterFrame;
    };

    Please help me ASAP

    THANK U


    THAAAAAAAAAAAAAAAANX urami_

    I put the cat in the logo.swf file, and it worked... its top entry

  • Best way to load separate components of the main sequence

    When loading my flash animation, it takes time to display the loading image because he's too busy to export items on the first image. What is the best way to avoid this, while being able to use the components via the .swf?

    Thanks for any help,
    ~ Oni.

    OniLink wrote:
    > Loading my flash animation, it takes time to display the loading image
    > because it is too busy to export the items on the first image. What is the
    > best way to avoid this, while being able to use the components through
    > the .swf?
    >
    > Thanks for any help,
    > ~ Oni.
    >
    loadMovie ("component.swf", _container);

    the best way is to load on the outside, but if you do not receive it, check
    www.gotoandlearn.com...
    they have the best basic and advanced tutorials.

  • Step failed in New Thread does not display in the report

    Hello

    I call a sequence of sub in a 'new topic '.  A step inside this sequence of subroutine fails.

    The end result is the Test failed because it is supposed to be, but the step failed does not show.  (I show not only failed in the report).

    Can it be fixed?

    Thank you

    Rafi

    It is correct. If you look at the entry Point of the execution of the process template, you'll notice that once completed execution of the main sequence, the generation of reports and other things start.

    If spawn you a sequence in the new thread from the main sequence, MainSequence could finish before the subsequence ends its execution and the results of the sous-suite propagate to MainSequence. So as Ray mentioned, you can force the MainSequence expect the subsequence full run using a queue time.

    See attached screenshot and/or example:

  • Monitoring with parallel model of global state?

    Hi all

    This can be a very simple question, I am new to TS, please excuse my lack of knowledge!

    I use the parallel model TestStand to test 16 individual DUT. I nailed pretty well parallel processes, but I'm trying to find a way to 'monitor' the global settings of the system.

    For example, some sensors global X defines a Boolean value if something happens (pressure lost etc.) How can I detect this boolean change and do something in response? I monitor the Boolean value in the execution of each thread?

    Thanks in advance for the help!

    Hi André,.

    You can create a sequence of void.

    Enter the void sequence in a new thread so that it runs in parallel.

    You will need to use a type of appeal to that effect sequence step.

    Few things you should take care:

    Ensure that the above step works only for a power outlet.

    Ensure that this thread is closed at the end before the end of the sequence main (you can use variables fileglobal as flags for the communication between the thread and the main sequence or the notification procedure)

    I hope this helps.

    Ravi

Maybe you are looking for