Realesing objects in Teststand

Using TestStand 3.5 with the debugging options on, I get the following debug message when exiting the
CVI Test Executive after running a program.
Reference to PropertyObjects
42
4 Top Level
Type Definitions : FCParameter
Type Definitions : Expression
PropertyObject
Name : Hidden
Type : Boolean
Value : False
and the following uncategorised objects
DllParameter (FCParameter)
Any ideas as to what objects I haven't released? The Test Executive has worked fine in the past but
seems to be showing this behaviour after Printing via the ReportView ActiveX Print button and then
exiting. Is this possibly a known issue with TestStand 3.5?

Does the problem only happen if you press the print button? Does the problem happen with a trivial sequence on a machine without any customization of the process models? The most likely explanation is that you have a code module that is not releasing a reference somewhere.
-Doug

Similar Messages

  • How to access the attributes in an object using TestStand.?

    hi,
    I have a class named Status in C# that has 2 data members. There is another Class named Parameter and it has functions that return objects of type Status.
    I made the DLL of the class Parameter. Then i added that class to NI TestStand and called a fucntion and that function is returning an object of type Status.
    Is there any way by which i can access the Data Members of the returned Object in TestStand ??
    Thanx in advance
    Solved!
    Go to Solution.

    Yes, there is another alternative. If you make Status a value type (i.e. a struct in C#) then you can tell teststand to store it in a corresponding TestStand data structure rather than an object reference variable. This works even for private fields in your struct. To do this:
    1) First make Status a value type and make whatever other changes are necessary in your code to account for this (value types are copied when passed by value to another method, if this is not what you want you will need to pass them by reference - i.e. ref keyword in C#).
    2) Recompile your assembly.
    3) In the TestStand .NET module specification panel you should now see a new button next to the expression for the return value of type Status that looks like the TestStand data type icon. Push that button and it will prompt you to create a TestStand custom data type that corresponds to the .NET type. Select to save the type in MyTypes.ini type palette file. You only need to do this once. Once the type is in your MyTypes.ini type palette file it will be available from then on and you only need to update it if you change the .NET type.
    4) Create a local variable of the TestStand Custom data type instead of Object Reference. Note that you can expand it and see the properties underneath.
    5) Use this new local variable to store the Status return value. TestStand will copy/update the properties of the variable to correspond to those of the .NET struct that the method returns.
    NOTE: You can also just store the individual fields of a struct in separate variables by expanding the return value of type Status once it's a struct and specifying a separate variable for each field rather than creating a TestStand custom data type.
    Keep in mind that TestStand is making a copy when you store a struct this way so changes to the struct after this will not be reflected in the copy.
    Hope this helps,
    -Doug

  • Reference to C# objects in TestStand - how to save and retreive them

    I am new to LabView and TestStand.
    I want to use 2 .NET objects in those applications
    In Labiew, I successfully created the objects, manipulate the functions through VIs and closed the references.
    While I could use the VIs for TestStand, I would rather use the DLL directly.
    I am able to create both objects in a sequence, but I have problems with the following:
      - I don't know how to save the reference to the object after the constructor is run.
        - is the object stored in Globlal variables? I tried 'RunState.Engine' but it does not work
      - I don't know how to get the reference back in the other steps where I want to reuse the object to invoke a method on.
      - Once I can do the above, I need to get it to work in the 'batch' or 'parallel' modes.
         I am using successfully the 'RunState.TestSockets.MyIndex' to select my testing resources,
         but I am still confuse as where the array of objects would be.
         Note that I already set the number of DUT <> 1 and I can create successfully my 2 objects in X instances.
    Thanks,
    Daniel Coupal

    dcoupal,
    Getting the reference to the object involves specifying that as a return value in one of your parameters when you specify the module for that action. Inside of the parameters table you can also save that return value as a local object reference and then use it later on in the sequence.
    Regarding your second question, I'm not sure what the array of objects is that you're referring to but this KB might be of some assistance.
    Message Edited by Jon M on 11-01-2006 12:44 PM
    Test Engineer - CTA

  • Passing strong type c# object to teststand

    I am fairly new in teststand and this question that I have is critical part of the project that I am working on.
    First, I am using C#.NET in VS2008 and NiTestand 4.2.
    What I am trying to do, passing custom object from C#.NET to the sequence.
    here is my code from c#:
            private void axApplicationMgr_DisplaySequenceFile(object sender, NationalInstruments.TestStand.Interop.UI.Ax._ApplicationMgrEvents_DisplaySequenceFileEvent e)
                SequenceFile sf = e.file;
                PropertyObjectFile pof = sf.AsPropertyObjectFile();
                PropertyObject po = pof.AsPropertyObject();
                po.NewSubProperty("Locals.Test", NationalInstruments.TestStand.Interop.API.PropertyValueTypes.PropValType_Reference, false, "", 0);
    //setting up of test station
    TestStation ts         = new TestStation();
     ts.Name = "sample1";
       po.SetValInterface("Locals.Test", 0, ts);
                axSequenceFileViewMgr.SequenceFile = sf;
                //learn passing data object to sequence
    Inside sequence I want it to display the ts.Name, so I am sure that the value of the object is still intact.
    And also, what do you suggest the handling of error of this object? what event in TestStand API.
    Attached is the sequence and the .net object
    Thanks in advance for your help. 
    Attachments:
    samplesequence.zip ‏8 KB

    Hi mdba,
    It looks like you're using TestStand to call a DLL that calls into the TestStand API.  If that's your objective, you can just achieve that much more simply with a Statement step in TestStand.  
    What is the TestStation class?  Is that one that you created yourself? 
    What is your overall goal of this DLL?  It looks like you are trying to store the Station ID in a local variable.  If so, TestStand tracks this on its own and you can access it with the StationOptions.StationID property.  
    Mark E.
    National Instruments
    Schedule a Free 1-Hour online LabVIEW Tutorial with an NI Applications Engineer

  • How can I instantaite a C++ object in Teststand ?

    Hello Everybody,
    I'd like to know if it is possible to instantiate a C++ object and use its methods in teststand.
    I looked for in the examples and all the dll were developped in a normal dll format (not object).
    I know it is possible in C# but I didn't find an example in C++.
    Thank you in advance
    Solved!
    Go to Solution.

    There is no way to call non-static member functions directly, but you can write wrapper functions or static functions around the members you want to call and make the C++ instance be passed in and out as a paramter (You can store pointers in Object Reference variables in recent versions of TestStand, you do however have to manage the allocation and deletion of the objects yourself).
    -Doug

  • Using LabVIEW OOP Objects with TestStand 2010

    I need to use labview classes in Teststand 2010. I am not able to pass reference between Labview and Teststand.

    Or leave it in Labview and use an action engine.
    http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801?view=by_date_as...
    That's what I have done.
    Regards
    Ray Farmer

  • Pass container object to testStand via queue

    Hello,
    I try to use queue mechanism to pass container data from labVIEW to TestStand.
    In TesStand I create a queue, lunch VI and waiting for incoming queue element.
    In LabVIEW I try to send some data to TestStand as container (cluster).
    Before this, I tried to pass numeric data and then everything was OK. Problem is only with container.
    In TestStand I created custom type. Can someone help me with this issue.
    Thanks in advance and best regards.
    Solved!
    Go to Solution.
    Attachments:
    ts1.JPG ‏113 KB
    LV1.JPG ‏140 KB

    Here you are. keep in minde, that this is only "testing" version.
    Attachments:
    Queue_test.vi ‏21 KB
    Queue-testowanie.seq ‏9 KB

  • Pass object reference from TestStand to C#

    Hi,
    I have created a GUI in .NET which i invoke in TestStand (through a custom step type). User can enter a object reference teststand variable in the UI input expression box. So i need to get the object value in that variable and use it to call some .net functions. To get the values from expression box of UI and put in TestStand step variable i use:
             PropertyObject.SetValInterface("Step.TestStationObj", 0, tsexprTestStationObj.DisplayText.Trim()); To check the value in the step variable if i do:
             MessageBox.Show("TestStation obj after setting:",PropertyObject.GetValInterface("Step.TestStationObj",0).ToString());
    But i do not get any value. Guess it is null. Is this a correct way? My intension is to get the value corresponding to a teststand object reference and pass it to C#. The C# UI control is of type NationalInstruments.TestStand.Interop.UI.Ax.AxExpressionEdit

    Thanks Andy.
    I still get the error when i am trying to pass the object created from C# to Teststand. I have explained what i am trying to do. Kindly requesting your assitance on this issue.
    I have 2 classes in C# (code given below), I am trying to pass the object of "Counter" (c1) class from the "Mainfrm" to teststand. In teststand(counter.seq), I am trying to access the function "GetCount() and SetCount()". I have attached the snapshot of the error that i get from teststand.
    Class Counter
        private int count;
        public int GetCount ()
           return (count);
        public void SetCount(int _count)
           count = _count;
    Class Mainfrm : Form
        public Counter c1;
            private void Mainfrm (object sender, EventArgs e)
                InitializeComponent();
                axApplicationMgr1.Start();
                mEngine = axApplicationMgr1.GetEngine();
                currentFile = axApplicationMgr1.OpenSequenceFile(@"Counter.seq");
                pobj = mEngine.NewPropertyObject(NationalInstruments.TestStand.Interop.API.PropertyValueTypes.PropValType_Container, false, "", 0);
                pobj.NewSubProperty("Parameters.ObjRef1", NationalInstruments.TestStand.Interop.API.PropertyValueTypes.PropValType_Reference, false, "", 0);
                pobj.SetValInterface("Parameters.ObjRef1", 0, (object)c1);
                mExecution = mEngine.NewExecution(currentFile, "MainSequence", null, false, 0, pobj, null, null);
    Attachments:
    ErrorFromTestStand.JPG ‏28 KB

  • How sharing a COM object with severeal test dlls in teststand

    I have several tests (dlls) accessing a DAQ board (not VI compliant) thanks to a COM object. I would like to keep one instance of this object, passing its reference to each test dll, instead of creating one in each test. How can I do that with TestStand?

    You can do one of two things to store a reference to the COM object in the context of TestStand so that you can pass it to successive steps in order for them to all use the same object instance.
    First, if you create the object in TestStand with an ActiveX Automation Adapter step, the method call to instantiate the object should return a reference to the object. If you designate an activex reference type local variable as the property to receive the reference during the creation operation, you should be able to pass this into methods that use IDispatch* parameters, or you can use the TestStand API to access the TestStand variable instead.
    The second scenario is very similar, in that if you don't create the object in TestStand but inside of a dll instea
    d, you can simply pass the parameter back from a function into a TestStand activex reference property variable or use the TestStand API inside of the dll to set the value of an activex reference property to the IDispatch of the object.
    To better understand how to use the ActiveX Automation Adapter and ActiveX Reference Variable Types, look at Chapter 13 of the TestStand User Manual under the section entitled "ActiveX Automation Adapter". I have also attached an example to this post that uses the ActiveX Automation Adapter and ActiveX reference datatype in a sequence that writes data to a Microsoft Excel spreadsheet and generates a chart from the data.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    Attachments:
    Write_Table_to_XL_and_Create_Chart.seq ‏53 KB

  • How to load external DLLs with C++ interface in TestStand?

    Hi,
    Can you please let me know how would I load external DLLs with C++ interface in TestStand?
    Regards.

    TestStand 3.x can only call static class C++ methods. TestStand cannot call methods on a C++ object because TestStand does not know how to enstantiate the C++ object.  In TestStand 3.x, there is a online help topic called "Exporting Class Methods and Functions in Visual Studio .NET".
    Scott Richardson
    National Instruments

  • Can not create an object for my c# form dll which has an ActiveX control

    I want to create an object in teststand for my C# form dll which has an ActiveX Control . but the error says ActiveX control can not be instantiated because the current thread is not in a single-threaded apartment. can someone help to solve the problem?
    Thanks.

    Two options:
    1) put the step in a subsequence and use the sequence call "New thread" option with the advanced setting "Use single-threaded Apartment". Put a wait step immediately after the sequence call to wait for the new thread.
    2) Inside of your dll, using .NET APIs create a new thread initialized as STA and call your code from that. Have the original thread wait for the new thread to finish running your dialog code.
    Hope this helps,
    -Doug

  • What should be specified in object reference field in the first step of sequence file in test stand

    Test stand object Reference field- <The expression cannot be empty>
    It is showing an error like "The .Net property can not be accessible
                                             Object Reference not set to an instance of an object".   
    How it can be resolved?
    Attachments:
    ex1.jpg ‏2305 KB

    I am
    using Singleton Class in .Net. So I need not create object in TestStand. The Get
    property of the class will return its own class object. So the Class Reference
    should be empty only.
    When I
    choose the property manually, I am getting this error. This I am getting only
    when I create this step through C# TestStand APIs. Please help me to remove this
    error in the Class Reference field using TestStand
    APIs.
    Attachments:
    ex2.jpg ‏24 KB

  • TestStand Equivalent to VB's CreateObject

    Is there a way to create an ActiveX object using TestStand without having to point to a type library?
    For example, in VB, VBA, and VBScript, you can create an object using the following syntax:
    set obj = CreateObject("Library.ClassName")
    Is there a way to do this in TestStand? I have a COM Server that I'm trying to use that doesn't have a TLB associated with it, therefore it doesn't show up in the list of Automation Servers in the ActiveX Adapter dialog box.
    I can access it via VB however.
    Thanks in advance for any help.

    Jeff -
    The Automation Adapter does not allow you to specify a server, class, or parameters without the type library. My only suggestion is to use a wrapper server in VB to assist you in working with this server that does not have a type library.
    Scott Richardson
    Scott Richardson
    National Instruments

  • Get Type of Step by activex

    Hi guys,
    I want to get the Type of the Step by activex. I have the name but in case of a Statement Step the name can be changed.
    If I get the Field Type that we can found on the tab Properties, General I will be able to get information I want following the Step Type.
    Thanks in advance.

    Oh pfhenry21.  I am hurt that you wouldn't trust my solution... however, I completely understand.  Alas, I'm not always right.  But in this case I am. 
    Did you give it a go?
    Most objects in TestStand inherit from the PropertyObject class.  The PropertyObject class has a property called Name.  In my statement I return the StepType object by using Step.StepType.  Then I use the Name property to get the name of that object.  NOTthe name of the Step.  If I used Step.Name then you would be correct in assuming that the name will change and can be anything.
    And ultimately you will most likely be using something like: RunState.Sequence.Main[Some Index or Step Name].StepType.Name.  Or if you are in an engine callback you would use something like: Parameters.Step.StepType.Name.  Or if you are iterating through the sequence in an external code module it would depend on how you are getting the steps.
    Hope this helps you understand it a little better.
    Regards,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Controlling Matlab via TestStand COM Objects

    I am attempting to control MATLAB via teststand activex com objects.  I set up my module to use the matlab 7 automation server, and when I try to run the sequence, I get this error:
    "Create New Object" in automation call failed.
    No such interface supported
    One reason this can occur is if the interface of your COM server cannot be marshaled. This can happen if your server is not using the default OLE marshaling implementation and does not implement its own proxy and stub code. If you write your server using Visual C++ you can add the oleautomation attribute to your interface in order to use the default OLE marshaling implementation. Alternatively, COM does not require marshaling if the server's threading model is the same as the client thread's apartment. You can try changing your server's threading model or the client thread's apartment to avoid the need to marshal the interface."
    Anyone know how to fix this?
    -Joey

    It turns out this issue was a bug within Matlab itself.  The correct registry keys were not being added for the Matlab ActiveX server with version 7.2.  The bug report is located here.  Once the correct registry keys were added there was no problem calling the Matlab ActiveX interface.
    Pat P.
    Software Engineer
    National Instruments

