How to change Number of test socket in Model option during run-time

I wanna be able to change the the number of test sockets(in the Model Options menu) during runtime. I have overriden the Prebatch callback and used my own instead. I have a LabView program in my Prebatch where I would select the test script each time before running the batch. I wann be able to also modify the number of test sockets each time before I run the batch again. I tried setting the "Parameters.ModelData.ModelOptions.NumTestSockets" from the Labview program which is in my Prebatch before running each batch, but get into errors. Please help?

Hello Kumar,
The Batch process model shipped with TestStand does not handle this scenario, but you can still do this. Attached is a sequence file that utilizes the Batch Model's ProcessCleanup callback to reset the next execution point. It still uses the method of setting the Parameters.ModelOptions.NumTestSockets variable in the PreBatch callback. The change I added was three steps to a different callback (the ProcessCleanup callback):
Message Popup - prompts Yes or No to continue testing with a new batch size.
Statement 1 - based on the response to the message popup (via precondition), resets the Batch Model's next step to be executed and the ContinueTesting flag:
RunState.Root.RunState.StepGroup = "Setup"
RunState.Root.RunState.NextStepIndex = 0
RunState.Root.Locals.ModelData.ContinueTesting = True
Statement 2 - based on the response to the message popup (via precondition), loops to reset each TestSocket's ContinueTesting flag:
RunState.Root.Locals.ModelData.TestSockets[RunState.LoopIndex].ContinueTesting = True
These two statement steps force the next step to be executed in the Batch Process Model to be the first step in the "Setup" step group, and reset all necessary flags for the batch itself and the individual TestSockets. I discovered the flags that had to be reset by trial-and-error (that was the time-consuming part).
You can run continuous batches of the same size you first chose (for as long as you like), but when stop the batch execution this new message popup will prompt (yes/no) whether you want to continue testing with a new batch size. If no, then processing terminates. If yes, then the next two statement steps are run and execution resumes back at the beginning of the Batch Process Model's Setup step group. This forces the ModelOptions callback to be executed again, so your VI (in my example here it's just a Message Popop) can then set NumTestSockets appropriately.
Thanks for contacting National Instruments!
David Mc.
NI Applications Engineering
Attachments:
kumar.seq ‏27 KB

