Station global array

Hi,
Using a sequence with active X calls to  create an intialise station globals is the solution to our problem.
But,
There doesnt seem to be a way to set or get an Array.
Does anyone know how to do this ?
i.e
Using Active X steps:
Programatically create an array in the station globals.
Set values of this array.

Hi,
Use the SetValVariant  method.
Your array must exist, as the option 0x01 (insert if missing) is not supported using the SetValVariant method.
As an example, Call PropertyObject.SetValVariant("MyArray", 0, {1.2, 2.3, 3.4}) using "StationGlobals" as the reference will fill the array called StationGlobals.MyArray. If the array is already sized and has contains then that contents will be overwritten and the array will be resized, e.g for my example it will become a size of 3 elements.
Check out the examples for accessing arrays with other languages in the examples folder of TestStand.
Regards
Ray Farmer
Regards
Ray Farmer

Similar Messages

  • How to create an array Station Globals programmatically in CVI?

    Hello all,
    I want to create an array Station Globals programmatically in CVI. Where can I find some examples?
    Thanks,
    Zhonghui Ning

    Zhonghui,
    There is a KnowledgeBase on our website that describes the methods needed to do this. You can find the KnowledgeBase at http://digital.ni.com/public.nsf/websearch/C7C81F4AE5A46BB686256CDA005FA4C6?OpenDocument.
    I found this by searching for "teststand create variable". You can find TestStand examples on our Developer Library by going to http://www.ni.com/devzone and clicking on the link for Developer Library. This page has example code as well as tutorials and application notes on many aspects of TestStand. There are quite a few examples there that already address this type of question: Creating Sequence File Global Variables Using the TestStand API with LabWindows/CVI
    and Creating and Inserting a New Data Type into a Sequence File using LabWindows/CVI
    We continually add examples to these web pages, so it is always a good place to look for examples. While they may not have the exact answer to your questions, the examples usually cover a topic that is close enough for you to be able to apply the example to your question.
    Hope that helps.
    Regards,
    Shannon R.
    Applications Engineer
    National Instruments

  • 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

  • Station global run time

    Hi, hope someone can give me some advice on this one.
    I have 2 seperate 1D string arrays returning to Station Globals in Teststand 4.0 from seperate LAbview VIs.
    The first array contains the names of LIN signals (which all stay the same for the length of test)
    The second array contains the current state of the LIN signals ( which can change as the DUT activates its functionality )
    For example, position 2 of the first array contains the string "TrunkLidState".
    And position 2 of the second array can change between the following, "open", "close"
    What I need to do is test for a status of any of the signals in such a way that I can say  :
        if Trunklidstate = "open" then Pass
            else
        if Trunklidstate = "closed" then Fail
    rather than going :
        if Stationglobals.LIN_Array[1]= "open" then Pass
           else
        if Stationglobals.LIN_Array[1]= "closed" then Failed
    because "Trunklidstate" may not always be in the second element of the array.
    Thanks

    Hey Mike,
    The problem here is that you don't know where in the array "TrunkLidState" will reside.  Therefore you will have to search the array for that index.  Then use that index to index the other array. 
    Option 1- Have a 3rd VI that takes in 4 parameters: LIN State, LIN Names, State, Condition.  State = "TrunkLidState", Condition="open".  Inside the VI use the Search 1D Array function to get the index of State.  Then use the Index Array function to get the status (either open or closed).  Then compare that with the Condition.  If it equals the condition then return True if not then return False.  This could be a Pass/Fail Step type.  I have attached the VI for you. 
    Option 2- Make the first array static so that you always know "TrunkLidState" will be in the same position.
    I'm sure there are other options but these two came off the top of my head.
    Let me know if you have any questions about this.  or if I'm missing the point completely.  I do that sometimes.
    Later,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~
    Attachments:
    LINPassFail.vi ‏10 KB

  • How to log strings stored in Station Globals and/or PreUUT values?

    Hi all,
    I have a Station Global that is persistent across all UUTs in a particular PC. I have also created a custom PreUUT dialog to obtain user input that applies to the upcoming UUT (I pass this user input to the UUT by storing it in a File Global). Both the Station Global and the File Global store a string.
    What is a good way to log these strings into the ATML report and SQL database?
    Currently, the best solution I can think of is:
    Create a LabVIEW VI that takes a string input and passes it straight through to the output
    Pass the Station Global (or the File Global) into the VI input
    Assign the VI output to Step.Result.ReportText
    This seems rather cumbersome though. Is there a simpler way to achieve this? (i.e. is there a built-in TestStand action that logs a variable directly into the report?)
    In case it's important, I'm using TestStand 2013 SP1 and I'm using the default report templates: tr5_horizontal.xsl for ATML, and C:\Program Files\National Instruments\TestStand 2013\Components\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql for SQL.
    Thanks!
    Solved!
    Go to Solution.

    JKSH,
    You can handle this with the Additional Results functionality in TestStand, which can be configured in the settings for an existing step, or as a standalone step type. We have an example of this in the TestStand Fundamental Example series here: http://www.ni.com/product-documentation/52354/en/#toc3   (Look for section 3, "Adding Custom Data to a Report"
    I hope it helps, and let us know if we can do anything else to help!
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Error while accessing station global in LabVIEW

    I am trying to access the teststand station global value in the LabVIEW using activex methods.
    If I am reading default station global (TS.LastUserName) i am able to read the value.
    However if i am trying to read the value of the string station global which i am updating through running sequence i am getting an error as follows:
    "Unknown variable or property name 'ExecutionTime'.
    Error accessing item 'ExecutionTime'. in GetGlobal.vi" where ExecutionTime is the name of my station global.
    Error code is -17306.
    What is going wrong?

    Couple of suggestions for you:
    If you are trying to read the execution time in your user interface, I suggest: http://zone.ni.com/reference/en-XX/help/370052K-01/tsapiref/reftopics/obsolete_thread_postuimessage_... method to pass data to UI
    Also, station globals are not dynamic like other variables (Locals / FileGlobals etc) which means that you wont get an updated value until the stationglobals.ini file is saved. So depending on what you are trying to read, this may or may not be your best choice.
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • Apex_items and apex global arrays

    Hi,
    I'm using apex_item.checkbox and apex_item.text via an sql report like this:
    SELECT
    id,
    apex_item.checkbox(1,id) " ",
    apex_item.text(2,name) "name"
    FROM APEX_APPLICATION_FILES
    WHERE REGEXP_LIKE(name,'txt');and an after submit process like this:
    DECLARE
    BEGIN
    --Loop through the selected id
    FOR i in 1..apex_application.g_f01.COUNT
    LOOP
      IF apex_application.g_f01(i) IS NOT NULL
        THEN
           INSERT INTO INC9_TEST(t2)values(apex_application.g_f02(i));
           wwv_flow.debug('MY PROCESS:' || APEX_APPLICATION.G_F02(i));
      END IF;
    END LOOP;I've two rows sample data like:
    Id  name
    1   abc
    2   defWhen I select the checkbox for Id 2, it keeps returning Id 1 in the apex_applicaiton.g_f01 global array instead of Id 2. But If I select both checkboxes, then it correctly loops through with id of 1 and 2. Does anyone know why this is happening and what the fix is for this strange behavior?
    Thanks

    OK - I did explain that on the thread I linked to. You need to have the checkbox values set to the row numbers. This can be done using something like:
    APEX_ITEM.CHECKBOX (1, '#ROWNUM#')Now, if the user checks any checkbox(es), the value(s) submitted will be row numbers.
    You can then use this to retrieve the NAME value for the same row:
    DECLARE
    vROW NUMBER;
    vNAME VARCHAR2(100);
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
      vROW := APEX_APPLICATION.G_F01(i);
      vNAME := APEX_APPLICATION.G_F02(vROW);
      ... etc...
    END LOOP;
    END;So, we first get the row number for each checked item and then use this to get the name value for the corresponding row.
    Andy

  • Station Globals modified externally are not reflected

    Hi,
    I am having an UI developed in CVI(EXE1) which runs a teststand sequence. The flow of sequence is controlled by Station Globals.
    The Station Globals i am trying to control from another user interface so that the flow in EXE1 will be exrcised. But some reason the updated station globals are not reflected in EXE1.
    In the sequence i have used Engine.ReloadGloabls() but some reason the values are not reflected.
    Anyone can help me out on this.

    Hey ramjeev,
    Are you certain that the globals are being saved from the location you edited them before you call the Engine.ReloadGlobals()? Also, as mentioned in the function help here, you should clear or destroy your existing references to the globals before calling the ReloadGlobals() method. This is because any existing references will retain their values rather than being updated with the method call.
    However, I'm not sure if this is the best approach for your application. Typically, Station Globals are used for configuration settings, particularly those that need to persist between executions. Since you're wanting to control this test sequence from another user interface, I wonder if UIMessages or a synchronization object such as a queue or notifier would be better for this purpose. Have you explored any of these options?
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • 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.

  • 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

  • Disable Popup confirmation on station globals modified externally

    Hi,
    Is there any way to Disable the Popup confirmation Message saying the staiton globals are modified externally from TestStand?
    Regards,
    Ramjee V

    Hey Ramjee,
    Unfortunately, I don't believe there is any way to disable the dialog. I saw your other thread about the station globals, and would be happy to try and help figure out a different way to accomplish what you're trying to do that wouldn't require you to keep updating the globals. Let us know if we can do anything to help!
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Can't write to station globals in deployed system

    When I run Teststand distribution on the target system, I can’t write to the station globals from my custom application that uses the Teststand engine.  The following are the facts:
    When I run my custom application, my sequence can’t write to any of the station globals.  The function TS_PropertySetValString returns : -2147024890.
    I made sure that my distribution included the sequence editor.  When I run my sequence in the editor, I don’t get any errors AND the fields in the station globals are actually updated with the correct values.
    I have updated all of the users using the “User Viewer” in the sequence editor to make sure that the “Edit Station Globals” and “Grant All” are true.  I have added code to my custom application to query the engine for these flags and display them in a popup, the flags are TRUE.
    I also made sure that the “Check User Privileges” under the “User Manager” in the sequence editor is OFF.  It made no difference
    I am at a total loss.  Any ideas?
    Todd

    Inside my custom application EXE that launches the teststand engine, the following call works:
    tsErrChkMsgPopup(TS_PropertySetValString (m_oGlobals, &errorInfo, "TestConsoleInfo.Operator", 0, sText));
    The above call uses a globals object
    Inside the DLL, that is invoked by the sequence file being executed by my custom application, the following function fails with totally bogus info in the tsiErrorinfo structure.  And yes, the sequence handle is valid because this same sequence handle is used to read from the station globals, we just can't write to the station globals.
    iStatus = TS_PropertySetValBoolean(g_iTSseqHandle, &tsiErrorinfo,
             "StationGlobals.ErrorInfo.CurrentError.Occured",
             0, 1);
    The above call uses a sequence object
    Todd

  • Update Station Globals from CVI UI

    Hi,
    I am having a requirement such that i need to update a station global variable to true or false based on the click on a button present in User Interface.
    My Setup:
    Labwindows/CVI 8.5
    TestStand 4.2.1
    XP
    Please point me to the basic programming examples of the CVI based User interface.
    Regards,
    Ramjee

    Are you sure you want to change the StationGlobal file or just change an actual StationGlobal variable. When the UI closes and shuts down the TestStand engine the StationGlobal file is updated automatically.
    Regards
    Ray Farmer

  • How to transfer Station Globals from 2.0 to 3.1

    I have a Teststand 2.0 sequence.  I notice that after I install
    3.1 it can not access the previously existing station globals.  I
    can enter them by hand but I need to deploy to other machines.  Is
    there a way to import station globals from 2.0 to 3.1. A collegue
    suggested copying the .ini file but I notice those files have teststand
    versioning entries.

    Hi,
    You should be able to do the same as Allen P had responded to the previous query. So did you try that.
    Also what's the point in posting your query here and in it's own post (here), it doesn't get your query answered any quicker.
    Regards
    Ray Farmer

  • 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