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

Similar Messages

  • The post-expression for the step 'Set Station Global Models' could not be evaluated.

    When running a TestStand sequence, I get the following error message:
    The post-expression for the step 'Set Station Global Models' could not be evaluated.
    Variable or property types do not match or are not compatible.
    Error Code:  -17321; Variable or property types do not match or are not compatible.
    Although I do understand what the above is telling me, fixing the root cause is somewhat another thing.
    I'll explain the scenario.  The code is developped in TS4.1.0, although that should be irrelevant.
    I inherited a TestStand project which calls LabVIEW modules.  The original sequence works fine on the test pc (which is remotely located).  The local and remote PC's share the same StationGlobals.ini.
    Here is why it is strange..  I do get the error message on the local PC whether I use the old or the new code.  I was assuming that using the same StationGlobals.ini would have fixed that, but it didn't. 
    When I run the old code on the remote PC, I do not get that message, but I do get it with the new code.  I don't recall modifying code that affected the StationGlobals.  My goal is to fix it on both machines (at least the remote one).
    This is the expression that it does not like:
    StationGlobals.Models=Locals.Models,
    However, that very same expression exists in the original code.  The one thing that did change is the addition of a new model number in the Locals.Models.newNumber.  I suspect that this contributes to the error.  But why does it give me an error when I run the original sequence locally?  Maybe I should try running it again..
    In either case, any suggestions to overcome the error?
    Thanks.
    RayR
    Solved!
    Go to Solution.

    Please ignore post.
    I found the problem..  There was a mismatch with the number of models.  Easy fix.  It's all good.
    For someone else who might tumble onto this thread for the same reason, here's an explanation.
    I added a new model with its variants to the list of Locals.Models.  In total, there were 16 additions to the list.
    I also added these to the StationGlobals.  Which meant that my StationGlobals no longer matched the one on the remote PC. 
    Where the error came in is that there was one missing model in the StationGlobals, so the size (number of models) did not match that of the Locals. 
    Slight oversight in the sea of models that are listed (I'm not even going to count them).  Now fixed. 
    ... and embarrassed ...
    I may as well give myself an "Accepted Solution".
    Spoiler (Highlight to read)
    Since I've been naughty all year it will be my only Christmas gift..
    Since I've been naughty all year it will be my only Christmas gift..

  • 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

  • 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

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

  • 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

  • Java doc for container ,global container.

    Hi ,
    Can somebody tell where I can get the javadoc for container and global container.
    THnks

    Hi,
    You can view the the source code also provided if you have proper Decompiler tools.
    I have used a tool to open <b>aii_mt_rt.jar</b> and found the following for <b>Global Container</b>.
    Global container:
    package com.sap.aii.mappingtool.tf3.rt;
    import java.util.Map;
    public interface GlobalContainer
        public void setParameter(String string, Object object);
        public Object getParameter(String string);
        public Map getParameters();
    For Container:
    package com.sap.aii.mappingtool.tf.rt;
    import com.sap.aii.mapping.api.AbstractTrace;
    public interface Container
        public Object getParameter(String string);
        public void setParameter(String string, Object object);
        public AbstractTrace getTrace();
        public GlobalContainer getGlobalContainer();
    Hope this helps.
    Regards,
    Ananth

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

  • 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

  • API for CRM Html Roles

    Hello,
    *(1)*
    how to deallocate/revoke CRM html roles using API?
    I found following API for assigning CRM roles:
    jtf_auth_bulkload_pkg.assign_role(username, role)
    Now I am unable to find API for deleting role assigned to particular user.
    Please suggest the way to find any API related good reference and also API for revoking role.
    *(2)*
    what is functionality of jtf_auth_principals_pkg's delete_role function?
    from where it is called?
    Thank You.
    Swati Thakkar
    Edited by: Swati on Dec 30, 2011 3:49 AM

    From the user guide:
    http://download.oracle.com/docs/cd/A99488_01/acrobat/jta115ug.pdf
    Roles are groupings of permissions, which are page level or function level granular
    privileges used to maintain application security. A single user can be granted
    several roles, each of which separately determines access rights to the user interface
    details, the ability to perform certain transactions and the ability to access certain
    data sets. During the registration process, users are granted the appropriate set of
    roles that map to their job function. Although Oracle User Management contains the
    following predefined roles, users with the appropriate access privileges can also
    create and customize their own roles.
    49.7.3.1 JTA_UM_DELEGATION_ACCESS
    The JTA_UM_DELEGATION_ACCESS role is assigned the
    JTA_UM_DELEGATION_ACCESS permission and provides users with all of the
    access privileges associated with this permission.
    49.7.3.2 JTA_UM_SETUP_ADMIN
    The JTA_UM_SETUP_ADMIN role is assigned the JTA_UM_SETUP permission and
    provides users with all of the access privileges associated with this permission.
    49.7.3.3 JTF_APPROVER
    The JTF_APPROVER role is assigned the JTF_APPROVER permission and provides
    users with all access privileges associated with this permission.
    49.7.3.4 JTF_PRIMARY_USER
    The JTF_PRIMARY_USER role is assigned the JTF_PRIMARY_USER_SUMMARY
    permission and provides users with all access privileges associated with this
    permission.
    49.7.3.5 JTF_SYSTEM_ADMIN_ROLE
    The JTF_SYSTEM_ADMIN role is the global system administration role and
    contains all permissions required to access and operate the System Administration
    Console including JTF_SECURITY_ASSIGN_ROLE and JTA_UM_SETUP.

  • 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

  • Teststand station global

    Hi,
    Can any body tell me what is the difference between TestStand Sequence file global variable / station global variables and LabView global variables.
    In TestStand, I want to pass one cluster from Setup to Main, which can't be passed using Local variable.
    Using LabView Global variable, I am able to pass cluster from Setup to Main.
    Using TestStand Sequence file global variable / station global variables, the cluster has not been passed from Setup to Main.
    Any help will be appreciated.
    Thanks
    Holy

    Holy,
    Local Variables:
    Each execution has its own copies of the local variables. So you can not use them to share data between executions.
    Use local variables to store data relevant to the execution of the sequence.
    Sequence File Global Variables:
    Any sequence in the file can access the global variables for the file. A subsequence can access the global variables in the sequence file that contains the calling sequence.
    Global Variables:
    Station global variables are persistent across different executions and even across different invocations of the sequence editor or operator interface. The TestStand Engine maintains the value of a station global variable in a file on the computer on which it is installed.
    LabView Global Variable.
    The LV global variables are used to access and pass data among several VIs.
    TestStand can not access LV global variables directly.
    You need to call it through a code module.
    I am not sure how are u handling the cluster.
    I assume that you are initializing it somehow in the setup group and after that you use it in the main group.
    1. If you get the cluster from a VI in the setup group and after that you want to use it in the main group you could use a local variable.
    2. If you need to share the cluster among several executions you need to use a global variable.
    Could you give more details about your use case?
    Hope it helps
    Antonio.
    Message Edited by Antonio Lie (NI) on 11-11-2005 10:16 AM

  • 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

  • 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

Maybe you are looking for

  • Audio problems in Flash Player and Firefox

    Hi everyone! I have a problem that has been plagueing me for nearly a year now, all audio in all videos i play in Firefox goes out of synch, the video will start ok then at around the two minute mark the audio starts to lag until it's completely left

  • Why is the video and the audio in iTunes drifting out of sync?

    This has been happening for awhile, and it is annoying me quite a bit.  I can run the video find directly through QuickTime.  I have been serching for an asnwer for awhile now.  I have the most recent version of iTunes 10.5.  Help would be appreciate

  • Mac desktop won't start

    I have a Mac desktop that won't go past the gray screen. Tried safe boot did nothing. So tried starting from installation disk and using disk utility. I get to when it asks you to select to disk, volume or image and I select Macintosh HD or if I sele

  • Action Dropdown failure

    The action drop down does not function in an interactive report. It works on an existing page in the application. The page in question is branched to from a another page. When I copy the page that works and branch to it, the action drop down does not

  • Photoshop Extended for students dowload

    I had this downloaded on my old windows pc and am now trying to download onto my macbook I have my code but I can only download the normal one and my code isnt valid on this version. How can I re download the student version.