Array in TestStand

Hi  gurus,
       I have a doubt that how can we create Array of string in TestStand 4.0 using C#.NET environment.
I used following method, but failed to create array:
objPropertyObj.SetValStringByOffset(10,PropertyOptions.PropOption_InsertIfMissing,"SRU"); // exception here....
The other following method creates array with empty size:
objPropertyObj.NewSubProperty("SUBSTITUTE.SRU", PropertyValueTypes.PropValType_String, true, "Arrayw",10 );
Please let me know how to set the size of the array at second method.
Thank you,
regards
RKK

Hi rkk,
I have added a small function from a former thread to you
Just take a look at it
Greetings
Juergen
=s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
Attachments:
CTestStandDialog.zip ‏35 KB

Similar Messages

  • How to call a CString array from TestStand

    I have a C++ DLL that uses a CString array, CString myString[ ],  that I need to pass back to TestStand 4.0 for inclusion in my results database.
    In the TestStand module definition the parameter argument Description comes up as a CStriing pointer (CString*) instead of a CStringArray.
    When I put my array of strings into the Value Expression I get an error: Expected String, found Array of Strings.
    I have no trouble passing just a string pointer but that's not working either.
    Can someone help?
    Thanks,
    Steve S

    Hi Steve,
    I don't think that you can pass a CString Array from C++ DLL to TestStand 4.0 directly.
    But you can do it another way: concatenate all Strings by a delimit in your CString Array to build a new String,  then pass it to TestStand. In TestStand you can separate those Strings by the delimit, and rebuild a String Array.
    For example:
    // If this is your CString Array.
    CString myString[] = {"AAA", "BBB", "CCC"};
    // Build a  new String in your C++, and pass it to TestStand.
    char  *myNewString = "AAA~BBB~CCC";
    // Separate myNewString and build an Array in TestStand...
    Hope that can help you!
    Message Edited by My NI on 11-29-2007 11:34 AM
    Regards
    MY

  • Sort array in TestStand

    Hi,
    I have an array of custom type container, something like:
    - TestName
    - Type
    - Operation
    I'd like to sort this array by Type and Operation.
    Is that possible in TS 2010? If not - what is the best way to do that? I'm using also LabVIEW and C/C++.
    Thanks in advance
    Solved!
    Go to Solution.

    In this case I would recommend passing it to LabVIEW and let LV handle the heavy lifting: http://forums.ni.com/t5/LabVIEW/Sort-1D-array-of-c​lusters-by-the-second-element-in-the-cluster/td-p/​...
    Check out Darren's post.  It's a clean sort of clusters.
    TestStand isn't designed for complex algorithms.  Although you could probably do it in TS you would have to come up with the algorithm.
    Cheers,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Two dimension string array in teststand

    Hello,
    I want to pass a two dimension string array from a labWindows dll into Teststand. My labwindows dll:
    #define NR_columns 12
    #define NR_rows  1200
    #define NR_hight   1024
    int__declspec(dllexport) __stdcall  sort( char pspec[NR_columns][NR_rows][NR_hight])
    The call of the dll in teststand looks like the attached picture in the doc file.
    and I got the error message which shows the attached second picture in the doc file
    what is the problem?
    regards
    samuel
    Attachments:
    Error1.doc ‏94 KB

    Hello Samuel,
    I'm not experienced in LabWindows but I think the reason for this Error is the dimension of FileGlobals.loadspec in TestStand. The Error Dialog displays for this String Array [0..11][0..1200]. That's an array of 12 and 1201 elements but function is expecting 12 and 1200 elements.
    I hope this helps.
    Kind regards
    C. Dietz
    Test Engineering
    digades GmbH
    www.digades.com

  • Math operations on array in TestStand

    Hi.
    I have 2 questions
    1. Is it possible to multiply an array by a number in TestStand?
    I know there are some numeric functions available in TestStand but I don't know if like LabVIEW I can multiple ( subtract/add/divide...) all the elements of an array by a number
    2. Let's say I want to pass a 1D array of numbers ( size 10) to a code module but I would like to just pass the first 5 elements . How can I do it in TestStand ? I have checked the array function but I couldn't find something like Array Subset?
    Could you please help me with these question

    In TS 2012 and later they added some new array functions such as Min, Max, Split, Sort, etc...  They also added the ability to do Locals.MyArray[4..8].  Which will give you elements 4 through 8 of the 0 indexed array.
    As for the adding to each number I don't think that capability exists.  If it did it would be something like Locals.MyArray + 100.  It defnitely doesn't work in TS 2010.
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • 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

  • 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

  • How to add a 2D result array to the result database?

    I am using Teststand 3.5 and I am about to create a Labview VI that will measure the gain response of a receiver. This VI will output it as an 2D-Array and I would like to save it to my access result database, to be able to use that data for displaying a graph in my excel report.
    I am new to teststand and I already know how to add a 2D-array to a report but don't really know how to add this information to the database. I read the provided manuals and searched the forums but didn't find anything that was really helpful. AFAIK I can add numerics and strings to the database just by adding a string value or numeric limit test but when it comes to arrays (especially 2D), I have no idea how to do that. I only know (or guess) that I have to add a new  table to my database, edit the schema and the Database.seq.
    I appreciate any help!
    Stephan

    Stephan,
    Sometimes forum posts make you research a particular functionality of TestStand and lead you to discover how powerfull TestStand can be.  This is one of these cases.  I thought that in order to save 2D arrays in TestStand we would have to customize many different aspects of the application only to learn that the functionality is fully implemented already!
    First, you will have to create a new step type that contains a 2D array in the Step.Result properties.
    Second, in order to save a 2D array into a database, use the Binary Column Type in your table.  To do this, create a new table with the following properties:
    Type: Recordset
    Command text: "SELECT * from [Table Name]"
    Apply to: Step Result
    Types to Log: [Step type with which you are acquiring your 2D array]
    Lock Type: Optimistic
    The rest of the properties can be left with their default values.  Once you have your table, add an ID column as your primary key, and a second column that will contain the 2D array.  This column should have the following properties:
    Type: Binary
    Size: 1.5 times the size of your array in bytes
    Expected Properties: Logging.StepResult.[Property Containing the Array]
    Expression: Logging.StepResult.[Property Containing the Array]
    The rest of the properties can be left with their default values.  In order to see the values stored in the database, open the Database Viewer to the particular table and right click on the field which will show a value of "Binary Data".  Right click on the value and select Evaluate Data.  The View Binary Data window will let you see all the values stored in the array.
    Regards,
    Santiago D

  • Deployment error:Error Code:-17500, Unknown System Error in TestStand - Read Seq Files in Workspace.vi-

    Help!
    When trying to deploy a test system i got the following error:
    Error Code:-17500
    Unknown System Error in TestStand - Read Seq Files in Workspace.vi->TestStand - Find Dependent Files.vi->TestStand - Add File and Dependent Files.vi->TestStand - Add All TestStand User Files to File Info Array.vi->TestStand - Update File Info.vi->TestStand - Distribution Wizard GUI.vi->TestStand - Deployment Utility Splash Screen.vi
    I then tried to re-deploy previously successfully deployed systems - same error. (I have done nothing to my teststand setup/installation/engine or deployment files since the last successful deployment)
    I removed teststand & then re-installed it - i still got the same error. These files it is searching for do not exist on my pc.
    Any ideas what has gone wrong/how to fix it?
    cheers
    Fi

    I've just had exactly the same problem and after posting a message, have been forwarded to this thread. Luckily it looks as though we've found a solution, or a cause of the problem. One of my work colleagues (SercoSteve on discussion forums) suggested removing the Teststand 3.1\cfg directory, and replacing it with a default one from another machine, and this seems to have done the trick and made the deployment wizard be able to analyse the files and build. We are editing files in cfg so I've now got the task of replacing each file in this directory one by one to find which is causing the problem.
    I'll add another post when I find out which one it is.
    David Clark
    CLA | CTA
    CLA Design Ltd
    Hampshire, England

  • Returning a Tcl list to TestStand

    Hi,
      I wonder if anyone can help me.  I would like to return the contents of a Tcl list to TestStand.  I am not sure how to go about it.  Are Tcl lists equivalent to an array in TestStand?  Can I return the entire list or must I return each individual element?  I also noticed that the custom TclParameter type can be modified.  Should I create an array of strings to catch the list being returned from Tcl.
    Any help would be appreciated.
    Thanks

    A Tcl list is very similar to an array in TestStand.  There are some minor differences when dealing with multi-dimensional lists (lists of lists), but the concept is pretty similar.  The Tcl Example currently on the web does not support lists and all parameters must be strings.  You would then have to parse the string returned as the list in order to make an array.
    For example, if you have a Tcl list x created with": set x [1 2 3 4]".  If you set an output parameter on the step to map to the variable x to Locals.ListAsString in TestStand, it would be populated with "1 2 3 4".  You would have to then split the string based on spaces, and you could convert it into an Array in TestStand.
    Do not modify the TclParameter type (unless you also want to change the source code of the rest of the step).  Changing the source code for the step type would be an advanced topic, so unless you are experienced in TestStand and the Tcl C API, I wouldn't recommend it.
    Allen P.
    NI

  • Pass char array to c++ DLL and return same char array

    Lectori Salutem,
    Here is the situation:
    Im learning TestStand, and to learn the basics, I want to do the following:
    Call a (C++) DLL in TestStand with an array of chars.
    The DLL should return the array of chars (or a pointer to the datalocation).
    This is the code in my DLL:
    TESTDLL3_API char* bounceString(char data[])
      data = "Hello World";
      cout << data;
    char* pointer = data;
    return pointer;
    However, this function will not be recognized by TestStand
    When this is working, I think I can build the rest of the functionality by myself.
    Thanks in advance for any help!
    Jeroen
    The Netherlands
    Solved!
    Go to Solution.

    Sadly, in the example there is no return value to TestStand.
    However, I did manage to return the pointer of the char array to TestStand:
    int __declspec( dllexport )  bounceString2(char* argument)
      void *pointer;
      int i;
      argument = "Hello";
      pointer = argument;
      i = (int) pointer;
      return i;
    So, right now I have to find out how to retrieve the char array from the pointer...
    Jeroen
    PS, I will look at the CVI code, and let you know about my process

  • Gui screen from TestStand

    Hi,
    I have extensive experience with TS + CVI but nothing at all with LB.
    I seek some assistance to accomplish something which is quite easy with CVI.  I'll describe it here and hopefully somebody can point out an example or send me one.
    I want a TS step to call a vi wich will display a GUI.  The gui will stay on the screen untill I push the a button (Run for example).  When I push this button the vi will read status of various checkboxes and switches and write the status in an array.  This array I want to transfer to TS into a local/File/Station array variable.
    In CVI you do it with RunUserInterface().  How is it done with LB?
    Can somebody write me a simple vi that does this task?
    Thanks in a advance

    hi, just using a while loop and return the value to the pre-defined array in teststand through specify module dlg is ok.

  • Problem en Multiple Numerci limit test sur teststand

    bonjour a tous,
    j ai développé sur Labview un simple programm avec un array ( cet array prend 3 chiffres qui sont 0, 8 et 24 )et j ai voulu appeler la fonction développée sur labview en Teststand et c est pour quoi j ai ecris un programm sur teststand et utilise " Multiple Numerci limit test "  sur steps MainSequence  ( en fait j ai utilise multiple numeric limit test parceque ma fonction Labview un array est et  comporte 3 chiffres ), et a Variables j ai declare un container sur  Locals.
    Problème: lors de l exécution  j ai reçu un error.
    cijoint j ai mis quelque foto du programm teststand
    ci dessous est mon programm Labview
    Je ne m y connais pas trop en teststand
    merci pour l aide
    Pièces jointes :
    Sequence.PNG ‏118 KB
    Sequence2.PNG ‏44 KB
    Sequence1.PNG ‏99 KB

    Bonjour,
    il ne s'agit à priori pas d'une erreur TestStand, mais LabVIEW. 
    En effet, le ring est coché avec sequential values, ce qui veut dire que tu ne sort pas 0,8,24 mais 0,1,2 Donc le test dans TestStand n'est pas bon. 
    pourquoi utiliser un container et pas un array dans TestStand?
    Rodéric L
    Certified LabVIEW Architect

  • To Passing image from Teststand to simple GU

    Dear All:I'm having a problem of getting the vision image from Teststand to simple IO GUI. 
    One of the step of the Teststand sequence is to snap a photo from the cam and process the matching,
    And I store it in the teststand local variable (Type:LabviewIOcontrol)So I can use that in other steps,
    that works fine. But how could I get the Teststand image variable from the Labview simple IO GUI??
     (I understand how to transferring string, number, or array between Teststand and Labview by using UI-MSG.  just have no idea how to deal with object reference to get the image data I need to display in the GUI) 
    Any example or idea will be really helpful for me. 
    Thanks. 
    Eric
    Message Edited by EricLu on 10-09-2008 02:51 AM

    Dear Sir:  Hi, In fact I am just new in teststand, and the reason I use LabviewIOcontrol as image type.
    Because when i output the image, the teststand display the type is LabviewIOcontrol .
    I did a test that I create a sequence file with 2 steps in it.
    The first step, the vi reads a vision image from file and store it to teststand local variable (Type: IabviewIOcontrol).
    And the second step, I dump the local variable to an indicator within another VI and check the image are transferred or not.
    It works well, just I don't know how to change the Device Name and Session Number  to image in Labview..... 
    I think I will take your second advice to build up the function first and try to find out the solution later on...
       Thanks for your help. 
    Best Regards,
    Eric
    Message Edited by EricLu on 10-26-2008 09:55 PM

  • Casting by pointer in the cvi itself

    1. Is it possible to perform casting in the cvi by using only the pointer (void*) of a struct (container) which was created in teststand?
    I've been trying to perform casting by using cvi's memcpy function, by all I've menaged to do is to change the first variable of the container, I just can't find
    the location of the other struct variables
    2. if casting isn't possible in the cvi (in the manner described at q.1) is it possible in the teststand itself?
    let say I've got an array filled with data and I want to transfer it into container by using pointers (I don't know the container content), can it be done?
    Regards Zohar

    Hi Zohar,
    You should be able to pass an array from TestStand to CVI. Here are three links to othr forum threads that talk about a few different ways an array can be passed.
    How to pass numeric array from TestStand to CVI DLL and vice versa?
    How to pass several property types between TS and CVI code modules.
    Passing Arrays to Operator Interfaces using UI Message.
    Adam
    Adam
    National Instruments
    Applications Engineer