Maybe you are looking for

  • Support is a joke and a hassle and my 2 month problem is still ongoing.

      Ok, about two months ago, my router began booting all devices in the house off the network. It says on the iPhone, Ipad, macbook, PS3, and laptops that we ARE connected, but there is no internet available. Speed tests wont see out, the DSL and Inte

  • Can a C++ client use Oracle Standard or Oracle Enterprise version?

    Can a C++ client use Oracle Standard or Oracle Enterprise version of Coherence or is the Grid edition required? Please keep in mind that I am only interested in doing what is legal from a licensing standpoint, even if some other options are technical

  • InDesign CS3 script that changes fonts on open

    Hello. I am trying to come up with a script that would change a specific group of fonts, that will always show up missing, to the new font. Basically, it is a bunch of our postscript fonts that are now using our open type font. Below is what I have s

  • Beginner I need help

    I'm new to LabView and need some help with a program that I must write. For now all I would like to learn is how to light an LED on the front panel using a push button switch. Second, I would like to learn how to generate a wave form graph on the fro

  • Lightroom 3.3 speed, very very slow

    Does anyone know why Lightroom 3.3 on a Mac is so slow? The new version 3 was suppose to be faster than version 2. I purchased a new MacPro 12 core with 16GB of ram and with nothing else running, LR 3.3 is still as slow as it was in version 2. I sele