TestStand Array to VI by reference

I have a very large array in TestStand (seq.local) and I need to pass it into many steps (each step is a VI). Using the standard GetValVariant on the LabVIEW palette it takes 11 seconds. How can I speed this up, how can I just reference the existing data in memory without making a copy?
Any help much appreciated.
Certified LabVIEW Architect

Before I give you some suggestions on how to workaround this I would like to say that it might help out to tell us what version of TestStand and LabVIEW you are using, so that we can try and reproduce the problem precisely. Other than that question, how big is this array that you are trying to access? Are you sure that you are not out of physical memory and you are starting to use your swap file?
I have created a test sequence and vi that do a simple GetValVariant of a 100,000 index numeric array and on my system it takes ~.38 seconds to execute. The sequence and vi are attached to this post (note that the sequence file was made in TestStand 1.0.3 and the .vi in LV 6.1).
Basically, all of the TestStand API vis for accessing property values will create a copy of the array in your LabVIEW vis. Have you tried setting the unload option for each of your LabVIEW steps to unload the vis after each step executes to conserve on memory consumption?
To get around the time it takes to load this array into your LabVIEW steps you may want to use a LabVIEW global variable instead of trying to get the value from TestStand for each and every step. This way you only have one copy of the array loaded into LabVIEW's memory space, and if you don't really need this array in TestStand you may want to consider using a Global variable instead of the TestStand variable altogether. To consider whether you need it in TestStand or not, you should make note of whether you will need to pass it to any other "type" of code module (i.e. dll) or if you are going to include in a report or database. If you are not going to do any of these things, just use a LabVIEW global instead of the TestStand array. (NOTE: the use of global variables is generally not recommended because it will not scale to cases where you perform multi-UUT tests, and it should really only be considered as a last ditch effort.)
To get the type of access speed you would get by dereferencing single memory addresses at will, you would need to use a programming language that supports this, but as you can see there are plenty of ways to get around this problem when programming in LabVIEW. Try out the example I attached to this post to see if you get the same behavior (manipulate the array size if you need to). This should be a good starting point to see if there is something wrong with your system's memory availability or how you are working with the array in your own vi (meaning, that if this example does not take that long, then you may be doing something else causing the long delay like analysis or unnecessary manipulation.) If anything you could also try narrowing down the problem only to the array access in an example vi and sequence and submit it to the forum for us to try out on our systems, but please remember to remove any irrelevant code from the example.
I hope this information helps.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
Attachments:
test.zip ‏16 KB