Maybe you are looking for

  • Difference b/w sy-index and sy-tabix

    hai all, Could u explain the difference b/w sy-index and sy-tabix? regards, Selva

  • How to find the name of query for a given report

    Hi All, I am having the name of a report and i need to find out the name of query for that report . Plz tell me how to find out the name of the query for a given report. Thanks. Regards, Pooja Joshi.

  • Max resolution for QT movies??

    I have watched a few TV shows I have downloaded from itues via QT on both my windows machine and my ibook. My Windows machine I use a 20" Apple Cinema Display and is powered by an ATI850XT vid card. Since it is a 20" ACD the resolution is 1680x1050.

  • Installation error for OBI 11.1.1.5

    Hello, In the middle of OBI installation(28%) on a virtual machine(windows XP 32 bit) I receive the following error : Installation failed OUI session failed Invalid entry size (expected 359303298 but got 182344 bytes) What can I do? I made all the st

  • JBL Charge not working on a Windows7 PavilionG6. Connected but not showing as an audio device.

     I have a: HP Pavilion G6-1242sa Product: A5H10EA#ABU Serial: {Personal Information Removed} I am using Windows 7 64-Bit.  I am trying to pair my JBL Charge Bluetooth  speaker to my HP Pavilion. I have installed the latest drivers for the speaker fro