Similar Messages

  • How To... Change the Data Type for a SELECT-OPTIONS at run time.

    Hello,
    I am trying to restrict the values available for entry into a SELECT-OPTIONS at run time depending on user input.
    The logic is as follows. The user has two input fields. A PARAMETER field which has the type RSDIOBJNM and allows them to choose an InfoObject. And the user has a SELECT-OPTIONS field to allow them to select the Characteristic values for that InfoObject.
    I would like the following example to be possible:
    The user enters 0MATERIAL into the PARAMETER. When the user clicks on the SELECT-OPTIONS control code will derive a list of possible options the user can enter in the SELECT-OPTIONS. In this case only values found in the master data or at least no values greater than 18 characters.
    I have looked at the following function module SELECT_OPTIONS_RESTRICT and this do not appear to be helpful as they only restrict on the signs allowed for the values (unless I misunderstand, it is a complex function module!).
    The code I have so far is (thus the user enters a InfoObject into p_char1 and the select options so_char1 should only accept active values of that InfoObject):
    declaration of variables for user interface
      DATA c_char(32) TYPE c.
    declaration of count variable
      DATA i_count TYPE i.
    declaration of user interface
      SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
        PARAMETERS: p_ipack TYPE RSLOGDPID.
      SELECTION-SCREEN END OF BLOCK a1.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
        PARAMETERS: p_char1 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char1  for c_char NO INTERVALS.
        PARAMETERS: p_char2 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char2  for c_char NO INTERVALS.
        PARAMETERS: p_char3 TYPE RSDIOBJNM.
        SELECT-OPTIONS: so_char3  for c_char NO INTERVALS.
      SELECTION-SCREEN END OF BLOCK b1.
    Is what I am trying to do possible???
    Thanks for any help. Ross.

    You really want to restrict possible values of a select-option based on another field, not change the length of type of the select-option field, right?
    Here is what you do:  Code a custom F4 value help for the select-option at event AT SELECTION-SCREEN ON VALUE REQUEST FOR..  The first thing you do here is read the value of the parameter field (p_ipack in your example).  You can use function module DYNP_VALUES_READ.  Based on this value, you can propose values for the select-option fields.  Note that the use can still enter whatever s(he) wishes in to the select-option field without pressing F4. In this case, you will have to code some input validations taking into account the value in the p_ipack field.

  • How to chang the number of plots in the plot legend during run time?

    Hi, I am using waveform graph. At run time only i will come to know, how many plots should be plotted in the waveform graph. Based on the number of plots i have to change the plot legend. Is there any method to do the same?

    Maybe something like this?
    The inputs on the left are (from the top)
    your array of data you want to plot (or anything that contains the number of inputs you have)
    next one is an array of colorschemes (maybe you dont need this)
    and the third is an array of booleans that are true if that "channel" should be plotted and false otherwise
    /Anders
    Message Edited by Tohatsu on 01-08-2008 08:56 AM
    Attachments:
    graph.JPG ‏10 KB

  • How to change value of instance variable and local variable at run time?

    As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
    Suppose I have a class, say employee like -
    class employee {
    public String name;
    employee(String name){
    this.name = name;
    public int showSalary(){
    int salary = 10000;
    return salary;
    public String showName()
    return name;
    i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
    My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
    Can someone tell me how to change these value?
    Please help
    Regards,
    Sujeet Sharma

    This is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.

  • How to Change  Numeric Value into Character Value in Reports at run-time?

    Hi,
    I am creating some reports, in which i am facing a problem.
    i have an AMOUNT field of "NUMBER" data type in a table, I want to show the AMOUNT value in Character at run-rime.
    For example, if AMOUNT is 12000 then it should be converted into Character like "Twelve Thosand".
    Please help me to make it clear.
    Thanking you in advance.

    u can get decimal points through this function
    FUNCTION amt_2_word(amt varchar2) RETURN Char IS
    BEGIN
         declare
              --TYPE v_arr IS VARRAY(6) of varchar2(3);
              len number;
              i number;
              t_amt varchar2(100);
              t_word varchar2(20000);
              last_3rd varchar2(1);
              main varchar2(1000); -- number in format main.sub
              --v_main v_arr := v_arr('00','0','00','00','000');
              v_main1 varchar2(3) := '00';
              v_main2 varchar2(3) := '0';
              v_main3 varchar2(3) := '00';
              v_main4 varchar2(3) := '00';
              v_main5 varchar2(3) := '000';
              sub varchar2(1000);
              res_1 varchar2(32000);
              res_2 varchar2(32000);
              res_3 varchar2(32000);
              res_4 varchar2(32000);
              res_5 varchar2(32000);
              res varchar2(32000);
         begin
              t_amt := lpad(amt, 10, '0');
              len := length(amt);
              i := instr(amt, '.');
              if i = 0 then
                   main := lpad(amt, 10, '0');
                   sub := '';
              else
                   main := lpad(left(amt, instr(amt, '.')-1), 10, '0');
                   sub := rpad(right(amt, len - instr(amt, '.')), 2, '0');
              end if;
              v_main1 := right(main, 2);
              v_main2 := left(right(main, 3), 1);
              v_main3 := left(right(main, 5), 2);
              v_main4 := left(right(main, 7), 2);
              v_main5 := left(main, 3);
              if v_main1 <> '00' then
                   res_1 :=getTwo(v_main1);
              end if;
              if v_main2 <> '0' then
                   res_2 := getOne(v_main2) || ' Hundred ';
              end if;
              if v_main3 <> '00' then
                   res_3 := getTwo(v_main3) || ' Thousand ';
              end if;
              if v_main4 <> '00' then
                   res_4 := getTwo(v_main4) || ' Lac ';
              end if;
              if v_main5 <> '000' then
                   last_3rd := left(right(v_main5, 3), 1);
                   if last_3rd <> '0' then
                        res_5 := getOne(last_3rd) || ' Hundred ';
                   end if;
                   res_5 := res_5 || getTwo(right(v_main5, 2)) || ' Crore ';
              end if;
              res := 'Rupees ' || res_5 || res_4 || res_3 || res_2 || res_1 || ' ';
              if sub is null then
                   res := res || 'Only';
              else
                   res_1 := getTwo(sub);
                   res := res || 'and Paise ' || res_1 || ' Only';
              end if;
              return res;
         end;
    END;
    u write this PL SQL in ur databse and u can use this function and get amount to word

  • How to get the Title and Tcode of a Program during run time

    Hello,
    I am new to abap and I have this question please. Is the a way to get the title, Tcode and Author of a program during run time? I would like to get the name and title of a program or a view or an include during run time.
    Using table TADIR, you can only get the object_name and the author. Is the a way for me to get the Title of the repository object and any Tcode if any is available for the case of a program?
    I loop forward for your respond.
    Thank you.
    Sabina

    You can get it by accessing SYST.
    SY-TITLE for Title
    SY-TCODE for Tcode
    I don't think there is any field in SYST for the Author.
    To get the author name you can use the TRDIR table.
    Regards,
    Naimesh Patel

  • How can I set the number of test sockets in my program?

    How can I set the number of test sockets in my program? I use LabWindows/CVI  6 and TestStand version 2.0.
    And I use BatchModel for the parallel UUT running. I didn't found program way to set the number of test socket. I think I should have it. In TestStand I can change the number of test sockets through menu Configure -> Model Options -> number of test sockets (I mean I do it by manual mode).
    Thank's a lot.
    Maria

    One way you can set the number of Test Sockets for your sequence is by overiding the ModelOptions Callback used by your sequence. Select All Sequences from the View drop-down then right click, select Sequence File Callbacks, select the ModelOptions callback and then click on Add. You can then select the Edit button to Edit the ModelOptions for your sequence. You can set other ModelOptions as required also.
    RG

  • HT204380 how to change number in FACETIME..????

    how to change number in FACETIME..????  very urgent please some1 do REPLyyy....

    Your FaceTime number is your phone number. I don't believe you can change it without changing your phone number.

  • How can I terminate ALL test sockets from API

    I want to terminate all my test sockets (Batch model).
    Manually I do it by "Debug -> Terminate All".
    Is there any way to terminate all sockets through NI TestStand API Automation Server ?
    I succecced to terminate only one socket (object class RunState.Execution), but I didn't find any way to terminate all test sockets.
    Thank's to someone that will answer.

    Hi,
    Yes, use Engine.TerminateAll
    You will find reference to it in the TestStand Help
    regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to change options in Run time menu while labView was running

    Hello Good Afternoon,
        I m Using LabView 8.5.How to change the options in Run time menu for any control while Labview was running
    Thanks 
    Jai
    Jayavel
    Solved!
    Go to Solution.

    Hi Jai,
    Try the below attached VI and let me know if u still need some explanation.
    Rgds,
    Venky
    Attachments:
    Run Time Menu.zip ‏6 KB

  • How can I map the composite_dn name with a composite in run time

    Hi All,
    I want to craete a report on number of total business and system faults with the help of Information Publisher in OEM 12c Cloud Control. I am fetching data from the table composite_instance_fault present in SOAINFRA schema. Below os my SQL statement:-
    select error_category,count(error_category) from prefix_SOAINFRA.composite_instance_fault where composite_dn=??EMIP_BIND_TARGET_GUID?? group by error_category
    Now I want to know that how can I map the composite_dn name with a composite in run time. When we fetch data from the repository we used to map target in rumtime by using ??EMIP_BIND_TARGET_GUID?? but here as I am not fetching data from repository, how can I map target in run time.
    On executing the above SQL statement its returing an empty table without any data.
    Please guide!!
    Thanks in Advance!!

    Hi,
    try something like this.
    Mike
    Attachments:
    Unbenannt 5_LV80.vi ‏12 KB

  • HOW TO create a temp table or a record group at run time

    i have a a tabular form and i dont want to allow the user entering duplicate
    records while he is in insert mode and the inserted records are new and not exsisting in the database.
    so i want to know how to create a temp table or a record group at run time to hold the inserted valuse and compare if they are exsiting in previous rows or no.
    please help!

    As was stated above, there are better ways to do it. But if you still wish to create a temporary block to hold the inserted records, then you can do this:
    Create a non-database block with items that have the same data types as the database table. When the user creates a new record, insert the record in the non-database block. Then, before the commit, compare the records in the non-database block with those in the database block, one at a time, item by item. If the record is not a duplicate, copy the record to the database block. Commit the records, and delete the records in the non-database block.

  • In ABAP How to locate an Input file  from a Directory during run time

    I'm loading data from a flat file(text file) into SAP thru BDC programs. All my input files are present in Application server.How to locate an Input file in a directory during run time to process BDC programs programmatically. Are there any in-built functions?Provided me some sample code or any method of doing the same.

    Hello Murali,
    you should ask this question in the ABAP forum.
    Regards
    Gregor

  • My Prompt back ground colour changes during run time in Client / Server Env

    <p>Dear Friends, </p>
    <p> My Prompt of text items are changing its back ground colour according to the Text item's back colour during runtime. This doesn't look good. My look and feel of my application gets spoiled due to this. I tried with Visual Attribute (both prompt & Text item) but of no use. I don't want to use text label as I want to change the prompt during run time. Please help me. </p>
    <p> Form during Design time </p>
    <IMG SRC="C:\Documents and Settings\Administrator\My Documents\My Pictures\myform1.jpg"></IMG>
    <p>Form during Runtime </p>
    <IMG SRC="C:\Documents and Settings\Administrator\My Documents\My Pictures\myform2.jpg"></IMG>
    <p> Thank you.
    Regards,</p>
    <p>Senthil .A. Perumal.</p>
    <p>My version of forms is Forms [32 Bit] Version 6.0.8.8.0 (Production).
    </p>

    Dear Kevin,
    Yes I agree with you, but in my case as this application supports bilingual (English & Arabic), I want to change the prompt of the text at run time. Can I change the text of boilerplate text at runtime?
    Thank you for your reply.
    Regards,
    Senthil .A. Perumal.

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

Maybe you are looking for