Similar Messages

  • A simple teststand applicatio​n passing object reference to C#

    Hi,
     I have a  .NET application written in C# which has a UI with  NationalInstruments.TestStand.Interop.UI.Ax.AxExpressionEdit controls. This UI is invoked by a custom step in TestStand. One of the values, entered by user in the UI is a object reference variable created in a previous step. I need to store the values entered in the UI during the edit mode of the step, into the TestStand Step variables. And during the run mode i use these values to execute the logic in C#. 
    The problem is during edit time, the object reference variable, entered in the UI, has no value. It is null. So there is no use storing it at edit time. During the runtime i am trying to retrieve the value of the object reference variable using GetValInterface(...) and GetValIDispatch(..) methods of PropertyObject. But the object returned to C# is of type System.__COMObject wherease in TestStand that object reference is of type .NET.
    I don't know how a .NET object reference is converted to COM object when it is returned to .Net function.
    Also is there any other method to send this object reference variable's (whose value is '.NET' in previous step itself) value to .NET as a .NET object only so that i can typecast to appropriate type and start using.
    Thanks.
    Please let me know if anything is not clear.
    I have attached the .Net project, .ini file for the custom step and a example sequence file.
    Attachments:
    CCustomStepObj.zip ‏23 KB

    Hello Shivapriya,
    The example you've sent doesn't compile. And it without it I'm affraid I do not understand the problem you're describing.
    You've given references to libraries that you've not attached with your files.
    For the C# I see these are the
    IADCore.dll
    InstrimentInterfaces.dll
    TestStand also seems to want to reach for the assembly named TestSystem.dll.
    I can only tell you that I have used successfully in the past the Variables in TestStand to hold .NET object references, and call methods on them and I experienced nothing similar that you describe, but I don't quite follow what is the problem here, as I can't use the example. 
    I would appriciate if you cold narrow down the example to 1 dll or something where the problem occurs and than resend it.
    Regards,
    Maciej 
    Message Edited by Mac671 on 09-28-2009 02:59 AM

  • How to set the value of an array element (not the complete array) by using a reference?

    My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
    In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
    The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
    tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
    If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
    Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
    I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
    My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
    w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.

    > My situation is that I have an array of clusters on the front panel.
    > Each element is used for a particular test setup, so if the array size
    > is three, it means we have three identical test setups that can be
    > used. The cluster contains two string controls and a button: 'device
    > ID' string, 'start' button and 'status' string.
    >
    > In order to keep the diagrams simple, I would like to use a reference
    > to the array as input into a subvi. This subvi will then modify a
    > particular element in the array (i.e. set the 'status' string).
    >
    It isn't possible to get a reference to a particular element within an
    array. There is only one reference to the one control that represents
    all elements in the array.
    While it may seem better to use references to update
    an element within
    an array, it shouldn't really be necessary, and it can also lead to
    race conditions. If you write to an element that has the
    possibility of the user changing, whether you write with a local, a
    reference, or any other means, there is a race condition between the
    diagram and the user. LV will help with this to a certain extent,
    especially for controls that take awhile to edit like ones that use
    the keyboard. In these cases, if the user has already started entering
    text, it will not be overwritten by the new value unless the key focus
    is taken away from the control first. It is similar when moving a slider
    or other value changes using the mouse. LV will write to the other values,
    but will not rip the slider out of the user's hand.
    To completely avoid race conditions, you can split the array into user
    fields and indicators that are located underneath them. Or, if some
    controls act as both, you can do like Excel. You don't directly type
    into the cell. You choose w
    hich cell to edit, but you modify another
    location. When the edit is completed, it is incorporated into the
    display so that it is never lost.
    Greg McKaskle

  • Array of xy-graph references

    Hi all,
    I looked in the forum for a problem that I thought was simple, but I couldn't find anything helpful.
    I'm passing an array of references to XY graphs, from one VI to another. The sub-VI extracts the references when needed and wires them to property nodes. These change the active plot on the XY graph and its visibilty.
    I also tried to pass a cluster of references and convert it to an array inside the sub-VI, but it didn't help.
    I noticed that all the reference wires have a coercion dot on the build array. That may be the key of the problem, even if I can't see how.
    The error I get is:
    Error 1055 occurred at Property Node in make_trg_vis2.vi->main10.vi
    Possible reason(s):
    LabVIEW:  Object reference is invalid.
    The attached files explains the issue. Top.vi calls the sub-VI.
    I hope all this is clear enough. The thing works fine if, instead of using a sub-VI, I use property nodes in top.vi.
    Solved!
    Go to Solution.
    Attachments:
    top.vi ‏53 KB
    make_trg_vis2.vi ‏65 KB

    In your subVI,  you have your index array wired to the N terminal of the for loop.  Perhaps it should be the i terminal?
    N=8.  (Always, every iteration of the For Loop).  You multiply it by 3, then add 1, then another 1.  So you have indices 24, 25, 26.  But the array coming in has 24 elements which are at indices 0 to 23.  Thus you are immediately acting on an empty graph reference at index 24.
    You also appear to have a lot of duplicated cases in your case structures.  For example, cases 3 6 and 7  look identical.  Rather than using 3 different cases.  You can have one case that is 3, 6, 7.

  • Pasting data into TestStand arrays

    Is there really no way to cut-and-paste values from a spreadsheet (or any other source) into an array variable in TestStand? I know I can go the other direction, but that's not helping me right now.
    I really don't want to sit here and type in 148 numbers. And I don't want to write a kludgy program to do it using a SequenceFile object.
    Surely there must be a better way...

    Currently the TestStand sequence editor does not allow you to edit selected properties as you are suggesting. As you said, the only option is to enter them manually, or create a tool that operates on a sequence file and the tool must use a path to the property that you want to edit in some way. Currently the TestStand engine does not allow the sequence editor to specify what the currently selected property is creating a tool must edit the sequence file or step and you must supply the path to the property. We hope to address this in the future.
    Scott Richardson
    Scott Richardson
    National Instruments

  • Import table in Excel into TestStand array variables?

    I'm trying to use the property loader to read in an Excel file and create a number of local variables.  The tables that I maintain in Excel are of the following format:
    Range
    Setpoint
    High Limit
    Low Limit
    5
    -4.5
    -4.49395
    -4.50605
    5
    0
    0.0011
    -0.0011
    5
    4.5
    4.50605
    4.49395
    250
    -225
    -224.6975
    -225.3025
    250
    0
    0.055
    -0.055
    250
    225
    225.3025
    224.6975
     From this table I want to create 4 local variable arrays in TestStand, all 6 elements deep: Range, Setpoint, HighLimit, and LowLimit.  Is there an elegant way to do this without having to use all the formatting syntax that would be in a generic export of these locals from TestStand to an Excel file (i.e. using the method of export Excel file, fill in your own values, then import the Excel file)?

    To rephrase my issue, I want to be able to store my Excel file data in style of table from my first post and not like TestStand's "preferred" formatting as shown here:
    IFTDCVInputStart
    <Step Name>
    <Locals>
    Variable Value
    HighLimit
    <Prop Name='HighLimit' Type='Array' LBound='[0]' HBound='[5]' ElementType='Number'><Value ID='[0]'>-4.49395</Value><Value ID='[1]'>0.0011</Value><Value ID='[2]'>4.50605</Value><Value ID='[3]'>-224.6975</Value><Value ID='[4]'>0.055</Value><Value ID='[5]'>225.3025</Value></Prop>
    LowLimit
    <Prop Name='LowLimit' Type='Array' LBound='[0]' HBound='[5]' ElementType='Number'><Value ID='[0]'>-4.50605</Value><Value ID='[1]'>-0.0011</Value><Value ID='[2]'>4.49395</Value><Value ID='[3]'>-225.3025</Value><Value ID='[4]'>-0.055</Value><Value ID='[5]'>224.6975</Value></Prop>
    Range
    <Prop Name='Range' Type='Array' LBound='[0]' HBound='[5]' ElementType='Number'><Value ID='[0]'>5</Value><Value ID='[1]'>5</Value><Value ID='[2]'>5</Value><Value ID='[3]'>250</Value><Value ID='[4]'>250</Value><Value ID='[5]'>250</Value></Prop>
    Setpoint
    <Prop Name='Setpoint' Type='Array' LBound='[0]' HBound='[5]' ElementType='Number'><Value ID='[0]'>-4.5</Value><Value ID='[1]'>0</Value><Value ID='[2]'>4.5</Value><Value ID='[3]'>-225</Value><Value ID='[4]'>0</Value><Value ID='[5]'>225</Value></Prop>
    <FileGlobals>
    Variable Value
    <StationGlobals>
    Variable Value
    IFTDCVInputEnd

  • Arrays are passed by reference or value ?

    Hi peoples,
    I have something interesting here which I need to know. Look into the following classes :
         public class example1 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         i[0] = 2;
         i[0] *= 2;
         public class example2 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         int j[] = {2};
         i = j;
    Among the above classes, the class named 'example1' returns the value 4 whereas, the class named 'example2' returns the value 1.
    Any explanations to this one please....
    Cheers,
    Rasmeet

    minglu, you are not doing right.
    i just don't get it why you have i[] as instance variable but never use it ( i[] is declared in every method so each i you refer to in the method is a local varable not member variable that can be shared for the object ).
    your first solution work. but that i = j line is not needed because it has no effect you still cannot change the referrence of i to other int[]. your first soultion just need to be
    public static int[] change_i(int i[]) {
    int j[] = {2};
    return j;
    }anyway, using this solution, the method name will be misleading because the method didnot change i in anyway. i is changed because you assign the return array (j) to i.
    for that second solution also, you didn't use your member variable i at all. what you change is the content of i you pass so the result is correct. but then how is this method different from the first method the original poster posted?
    moreover, java never pass argument to the method by reference it ALWAYS pass by copy.i suppose you define passing by reference in the same way C++ does. all object variable in java is a refernce to Object so passing the variable to method is surely passing the reference to the method but that's not passing by reference. it's passing by copy because what is passed is the copy of the reference to the object, not the reference to the reference to Object. if it is really passing by refernce, then you will be able to change your reference to object to point anywhere because you have the access the address of the reference. but since you don't (you only know where the passed reference is pointing to (you have the COPY of value of reference) but you don't know where the refernce store its value) you can only change the content of the pointed object but not changing the pointed object.
    let me restate this, java always pass by reference.

  • Sum GETPIVOTDATA with multiple data item references using Array formula and cell references

    I'm trying to build a single formula referencing a shared pivot table. I would prefer not to create additional pivot tables etc.
    My criteria is basically the sum of multiple items in the pivot table. I am able to add multiple fields by typing item names in manually (see below Claims 1/2/3 etc) however I would also like to add a date range array in, but instead of typing them
    in I'd like to use cell values that can change dynamically, depending on previous options selected.
    My current formula is:
    {=SUM(IFERROR(GETPIVOTDATA("Count",'Settlement Pivots'!$A$1,"Loss Fin Year",$B6,"Scheme","Old Scheme","Month",{[Cell Range/Indirect Here...]},"Team2",{"Claims 1","Claims 2","Claims
    3","Claims 4","Claims 5","Major Claims","Claims Services"},"Scope","Settlement"),0))}
    Is this possible?
    Cheers

    Hi,
    Thank you for posting in the MSDN Forum.
    This forum is for developers disscussing issuses about VBA, VSTO and apps for Office. Since the issue is more relate to the end-user, I suggest you getting more effective response from
    Excel IT pro forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Best regards
    Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can i use class reference from an array effeciently?

    Hi,
    I made some test here with getting a class reference from an array and using the reference's methods or variables.
    Basically arrayEx is a container of type Array and it contains the Person's class instance in it. Num is a number extracted from the Person's instance
    Example #1----Strongly typed
    Var reference:Person;
    Var num:int;
    //Assignation
    reference=arrayEx[0];-----IT IS SLOW HERE
    //Use
    num=reference.number --- IT IS FAST HERE
    Example #2---Not typed
    Var reference:*;
    Var num:int;
    //Assignation
    reference=arrayEx[0]; ---- IT IS FAST HERE
    //Use
    num=reference.number ---IT IS SLOW HERE
    No matter what i change in both code like casting Person on arrayEx, i cant seem to make them work both fast at the same time
    If someone knows how, please tell me,
    Dominik

    Hi,
    I made some test here with getting a class reference from an array and using the reference's methods or variables.
    Basically arrayEx is a container of type Array and it contains the Person's class instance in it. Num is a number extracted from the Person's instance
    Example #1----Strongly typed
    Var reference:Person;
    Var num:int;
    //Assignation
    reference=arrayEx[0];-----IT IS SLOW HERE
    //Use
    num=reference.number --- IT IS FAST HERE
    Example #2---Not typed
    Var reference:*;
    Var num:int;
    //Assignation
    reference=arrayEx[0]; ---- IT IS FAST HERE
    //Use
    num=reference.number ---IT IS SLOW HERE
    No matter what i change in both code like casting Person on arrayEx, i cant seem to make them work both fast at the same time
    If someone knows how, please tell me,
    Dominik

  • Using TestStand How I pass an array of data into a DLL (IPC3.dll) for serial communication

    I am ussing a DLL created by another party. I have the list of the C declaretions. I have been able to write a seq that can turn the comport ON/OFF or select a different port but I have not been able to send or recieved any data. I have created an array of bytes(unsigned 8-bit integers)to send and recieved data but nothing goes out or in.

    Hi Toro,
    There is an example in your \Examples\AccessingArrays\PassingArrayParametersToDLL directory that illustrates exactly how to pass TestStand arrays as arguments to dll functions. The source files for the .dll are located in the same directory.
    For more information on passing arrays as parameters to modules you should read the "DLL Flexible Prototype Adapter" section of Chatper 13 in the TestStand User Manual, and pay special attention to the subsection entitled "Array Parameters". You can access the User Manual from the TestStand Start Menu group, the TestStand Sequence Editor's Help menu, the \Doc directory, or online at the following link:
    http://digital.ni.com/manuals.nsf/websearch/50B69DA356B8D38C86256A0000660E6B?OpenDocumen
    t&node=132100_US
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Create static references array

    Hello,
    i have done a labview program which controls six different test machines.
    the different tests are VIs which are kept by the main program in an array of static references. this way i have to write the vi only once. afterwards i create six different references of the same vi, each of them managing one test machine.
    everything is working fine. the only drawback I have found, is how to create the six references of each VI.
    the first thing I tried, was to locate the static reference function inside a loop. I enabled indexing, and i expected to obtain an array of six different references of the same vi. unfortunately this is not working: i obtain an array with six times the same reference.
    to fix this, i located the static reference function inside a switch with six cases. all of this, inside the same loop. i have to use the static reference function six times, one for each test machine. this is working, but is more work. everytime a add a new test vi, I have to add the switch with the six cases. it is a lot of copy & paste work, and errors are likely to be done doing this.
    I would like to know if there is any other (and simpler) way of obtaining this array.
    enclosed you find an example showing this: the upper loop creates an array of six references but all of them are the same. the other one, uses a switch-case so that different references are generated.
    thank you in advance
    Attachments:
    static references array.zip ‏11 KB

    I think you missed the point of what I was getting at. If you create a template VI and programmatically open a reference to it 6 times you will get references to 6 independent instances of the template all running in memory. Nothing needs to get saved to disk. If the template changes simply close the 6 old references and open 6 new ones.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Performance issues in manipulating class references in a array

    Hi,
    just to make things clear, the issue is noticed from my part because i retrieve a list of instances located in a array to manipulate them in a variable holder. Normally, the operations can be made between two instances stored in a simple variable to variable fashion and it works realy fast.
    I analysed two main operations: retrieving references in a array to a variable and get or set a value from the variable reference.
    Here are the objects used to perform the test operation:
    var v4:Vector.<Person>= new Vector.<Person>();//List of Persons instance
    var refHolder:Person; //Typed reference
    var refHolder2:*;   //Not typed reference
    Test #1: looping 200 000 times and only retrieving references from the array v4.
    Typed reference
    Not typed reference
    4ms with approx 436 893 intructions per ms
    2ms with approx 436 893 intructions per ms
    436893 * 4 / 200 000= 8.8 instructions with loop to perform the retrieval
    436893 * 2 / 200 000=4.5 instructions with loop to perform the retrieval
                         Test #2: looping 200 000 times, retrieving references from the array v4 and getting a value from the instance.
    Typed reference
    Not typed reference
    4ms with approx 436 893 intructions per ms
    11ms with approx 436 893 intructions per ms
    436 893 * 4 / 200 000= 8.8 instructions with loop to perform the retrieval
    436 893 * 11/ 200 000= 24 instructions with loop to perform the retrieval
    So my conclusion with that test is that with a typed reference you spend more time assigning a reference than manipulating a value from the reference
    With a not typed reference, the time spent is in manipulating the reference in the variable.
    Which one should i use or what should i do to have better performance with manipulating references from arrays?
    Here are the files i used to test this:
    reference.swf     //Online example
    reference.zip     //Source file
    Dominik

    Hey,
    Here's what I think the problem is:
    As long as you do not interrogate your refHolder variable for its properties or methods, Flash won't give a damn about it's type (that's why case 2 runs good when you dont't try to get .num property).
    But, if you do want to get some values from it and if Flash does not know which type, then Flash has to go and find the referenced class (going backwards through v4 array to find out that values stored in it are Person type, then finding the Person class to find out the .num property, etc...).
    As for the first test case (looping being faster with a non-typed), the few ms you are gaining there are only because Flash doesn't register the Person class because you don't tell him. But as you can see, it takes him only 2ms, which is not much.
    So, considering that Flash registers a class in just a few ms IF you tell him, it should be way more performant to do so (in the case you do want to retrieve values..) than letting him guess 200 000 times the same thing (because of course it will search for that class ref each time it goes through the loop..).
    So my advice for you is that if you are going to do something with those Person objects inside the loop, let Flash know their reference class..!

  • VARIANT data in TestStand

    I want to control a program using ActiveX in TestStand. I can successfully obtain a reference to the VI object in the program. The server program was written in LabView and allows the Call method of ActiveX to control the program. The Call method requires two parameters. Both are of data type VARIANT (parameterNames, parameterValues). The parameterNames are basically strings, but the parameterValues are mixed type(string, int, bool,etc).
    Is there a way to create a data type of VARIANT in TestStand to pass data through the ActiveX adapter??
    Note that I can do this in LabWindowsCVI, but I was trying to avoid writing a special DLL and use the TestStand Adapter.

    Bob asked what you meant by mixed data types. To clarify, the LabVIEW ActiveX server has a call method. It's second parameter is a varaiant array of variants, where the elements can be different (mixed) data types. Each data type corresponds to the LabVIEW control specified in the first parameter of the Call method, which is a variant array of strings.
    As Bob explained, the ActiveX automation adapter is able to automatically convert TestStand properties to variants, when the data type of the properties are support ActiveX data types (e.g. most scalars and arrays of these scalars).
    For the first parameter of the Call method you can send in an TestStand array of strings. This array will automatically be converted to a variant array of BSTRs be
    fore being passed to the Call method.
    Currently TestStand does not support a variant data type. Therefore, it is impossible to create an array of variants so that the array can in turn be converted to a variant by the ActiveX Automation adapter.
    In general, the ActiveX automation adapter does handle sending data from/to an ActiveX server. The issue of passing arrays of variants has not occurred very often. We have encountered it once internally at NI, but I believe that you are the first customer to ask about passing arrays of variants.
    In terms of the big picture, I don't understand why you are calling a VI using the AcitveX automation adapter instead of the the LV adapter. If the vendor has already created a VI to call another VI through the LV ActiveX server (why does he/she do this?), then perhaps you should just call the vendor's VI directly.

  • Closing references

    This question has been posed before and beaten to death ... and I've spent the good part of an hour perusing the discussions ... however ... I'm not satisfied with most of the conclusions. And the last discussion occurred last January, so there just might be some newer info out there ...
    I have a vi that opens an ActiveX class, and this reference filters down with invoke and property nodes 12 levels to get the data that I need. At this moment I am only closing the original ActiveX reference, but I'm sure I need more. Instead of doubling the screen size of the block diagram with all of the Close References I tried to create an array with all the references and would close them all in one For Loop with one Close Reference ... but when I connected reference #2 I get a class conflict.
    Has this been easier to work with in LV 8.2? Or do I have to plop down a Close Reference for each and every invoke/property node? That sounds brutal! But I need to be certain that I'm doing everything I can. Thanks in advance
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell

    Thanks, Darren. Yours would be the definitive bottom line.  I figured I would do this just to be safe. I ended up putting a row of Close References, one above each property and method. I was concerned with any one of them closing too soon, so I just sent the laste error cluster from the last property node back up and all the way to the left to the first close reference, then just daisy-chained that error cluster through all the Close References so they close all at once but only after I get the data. It's not a bad looking solution and my block diagram isn't any bigger, either. I don't have the ActiveX components here on my laptop at home so I'll have to wait until Monday to see if it works, but I don't see why it wouldn't. Thanks again.
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell

  • Get Specific References for all Controls

    Using slightly modified code from here, I am generating an array of all control references on my main front panel which is then passed through to a number of subVIs. Although this functionality does work, it would be preferable to get specific references to the controls (for example, Boolean RefNum instead of Control RefNum). 
    Getting these specific references seems possible using To More Specific Class and Class Specifier constants. However, data storage becomes an issue because I can no longer use arrays (as they are a different data type). I am not sure if there is another way to pass this data on. I have experimented casting the RefNums to Variants, but to get the data from the variant, I have to know what RefNum type I am expecting which sort of defeats the purpose of doing this in the first place.
    A secondary problem is keeping the names of the references. The Control RefNums do not have names associated with them nor do I know how to assign names to them. I've again tried using variants and using the OpenG Set Data Name function, but this crashes LabVIEW without any indication of why.
    I've attached a version of my code that tries assign names using OpenG Set Data Name and build a variant array. To run it, simple add the VI as a subVI to a VI that has some boolean controls on the Front Panel. Apologies for the rough state of the code - I'm still in the process of figuring out how to make it work so things are a bit messy.
    Solved!
    Go to Solution.
    Attachments:
    Get Specific Control Refs.vi ‏28 KB

    I don't know if you'll get much better.  There is really no way I know of to have some fully flexible way of building named clusters of references based on any given front panel set you feed to it.
    I tend to do things the manual way (as there are also a bunch of references to front panel elements I wouldn't need).  I would do all the bundling work in a subVI.
    I'm attaching a zip file that contains the key VI's (unless I missed something) on the first project where I really tried to abstract out the reference building.  The files are LV9.
    On my main VI, I have the subVI called Build UI References early in the VI during an initialization phase.  I pass the reference to the main VI into that subVI that builds all the references.  I worked it as a master cluster that contains elements that are arrays of references of related controls.  It uses another subVI called Get References and Label Names that I created to help find controls.  I still need to use More Specific Class to get the property references, but I don that only once at the beginning.  I then pass that cluster wire out and to anywhere in my VI that would need access to the references for front panel elements.
    I use arrays of strings to supply the names I need to build and bundle the references.  This lets me ignore controls I don't care about.  The disadvantages to my system is that if I change the name of any control, I need to update the name within this subVI.  And if I want to add any controls, not only do I need to add the label names for the searching functions, I also need to update my typedef cluster (and you definitely want this to be a typedef) to add a spot to store the new reference.
    I hope this gives you some ideas.  It worked for me and I will likely use the scheme on another project (or even rewrite past projects using this scheme.)  If there are any ideas for improvements, I'd be happy to hear them.
    Attachments:
    Build UI refs.zip ‏83 KB

Maybe you are looking for

  • Discussion Forum Portlet Security Flaws

    Can someone from Oracle answer me on the following: - Will there be another release of that porlet soon? - And if so, will the next release fix the security vulnerabilities that have been reported (such as: http://www.sec-consult.com/248.html) - Will

  • Bbm is delayed.

    Hello i had a blackberry curve 9300 and it started acting up so i bought a new blackberry curve 9300, the exact same phone.  I had my old blackberry backed up on my laptop.  I am with koodo mobile and i went in and bought the new blackberry today, br

  • Printing problems using enterprise 3

    I am using the Tarantella enterprise 3, version 3.20.907, browser to monitor the main Security computer from my office located within the same building. From my office I can access the picture perfect 1.7 system and make changes, run reports etc.Unti

  • HT4009 I am trying to install free apps but am being asked to verify payment account first, why is this happening and will I be charged?

    I am trying to install free apps but am being asked to verify payment account first, why is this happening and will I be charged?

  • AME CS6 and % of cpu used

    Hello. imac i7 3.4ghz 24gb ram GTX 680MX When encoding is there anyway to get AME to utilize more of my cpu consistently? When encoding I'm seeing a fluctuation between under 10% use and 30-70% every other second. So one second it will be 8% then the