Station global variable per UUT using a batch process model

Hi,
I have 4 UUTs which are tested using individual COM ports. I am using 4 Station Global variables to store the 4 Com ports - COM port assignments are in no particular order and vary depending on test station PC.
Example:
S1= Com12
S2= Com14
S3= Com10
S4= Com9
Using a batch process model I want to test all UUTs in parallel - I am trying to figure out what is the best/easiest way to pass S1 for UUT1, S2 for UUT2 and so on!
Any help appreciated.
Thanks & Regards,
Shane.
Solved!
Go to Solution.

The easiest way is to use the Runstate.TestSockets.MyIndex property to index an array.  Each batch socket will get an index (0 to n-1, where n is the number of sockets) when it is created.  Then you can create an array (of strings? I can't tell if you just have strings or need a container) and use the property to index the array.
Josh W.
Certified TestStand Architect
Formerly blue

Similar Messages

  • Station Info using Batch Process Model

    Hi,
    I have a test sequence that use a sequential process model and I grab station information using the following.
    RunState.Root.Locals.StationInfo.StationID
    RunState.Root.Locals.StationInfo.LoginName
    I am creating a new test sequence which uses the batch process model - when I try to grab the Station Info data using the syntax above I get the following error 
    Unknown variable or property name 'RunState.Root.Locals.StationInfo'.
    Can some please advise if I am accessing the wrong area when using a batch process model?
    Thanks & Regards,
    Shane.
    Solved!
    Go to Solution.

    In the batch and parallel models you can access this information using:
    RunState.Root.Parameters.ModelData.StationInfo
    -Doug

  • Can I desynchronize one station with batch process model?

    Hi,
    My project has 5 stations run test in parallel. I decide to use batch process model since I want them to start and stop together. Beside start and stop, I have some certain part in the test sequence need to sync together. But in 5 stations, I want one station work without sync at these steps. I tried using batch synchronize with precondition but it looks like other stations still wait for the one I skip the sync. My another option is using rendervous with number of parallel thread is total - 1. I test and this works. But I still want to know if I can use batch synchronize step or not because this offer the start sync and exit sync feature.
    Thank you!
    Solved!
    Go to Solution.

    NTT wrote:
    Doug,
    Thanks for your answer.
    I want to have something happens parallel with other threads but without affect by batch sync steps. I have multiple stations working parallel in assembly line. They are sync because of pick and place. But I want to have one process works as station manager who keep track of UUT between station and other environment condition like pressure, temperature.
    Thang
    Generally, the intent of the TestSockets in the process models is that they will have a 1 to 1 correspondence to UUTs, does your 5th socket correspond to a UUT? In otherwords are there 5 UUTs under test at one time? UUTs often need things like report generation or database logging. Does your 5th socket require report generation? If not perhaps this 5th socket is really more of a utility thread and thus creating a new thread or execution at runtime makes sense for it. If your 5th socket instead does really correspond to a UUT that is being tested in parallel enitrely separately from the other UUTs then perhaps you should start up a new execution for that socket using the sequential model and just have that running at the same time as your other sockets are running with the batch model.
    So it really depends on what you are using that 5th station/thread for as to what approach would likely work best.
    Hope this helps,
    -Doug

  • Setting global variable to be used in a SQL task

    I am trying to create a simple SSIS package to be used in the SQL Task
    The SQLStatement is
    Update dbo.Users
    set FirstName = ?
    where UserID = 2
    Added a parameter mapping for User::strDataString
    From the data manager dynamic script, I included following code to prompt for the value and set to the global variable and then call the excecute SQL task.
    PROMPT(TEXT,%strData%,"Enter value",,"")
    GLOBAL(@[User::strDataString],%strData%)
    TASK(Execute SQL Task,,)
    When the check the database, the table is getting updated only with the default value of the strDataString but not with the value entered in BPC.
    Am I missing any link?
    Thanks
    Omkar
    Edited by: yomkar on Mar 17, 2010 1:13 PM

    Hello,
    on which version of BPC are you running ?
    Can you try to make all your SSIS variables upper case, it helped me on earlier versions of BPC.
    Be aware too that if you have an instruction like GLOBAL(STR,some_value), BPC will do a string replacement within the MODIFYSCRIPT variable  : "STR" -> "some_value".
    for example :
    GLOBAL(STR,some_value)
    TASK(STR TSK,....) will be replaced by TASK(some_value, ....).
    Vladimir.

  • Global variable per schema

    Hi,
    I want to define a variable per schema to hold a schema display name.
    I thought about holding it in a specific table but I think it's wasteful to hold such a segment for that
    and an access to the value causes block read.
    I also thought about defining a function somthing like that:
    CREATE OR REPLACE FUNCTION getDisplayName RETURN VARCHAR2 IS
    BEGIN
    RETURN 'SchemaDisplayName';
    END getDisplayName ;
    I also thought about session context but I want to avoid initializing it each time I connect to the schema.
    Does anybody know what is the efficient way to hold it? Is the function solution is the best approach?
    Thanks
    dyahav

    Hi, Dyahav,
    The function you posted does not take any arguments. Do you really want a constant, or do you want something that might return different values for different users? It would help if you posted more details about what you need, and how you see it being used.
    If you want a constant, then a function is okay. If the value ever needs to change, the function will have to be changed. Although this may be a trivial change, not everyone is capable of doing it.
    If you want to store some information keyed by username, tables were designed just for that sort of thing. I don't understand your objection to using a table. No matter where you store the information, it's going to take up space, and will require a disk read if it's not already in memory.
    If the data is stored in a table, authorized users can be allowed to change it.
    It's not unusual to have application-specific attributes attached to users. You may have others in the future. If you create a table, you can add more columns to the table to handle the new attributes.

  • Printing Adobe PDF using mass/batch processing

    I've got Purchase Order, Contracts and RFQ forms created using Adobe PDF print forms. Currently, immediate processing is used to print/email/fax the forms (that means that after a PO/Contract/RFQ is created, it is immediately printed/emailed/faxed). An enhancement I'm working on is to allow for mass/batch processing so that the forms will be printed/emailed/faxed at a set time each day. The issue I'm facing is that using mass processing, the PDFs become corrupted (for example, the first PDF form is sent ok but subsequent forms become corrupted or become a duplicate of the first one). When customers receive the corrupted PDF, they get the error that the form cannot be opened.
    Does anyone have a suggestion on how to accomplish batch/mass processing using Adobe PDF forms? Right now, the immediate processing path is working fine since the there is low volume. However, the goal is to switch to mass processing once volume increases.

    I copied and made modifications to the SAP standard print program SAPFM06P and called it ZSAPFM06P. I also made copies of the include files. So for immediate output processing, each time a Purchase Order PDF is created it calls the print program ZSAPFM06P. This process works great no matter how many PDFs are created from POs.
    The issue is with BATCH/MASS PROCESSING. Here is the scenario:
    - Purchase requisitions are created anytime during the day.
    - Every 15 mins., the purchase reqs are batched together and an automatic process starts that converts them to purchase orders.
    - Creating each PO calls the print program ZSAPFM06P and depending on the communication strategy, the POs are either printed, emailed or faxed to the customer.
    The problem seems to be that when multiple POs are created, some get corrupted and some become duplicate of other POs. However, using immediate processing, this is never the case no matter how many POs are created.
    I checked the program and the internal tables and variables used in the code do get cleared/reset each time a PO is created so I don't see how using immediate processing works while batch processing doesn't even though they both call the same program.
    I hope this makes it clear a little bit.

  • Add serial number in the report file name when using batch process model

        I would like to append a string containing the current UUT serial number to the base name of the report file. For example, uut_report.html becomes uut_report[SN000001].html. This setting is not available if I use NI BatchModel.seq as my process model.
    Thanks!
    Jacky

    duplicate post
    Ask your question only once.

  • CS4 open script using Bridge batch processing

    I wrote a script in CS to open a logo file (.psd) and copy it onto a photo
    Since upgrading to CS4 the script will not work with batch processing in bridge. It does work in Photoshop on a single image however.
    Here is my open script....when I batch process it brings up an open dialog instead of just opening the file
    ///CODE
    var activeDoc = activeDocument;
    var logoDoc = open(File("/c/stlg.psd"), OpenDocumentType.PHOTOSHOP, false);

    That didn't work either :(
    I was looking at the OpenDocument.jsx sample in the scripting samples directory and tried batch processing it....it opens a photoshop sample psd file and it worked...though I don't understand the code or why my code above won't work
    /////OpenDocument.jsx code
    //var strSamplesFolderDirectory = localize( "$$$/LocalizedFilenames.xml/SourceDirectoryName/id/Extras/[LOCALE]/[LOCALE]_Samples/value =Samples" );
    //var strSampleFileNameLayerComps = localize ("$$$/LocalizedFilenames.xml/SourceFileName/id/Extras/[LOCALE]/[LOCALE]_Samples/Layer_Com ps.psd/value=Layer Comps.psd");
    var fileRef = new File(app.path.toString() + "/" + strSamplesFolderDirectory + "/" + strSampleFileNameLayerComps);
    open (fileRef);
    fileRef = null;

  • Batch processing of multiple test stations

    Hi All,
    Bit of a complex one here (for me anyway!) that I want to bounce off you clever people to see if can aid me in any way.
    I am about to develop a system which uses a 6 UUT position(so 6 UUTs are held on a wheel) device which spins around. There are two test PCs and hardware at points on the system (say at position 1 and 4, although the idea is to perhaps add more at the other empty stations) and the wheel is moved around at set intervals to present the UUT to the test station (approx 2s, but this can be varied depending upon processing time). UUTs are fed onto and off of the wheel at station 6 (ie when the UUT has been around stations 1-5 it is pulled off and a new one is put in its place).
    The two test stations will be using TestStand and the remote engine to sequence tests with LabView code modules and due to the set movement time of the wheel I will be doing 'hands on' tests when the UUT is at a test station and I will be processing the test data for that UUT when it has moved around (although obviously I will then be taking measurements from the next UUT on the wheel).
    I was thinking of using the batch processing model for this task and was going to have 6 UUTs running at the same time. I can clock the UUTs around using Labview and have wait/processing points while that UUT is not being physically tested.
    My questions are:
    1) My process is going to be contiunous (it will run 24:7) as the 6 test sockets run, each one step in front of the other, can they independently produce test reports and then be restarted for the next UUT which has been introduced to the wheel? I dont want the traditional 'Run Test, get results, re run test, get results'. I want the process to be continuous, so results files will be popping out every 2 seconds as a UUT has moved around all of the stations and dumped in the PASS/FAIL bin
    2) Is it possible to have an array of common parameters between the batch processes or will they all have seperate parameters.
    3) Kind of linked to 2, but I assume that if each batch is running in a seperate thread that the data they share to labview will be seperate to each test socket. There will only be a single instance of each test running at one time. Is there multiple sequence contexts (one for each test socket?) or is it one big one?
    4) Am i using the right approach? Test Stand is definitely the thing for this customer and I feel it will help us, but am I going to be using in the right way?
    Thanks in advance
    Marlon

    Let me answer question 4 first since it will effect my answers to questions 1-3.
    4) It sounds to me like you should really be using the parallel model instead of the batch model. The batch model was really intended for things that need to be tested as a group. In otherwords, a tray of 6 items that all start being tested and complete being tested together, and then a completely new tray of another 6 items is tested after that. What you have really is more of a set of 6 independent test sockets running in parallel with some synchronization involved because of the interdependencies and that is more what the parallel model is designed for.
    1) If you are using the parallel model than the answer to this is yes. You can set things up so that each testsocket writes its reports to a separate file completely independently from the other test sockets. This is also kind of true for the batch model, but in the case of the batch model, all test sockets must wait for each other to complete before the next batch of uuts can be tested and this does not sound like what you really want.
    2) Yes, but there are several ways you can accomplish this. One way would be to use file globals for your mainsequence file and edit the sequence file properties setting for the file to share file globals between executions. But because you are running remote executions you will then have to go to the additonal step of passing the data that you want the remote sequences to have as parameters to the remote sequence. You will need to pass the data as parameters rather than use the share file globals setting for the remote sequences on multiple machines because that setting only works for executions that are all running on the same machine. Passing parameters however is pretty easy to do and to use on the other end. Also I'd like to add that it might be possible for you to run everything on one computer. I'm not sure what your reason for having multiple computers is though.
    3) By batch I'm going to assume you mean test socket (i.e. "each TESTSOCKET is running in a separate thread"). A batch is a group of testsockets. And if you mean testsocket then the answer is yes, you are correct. Each testsocket runs in a separate execution and thus a separate teststand and OS thread. Additionally each will have a completely separate sequence context. However, if you pass the same data as a parameter to all of the sequences (i.e. a set of global variables of some sort), then they will all be able to access that same data. Additionally, you can pass data between threads using synchronization step types such as queues and notifications.
    Hope this helps, if you need more information let me know.
    Douglas Melamed
    NI

  • How do you get a station global or any variable to be read across UUTs executing in the parallel Sequence model?

    Dear  Support,
    I have two questions regarding the parallel sequence model:
    I am trying to find a global variable or any variable that can be universally read from any thread / step .   For instance:
    - Parallel sequence Model
    - 2 UUTs
    - The main sequence has 20  steps
    - I am looking for a variable that can be read universally across both UUTs in any step.  I have tried many, even the station global variable - as a Boolean - for "Abort" .  But that did not work either.
    Question TWO:   How can I bring out this universal variable to the UI ?  Can you point me to an example?    Do I use the "Lookup"  ,.  I could not get that to work.  Can I use the "Label"  ?  I could not get that to work neither.
    Thanks! Brad
    Brad Whaley
    LabVIEW Certified Engineer

    1. http://digital.ni.com/public.nsf/allkb/21368C716B06780A86256A5C007075DB
    2. Post UI Message http://zone.ni.com/reference/en-XX/help/370052K-01/tsapiref/reftopics/engine_postuimessage_m/
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Using global variable in package

    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package. Can someone help me in the declaration of this variable as a global variable? Also, is it necessary for me to initialize this variable whenever the package executes. If yes, how would I do this?
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    FUNCTION Retrieve_SerialNo RETURN VARCHAR2 IS
        v_serial_no VARCHAR2(20);
        CURSOR Serial_Code IS
          SELECT S.Serial_Code
            FROM Spare_Parts s, Orders r
           WHERE s.serial_code = r.serial_code;
      BEGIN
        OPEN Serial_Code;
        LOOP
          FETCH Serial_Code
            INTO v_serial_no;
          EXIT WHEN Serial_Code%NOTFOUND;
          v_serial_no := v_serial_no;
        END LOOP;
        CLOSE Serial_Code;
        RETURN v_serial_no;
      EXCEPTION
        WHEN OTHERS THEN
          RETURN NULL;
      END;

    user13415143 wrote:
    Hi. I have created a function (Retrieve_SerialNo) which returns a variable, which I use throughout my package. I would like to assign this variable as a global variable to be used by all functions and procedures in the package.All variables have scope or "visibility". A variable defined in a procedure is only visible within that procedure.
    A variable defines in a package body. is visible within that package body (i.e. procedures and functions in that package body can "see" that variable.
    A variable defined in the package definition? Well, who can see the definitions of procedures and function in a a package header/definition? Everyone else basically (other PL/SQL packages and procedures and functions). So this is also true for variables defined in the package interface. These are global variables that not only can be used by the code in that package's body, but also can be used by other packages and PL/SQL code.
    So when you create a global variable you need to decide on its scope:
    - define it in package header for global usage in all PL/SQL code
    - define it in package body for global usage within that package only
    CREATE OR REPLACE PACKAGE BODY Supply_Item_Interface AS
    ..snipped..Ugly code as there is no need to use an explicit cursor if returning a value from a single row. Also buggy code. If there are multiple rows returned by the cursor, the function returns the serial of the last random row. How does this make sense?
    This is what I would expect to see from a function like this. You pass it a unique identifier and it returns the applicable attribute (column) value for it.
    E.g.
    create or replace function GetSerialNo( orderNo number ) return number is
      serialNo number;
    begin
      select
        s.serial_code into serialNo
      from spare_parts s,
           orders o  
      where s.serial_code = o.serial_code
      and o.order_no = orderNo;
      return( serialNo );
    exception when NO_DATA_FOUND then
      return( null )
    end;Also note that there is no need to write ugly uppercase code. This is not a proper coding standard. Programming standards for all languages (ranging from C# to Java to Delphi to Visual Basic to C/C++) specify that camelcase should be used for variables and pascalcase for procedures/functions/methods. Uppercase is very seldom used and then only for constant names and compiler options/flags for example.
    Coding reserved words in uppercase? That is just plain silly - and not found in today's programming languages. Do yourself a favour and forget the idiotic standards used by some for PL/SQL and look at the standards for Java and .Net/C# - as the latter are the de facto standards for programming (and have been for the last 2 decades and more).

  • Batch Processing error: Object variable or With block variable not set - 91

    We are experiencing the following error when trying to execute the FDM Batch Processing of files in our UAT environment. This error is not occuring in our DEV environment. I have seen this error before when the data file had been left open and FDM could not access the file, so it appears this error is usually due to file permissions. However, this time none of the files are open, and as far as we can see, FDM should have full access to the OpenBatch and Inbox folders etc.
    Does anyone please have any suggestions, particularly on what account FDM will carry out the various tasks? Would it use a system account?
    Error:
    "Object variable or With block variable not set - 91"
    FDM Log:
    ** Begin FDM Runtime Error Log Entry [2012-07-06 16:07:09] **
    ERROR:
    Code............................................. 75
    Description...................................... Path/File access error
    Procedure........................................ clsBatchLoad.fFileCollectionCreate
    Component........................................ upsWBatchLoaderDM
    Version.......................................... 1112
    Thread........................................... 5828
    IDENTIFICATION:
    User............................................. admin
    Computer Name.................................... *******
    App Name......................................... *******
    Client App....................................... WorkBench
    CONNECTION:
    Provider......................................... ORAOLEDB.ORACLE
    Data Server......................................
    Database Name.................................... *******
    Trusted Connect.................................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location......................................... *******
    Location ID...................................... 748
    Location Seg..................................... 2
    Category......................................... *******
    Category ID...................................... 14
    Period........................................... *******
    Period ID........................................ 02/07/2011
    POV Local........................................ False
    Language......................................... 1033
    User Level....................................... 1
    All Partitions................................... True
    Is Auditor....................................... False

    I can confirm that there is definitely data present in our data files in this case.
    Please note that this error only occurs when using the Batch Processing functionality of FDM Workbench (which requires files to be placed in the OpenBatch subfolder of the Inbox). I can load individual files fine when using the FDM Web Client.
    As part of the first step of the batch load process, FDM Workbench moves files from the OpenBatch folder to a new folder which it creates in the Inbox\Batches directory. However, it is not even managing to do this, and gives the error below.
    We have tried to share the OpenBatch folder, to allow specific users access to drop files into this folder. Consequently, I believe suggests a security problem on the OpenBatch folder itself (please see original post). I have been told privileges should be sufficient for FDM to make use of this folder too, however I suspect this is not the case at present.
    In the meantime, please let me know if this could be due to other causes.

  • Passing values to global variables while running job via management console

    Hi All,
    I have a requirement, where I have to use HANA view with input parameters as source. I am doing the same by placing the HANA query for view with input parameters, in SQL transform and assigning values to placeholders using global variables. This is working fine at the designer level.
    But where I am stuck is, it possible to pass values to global variables while running job in Management console or in a third party scheduler. Should I do any changes in the batch job to achieve the same ?
    Please help me with the same and also let me know whether my approach of using Global variables to assign values to input parameter of HANA view is right?
    Thanks,
    Deepa

    Select Batch > Batch Job Configuration > Add Schedule and Expand the Global Variables section in the Schedule Batch Job tab. You can then specify a value for all your global variables.
    Alternatively, work with control tables and assign values to the global variables in an initialisation script.

  • TestStand station globals sharing between two applicatio​ns

    Hi,
    I am having two applications developed with CVI 8.5 and TestStand 2010. Both are accessing same station global variable”ESSX2_0.Aux.Status”. Please create a station global in TestStand 2010.
    The idea is the Write application shall get the status of the Aux status control at an interval of 1 sec and updates the station global. The Display application shall read the station global and displays the value of the station global.
    The write application is updating the station global and I can see the status in Teststand Sequence editor. But my updated value is not getting reflected to my Display application unless I restart the application. I am understanding that the status of the station global variables is taken at the time of the application start in my display application and is not getting refreshed to get the changes from external applications till we restart.
    Please help me out so that the display application keeps looking for the updated values.
    Attachments:
    Aux Display.zip ‏1759 KB
    Aux Write.zip ‏1760 KB

    Station globals are not shared across processes unless you pass a reference to them across processes. There are several ways to do so. The easiest thing to do is create a TestStand sync object like a notification or queue which can transfer a reference to the station globals across processes. Or use the notification or queue directly as your communication mechanism. TestStand sync objects whose name you start with an asterisk '*' character are automatically shared across processes. You can use Engine.GetSyncManager() to get the appropriate sync manager and then use the SyncManager API. Please see the help for more details.
    -Doug

  • APIs for Station Globals

    Hello,
    Could someone please point me to the TS APIs to Create/Set/Get/Delete Station Global variables?
    Thanks,
    Sriharsha

    Howdy Sriharsha,
    Attached is an zip fle with an example sequence that uses two activeX calls to insert a Station Global variable.
    Hope this helps!
    Best Regards,
    Jonathan N.
    National Instruments
    Attachments:
    Example1.zip ‏37 KB

Maybe you are looking for

  • Database Polling: Parent-Child Relation

    Hi all, We are experiencing problem while picking multiple records from child table while polling from the database. Summary: Parent table: Temp1 : Columns- Id,Name,Status Child Table: Temp2 : Columns- Id,Item Now lets say data present in table are T

  • How do I get my Iphone 4 out of recovery mode after an update without restoring it?

    I need help trying to get back my iphone to normal. I can't restore it because I didn't back up the video I made 2 days ago and I need it for school. How can I keep everything without restoring it to factory settings or back to what it was when I las

  • Convert Calendertype to Date

    Hi How can I convert a calender type to date type: Date retiredate = wdContext.currentResult_RetireRequestGetElement().getRetireDate() <-----type calender //Notification date                          Date notifDate = retiredate;                      

  • Cannot play Flash content in IE7

    When I navigate IE7 to any site (including adobe.com) that has Flash content, I get a message saying I need to enable javascript (it is) and/or upgrade my Flash player. I am running Vista, and this worked until sometime in the last week or so. Flash

  • CS4, mamp v213 getting a blank page

    Hi, I'm new to dynamic stuff, but I appear to have set everything up okay - I can see tables and records in DW properties panels and all tests are good. However, when I apply a filter to the recordset, (filter by postcode) and using a form (in a sepe