Importing an array of containers with Property Loader

Hi,
I'm using TestStand 2.0 and am having trouble importing arrays of containers using the property loader... The first array element is copied in ok but the subsequent ones do not (all values are 0).
I'm sure I'm looping through the array ok as I can load in simple arrays of numbers. I only see this problem with arrays of containers.
Is there anything I may have overlooked?

Hi,
The trouble with importing arrays with the property loader is you have to specify each elements of the array individually.
I have attached an example which I hope helps.
Regards
Ray Farmer
Regards
Ray Farmer
Attachments:
LoadContainerArray.seq ‏22 KB
LoadContainerArray.txt ‏1 KB

Similar Messages

  • Import and process larger data with SQL*Loader and Java resource

    Hello,
    I have a project to import data from a text file in a schedule. A lager data, with nearly 20,000 record/1 hours.
    After that, we have to analysis the data, and export the results into a another database.
    I research about SQL*Loader and Java resource to do these task. But I have no experiment about that.
    I'm afraid of the huge data, Oracle could be slowdown or the session in Java Resource application could be timeout.
    Please tell me some advice about the solution.
    Thank you very much.

    With '?' mark i mean " How i can link this COL1 with column in csv file ? "
    Attilio

  • Property loading an empty array

    I have an array that I want to initialize from text file using a property loader step.  I want the number of elements of the initialized array to be equal to the number of elements in  the array in the text file.  I tried to accomplish this by defining the TestStand array empty and importing all properties from the text file.  This resulted in an error message for each property in the array - here's a snippet of the error messages:
    Error evaluating expression:FileGlobals.Arinc629.Limits.Label[0].Address = (0xE90)
    Property does not exist.
    The text file I'm loading the properties from is attached.  The properties are loaded successfully if I define the TestStand array with a size bigger or equal to the number of elements in the text file.  But I want to have the text file to dictate how many elements are in the TestStand array.  Is there a good way to do that?
    Thanks,
    Hans
    Message Edited by hans17 on 11-05-2008 06:28 PM

    Hans,
    What version of TestStand are you using?
    Starting with TestStand 3.1 you can import/export arrays and containers as XML strings.
    If
    you want to be able to set the array bounds in the text file all you
    have to do is to modify the LBound and HBound attributes in the
    corresponding XML Prop tag and add the Value tags corresponding to the
    elements you want to add.
    For example.
    Let's assume I have an numeric array local variable named MyArray (Locals.MyArray).
    The first thing I would do is to use the Import/Export Properties tool to generate my text file.
    1. Make sure that the Locals.MyArray variable is not empty (In my case Lower Bound =0 and Upper Bound= 9)
    2.  Go to Tools>>Import/Export Properties
    3. Go to the Source/Destination tab and  specify your text file location
    4.  Go to the properties tab and add Locals.MyArray to the selected properties list
    5. Click the Export  button
    6. Open your text file and verify it looks as follows:
    <Step Name>
    <Locals>    Variable Value
    MyArray   
    <Prop Name='MyArray' Type='Array' LBound='[0]' HBound='[9]'
    ElementType='Number'><Value ID='[0]'>0</Value><Value
    ID='[1]'>0</Value><Value
    ID='[2]'>0</Value><Value
    ID='[3]'>0</Value><Value
    ID='[4]'>0</Value><Value
    ID='[5]'>0</Value><Value
    ID='[6]'>0</Value><Value
    ID='[7]'>0</Value><Value
    ID='[8]'>0</Value><Value
    ID='[9]'>0</Value></Prop>
    <FileGlobals>    Variable Value
    <StationGlobals>    Variable Value
    7. In my case I only exported the Locals.MyArray variable
    8. Notice that the Value of the Locals.MyArray variable is a XML string that contains a Value tag for each element in the array.
    9. 
    If I want to change the number of elements in the array next time I
    import the text file, I only have tp modify the LBound and HBound
    attributes and add or remove the value tags for the array elements.
    10.
    Let's say that I want my array to have only one element, then I need to
    set the value of HBound to 0 and get rid of the Value tags
    corresponding to the rest of the elements.
     <Step Name>
    <Locals>    Variable Value
    MyArray  
     <Prop Name='MyArray' Type='Array' LBound='[0]' HBound='[0]'
    ElementType='Number'><Value
    ID='[0]'>0</Value></Prop>
    <FileGlobals>    Variable Value
    <StationGlobals>    Variable Value
    11.  Modify your text file and use the Import/Export Properties tool or the property loader step to import the text file
    12 . Verify that the array bounds are modified
    You could use this technique to initialize an empty array using the property loader.
    Hope it helps.
     Regards.

  • Can the Property Loader load arrays of variable size?

    I need to run a series of tests on the same UUT, changing only one parameter at a time (for example, a frequency response test). The hardware developers would like to be able to change the values of parameters of the test at will, without making changes to the sequence. That's easy - just change the value of the parameter in the Properties file. The hard part is changing the number of iterations of the test, by ONLY adding or deleting the number of parameters from the text file. In other words, all I know during sequence editing is the types of parameters, not the values or how many. I want the test to loop as many times as there are sets of parameters in the text file.
    I would like to do this by loading the paramet
    ers as an array. But the Property Loader wants me to specify each variable while I am editing the sequence, including each individual member of the array (e.g. "Locals.Array[0].Value"). I want to do somthing like "Locals.Array[*].Value", where "*" means "all elements".
    Am I forced to write external code to load each parameter, or does TS have a native way to do this? Even better, has anybody done this already, and will you explain how? Thanks

    Hi,
    there's a couple of options here, and I've included what I think is the simplest below (using TestStand 2.0.1).
    It's not exactly elegant though. What I've done is to put in a step that finds out the number of steps to load (based on an earlier decision - in this case a message popup step). I read a number from the limits file, and use this in the looping options of the property loader step that's loading the values into the array. I've done it with a fixed size array target here, big enough to take any incoming data. (Otherwise, knowing how many items you're going to load from the limits file, you could start with an empty array and re-size it prior to loading).
    I've cheated slightly by using the pre-expression on the property loader step to specify where th
    e data is coming from and where it's going to in the sequence on each iteration of the loop based on the Runstate.Loopindex.
    Another option is to go straight into the property loader step, and keep loading properties until the Step.Result.NumPropertiesRead = 0 (remember we're only doing this one at a time)
    Another idea would be to load in a value, and check it isn't a "flag" value (i.e. you'd never use say 999 in your array, so set the last element in your limits file to this, and drop out of the loop when this happens.
    Further still, you've got the source code for the property loader step, so you could re-write it to make a custom step that loads an array until it fails all on its own (no looping in TestStand).
    Hope this gets you going
    S.
    // it takes almost no time to rate an answer
    Attachments:
    DynamicPropertyLoader.seq ‏32 KB

  • Set Array of Containers

    Hi Ppl,
    I have an array of clusters in LabVIEW. The cluster has two elements a boolean and a numeric. When I try to set this array of clusters from LabVIEW to TestStand using the TestStand API's I get an error that the type does not match.
    To explain in detail I have an Local Array of containers with three elements. Each container element has a boolean and a numeric. I have a equivalent array of clusters in LabVIEW. In a LabVIEW action step I use the to variant node to convert the array to a cluster and use the setvaluevariant method to set the local. But it does work.
    SequenceContext.AspropertyObejct.SetValueVariant(variant, "Locals.ArrayofContainers",0)
    Thanks,
    Sathish

    Asbo,
    Thanks for replying. This is what I'm trying to do. See the attachements. 
    Thanks,
    Sathish
    You'll need TS 4.2.1 and LV 2010 to open these files
    Attachments:
    Test.seq ‏5 KB
    test.vi ‏12 KB

  • Error while importing a big array with thr property loader

    Hello,
    the following problems occure: when I want to import a *.txt file with a array of more than arround 3300 members with the property loader, the following error meassage occures:
    property loader step failed to import or export properties
    x property values were found
    x-1 property values were imported from y rows
    Error code: -18, user defined error code.
    how can I solve this problem?
    I think sizes of arrays are limited somewhere in the source code of the property loader. is it possible to increase this size? And how?
    regards samuel

    Could you attach an example of your .txt file and your sequence?

  • Best way for using Property Loader with Excel

    I am trying to architect a test system to run a variety of tests (DIO, AIO, PWM...etc) and I noticed that Property Loader can be quite handy. I am trying to find the best method to utilize NI TestStand Property Loader to load test properties from Excel into some sort of parameter database. The properties shall be loaded only once when the test sequence is opened. The parameters of the excel table will have a format like this:
    TestType TestCondition  ECUPin#   Limits.High    Limits.Low  Units  PWM_Frequency  CAN_TX   CAN_RX
    DI            ON                    1                                                                                      0x0102   0x0304
    AI            OFF                   2                0             0.1                V                                0x1324   0x0405
    The table will look much more complex than this one, but once I know how to do this I should be fine. Does anyone have suggestions for what I am trying to do ?
    Thanks,
    Ayman

    There are a couple methods of thought here:
    Property Loader-  You can use the tool to export and import properties.  The best way to do it is to export the properties that you want in the Excel file using the tool.  Then make copies of the file and change the values in there.  This will ensure that once the values come back into TestStand they will all go to the correct place.
    FileGlobals Method-  You can create a large container which has all the correct variables in it in your file globals or locals.  There is an object in the TS API called a PropertyObjectFile.  This file is a simple text file that contains the properties, sub properties and values of any property object in TS.  You can easily just pass the container into it.  The problem with this is that you then have to create a VI or some tool to edit the values in it.  You can go in there and manually change them but it's not as intuitive.
    Property Loader to FileGlobal Container-  This would basically be a hybrid of the two.  Pretty much what you described in your post.  Where the property loader only has to load the container in your FileGlobals.
    Which method is best? It all depends on your application.  If you ever need to dynamically export the properties then you can't use the Property Loader. 
    One thing to remember is that you should only Import/Export properties that need to be changed in the Excel file.  This will help reduce the number of properties. 
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Property loader in .csv Format : Error with list of Numbers

    Hi,
    I need to change property files from the .xls format to the .csv format so that I won't need to install Ms Office on the Test Station PC.
    Everything works is .csv format except for variales containing lists of numbers.  Here is an example.
    This variable contains the channel list to send to a Digital Multimeter.  A string containing all channel numbers seperated by comas (The DMM model is Agilent  34070A). 
    I create a variable named ChannelList of type string containing : "101,102,103,104,105"
    When exporting to property file (Using Tools-Import/Export properties), TestStand will write the following line is .csv format :
    ChannelList,"101,102,103,104,105"
    When trying to import this property value with a property loader I get the following error :
    Runtime Error Occured
    Error evaluating expression:Runstate.Sequence.locals.ChannelList = (""101")
    Unexpected Token: 101
    What puzzles me is that teststand is not even capable of reading its own exported property within a newly created file.
    Any ideas?
    TestStand 2013
    Thanks in advance
    Nien

    Nien,
    This is a known issue and we are looking into this issue in future version of TestStand.
    There are couple of approaches for fixing the problem:
    1. Use a different character for comma in the property loader file. After importing the data, replace the character with comma using TestStand expression in the sequence file.
    2. Use Tab Delimited Text format instead of CSV format.
    3. We can see that, property loader is using expression to update the value of the property (The exact expression is specified in the error message you have posted). In a text editor, update the csv file to have the value as
    ChannelList,101""+Chr(44)+""102""+Chr(44)+""103""+Chr(44)+""104""+Chr(44)+""105
    This will create the expression such that, the value of ChannelList property will become 101,102,103,104,105
    Note: This is just a workaround and you should use this approach with caution.
    Thanks,
    Shashidhar

  • Using Property Loader with Renamed Steps

    If I have a test step in a loop where the step is renamed using RenamePreviousStep after each iteration, is there a simple way to use Property Loader to load test limits corresponding to the dynamically changing test name?
    The only way I have found to do this so far causes errors at runtime on the non-existent step names in the file which have to be ignored. Also it is not very slick to call PropertyLoader every time the loop iterates.
    Is there a more elegant way to load limits for steps which "don't yet exist"?

    How do you organise your limit file.
    Do you have a different Start/End Marker for each of your iterations
    so that you have the correctly named step(s) between the markers?
    You could try loading an array of limits into a local array(s) from
    your Limit File then index through the array as the datasource for your
    limits. Remember its a PropertyLoader, so its not limited to just
    limits. That way you only read it once and you are not tied to the Step
    name.
    I originally had all limits within a single Start-End marker pair. Having now given each limit set an individual Start-End marker and setting PropertiesListSource dynamically in the Loader Step in the loop, that works OK.  Perhaps not so elegant still as each iteration of the loop requires a Property Loader step instead of loading everything in one hit (I'm guessing there has to be some performance overhead in multiple property loader calls vs. a single load of all limits) but at least there are no errors on the loader step now I am only loading that test which exists after the loop rename.
    The alternative of loading data into arrays had ocurred to me and I may experiment with this if performance becomes an issue with the first approach.
    Thanks for your reply Ray, its much appreiated.

  • Property Loader won't Import ConditionExpr (Loop Conditions)

    Hello,
    I'm finishing up a project that automatically builds and distributes my test sequences.  It uses the property loader at runtime to get the actual step parameters.  Everything is working well, and my process is fully automated, but it can't seem to import the ConditionExpr property (conditions for loops).  I have about 20 other properties that all import fine, but I can't do anything with timing and if I try, I get stuck in an infinite loop.
    I've attached a dummy sequence file and the corresponding CSV.  The step names are weird, but that's just because of how our database for result files works.  Each of the tests is just getting the current time, looping until the duration specified has passed, and then comparing.  Pointless test but it demonstrates the problem.
    My tests build dynamically, so there are common step types - each step is defaulted to a common version - they get updated from the property loader.  Any insight would be extremely helpful.
    Thanks,
    Bryan
    Solved!
    Go to Solution.
    Attachments:
    TTIM.csv ‏12 KB
    TTIM.seq ‏69 KB

    Hello Bryan,
    I think I have found out what is happening. I looked at your properties file in Notepad and noticed that the FileGlobals.Duration < 5 did not have quotes around it. This causes TestStand to evaluate the expression when it is being imported which causes it to be set to true. If it has quotes around it, TestStand will still evaluate it, but it does so by removing the quotes and then putting the expression in the While loop. I am not sure what caused the file to be exported this way. I was hoping you could walk me through the steps you did to export the file so we can try and see what might have gone wrong. Also what version of TestStand are you using?
    When I exported the properties I went through these steps:
    1. Go to Tools»Import/Export Properties
    2. Selected the destination for my file and the format
    3. Went to the Properties Tab and exported all of the properties
    4. Pressed Export
    A workaround you can use right now is to go into your properties files and manually put quotes around the expressions for the While Loop. Look forward to your response and have a great day!
    Best Regards,
    Adam G 
    National Instruments
    Applications Engineer

  • Property Loader with Excel spreadsheet embedded into a Word doc

    I know I can load test limits from an Excel doc using Property Loader but can I load test limits from an Excel table embedded in a Word document? Has anyone ever done this?

    Jules,
    I looked into how this could be accomplished, and it doesn't look like it is possible using off the shelf methods. Please if anyone figures out how to do that, i would strongly encourage you to write a Community Example . I think your closest work around would be to have the excel document linked in the word document http://office.microsoft.com/en-us/word/HA101208101033.aspx . Unfortunately in this situation, the excel file is still seperate from the word doc, and anyone reading the word doc would have to open the excel through the link to view its contents. Also if you move the document, you have to remember to move or change the path of the link. What is your motivation behind having the Excel Spreadsheet in a word document? I agree it would be a novel Idea, but as of now when you copy the object into the word document, it gets encapsulated by the .doc or .docx, and there is no clean easy way I have found to abstract it out. I also looked into the potential of dynamically linking the excel spreadsheet and word document, so when you would update one...it would update the other automatically, unfortunately this functionality doesn't exist (that I could find). Sounds like a pretty good product suggestion for microsoft though ; ) Keep me updated if you find a better work-around.
    Richard S -- National Instruments --Applications Engineer -- Data Acquisition with TestStand

  • Using Property Loader in a sub-sequence with multiple invocations

    I'm using the Property Loader to load a different set of limits for each invocation of a sub-sequence. In my example, I have a sequence to do tests all the tests on a given RF band. But I want the ability to specify different test limits for each band.
    It wasn't hard to come up with an expression based on Parameters.Band to specify different Start and End data markers in the Property Loader step. So far so good.
    I don't necessarily want to override the same limits in every band. For one band, I might be happy with a default limit from the sequence file itself. Trouble is, if I don't specify a limit in the limit-file for a given band, then the limit loaded by the previous invocation of the sub-sequ
    ence is still in effect. This was a surprising behaviour. There's a huge opportunity for errors to creep in here, because the limit files may be edited by "lusers", and it's hard to explain this pitfall.
    Is there an easy way to make the limits reset to the sequence-file defaults before I call the Property Loader? Or alternatively, to make the loaded limits affect only the present invocation of the subsequence (the same way loading Locals only affects the present invocation?)
    BTW, I'm not actually using the official TestStand Property Loader, which I find too unwieldy. We wrote our own Property Loader. But the problem is common to both. Changes to RunState.Sequence.Main... persist across invocations of the sequence.
    - Ron

    Here I go, answering my own question again. For the benefit of anyone else who ever runs up against this...
    The trick is in the Sequence Properties dialog. Turn off "Optimize Non-Reentrant Calls to This Sequence". The little comment there makes it pretty clear that this is what's needed. I tried it, and it works.
    - Ron

  • Import varying attribute dimension (with a load rule)

    How do I maintain varying attribute dimensions in a model with a large base dimension? It does not make sense to manually maintain all those members in the outline.
    Is it possible to import varying attribute dimensions (with a load rule)?

    That is true for regular attribute dimensions. Nowhere, I have found instructions how to do this for varying attribute dimensions (aka slowly changing dimensions) that change over time.

  • Can I set the "step run mode" -property with the property loader

    Is it possible to set the "step run mode"-property  by using the property loader to "Skip" , "Normal" or "Force PASS" ...in TestStand 3.0 ?

    I turned on Station Options>>Preferences>>Show Hidden Properties and then exported the Step.TS.Mode property to a limits file. I then added a PropertyLoader step and it functioned correctly. 
    Note that importing a hidden TS subproperty makes an edit to the sequence file, even if done at runtime. Thus if you later save the file, you might end up inadvertently saving the last imported values. This isn't necessarily a problem if the values in the file are always overwritten by a property loader step.
    (btw, I tested this in 4.0, but I'm hopeful it would also work in 3.0)

  • Property loader error

    I have created a test for 50 measurements. This requires the property loader to read:
    1 off StationGlobals.CurrentTestName
    1 off StationGlobals.FailTarget
    1 off StationGlobals.PassTarget
    1 off Step.Comp
    1 off Step.Limits.High
    1 off Step.Limits.Low
    Array 0f [0] to [49] of:
    Step.Result.Measurement[*].Comp
    Step.Result.Measurement[*].Limits.High
    Step.Result.Measurement[*].Limits.Low
    To test this a single block program was written. The above was entered into the property loader step. All variables pointing to the reference files and the file start and stop label are set up by local variables. The limits file was manual altered and trial values entered.
    The program ran and loaded all limits successfully.
    I have a large program under development that I could not get this function to work in. I copied the property loader step and limits string from the working files into the larger program. I have checked the correct variables are being passed to the property loader for the limits source file name and the Data Start and End Markers. Everything looks fine but when I run the program I get an error message saying:
    Sequence File: 1065-32911_Block09_RDVS.seq
    Property loader step failed to import or export properties.
    153 property value(s) were found.
    3 property value(s) were imported from 6 row(s) of data
    I even tried copying the complete performance test across and the whole of the limits section for that performance test too. It still won’t work.
    Also, what does the error message
    3 property value(s) were imported from 6 row(s) of data
    actually mean anyway?
    I've attached a text file with the individual linits test text.
    Attachments:
    Multilim.txt ‏6 KB

    BrianM,
    It seems that the properties does not exist in your current context.
    'Rows of data' means the number of lines in your text file within the data markers.
    Is the error message you are providing complete?
    Did you copy the message from the Run-Time error dialog?.
    Make sure you have the same steps you had originally and that the steps contains tha same properties (measurements).
    In this case you should aways have a step called 'Test Multiple Numeric' containing 50 measurements.
    It is very importatnt that the step name is the same.
    It seems to me that the step is only being able to import the station globals.
    You can verify it by ignoring the error and checking the station globals values after the step executes.
    Hope it helps.
    If you have any question let me know.
    Antonio Lie.
    Message Edited by Antonio Lie (NI) on 04-12-2006 12:46 PM

Maybe you are looking for

  • Printing Problems with Acrobat 9.5.1?

    I recently installed the update - Acrobat Pro 9.5.1 (Mac). Now I am having problems printing pdf files. I re-installed printer drivers and printer software a couple of times. Got a file to print this morning and now nothing will print again. These up

  • How to disable the transparent pop up in Acrobat X?

    I have Adobe Acrobat X on my system and there is an annoying transparent pop up that pop up on the document each time I move my mouse.  I want to disable this.   I don't know if I have ever seen anything so annoying. Thanks for your help in advance.

  • I bought a new back housing for my iphone 3gs need to find a place for labor

    I am looking for the cheapest place near new york. i am willing to ship.

  • Recycle of scrap material

    Dear all, I am having 4 material(they are actually same material having diffrent Gross weight say 200gm,400gm 600gm and 800gm). This materials are maintained in basic unit of measure (ea).now when the customer return this material it becomes scrap, I

  • Boot Loop Grey Screen - Flashed Image File on Startup Disk

    My computer is a boot loop thanks to my really stupid error using Terminal. I was trying to flash an OpenElec image on a USB drive but I accidentally flashed it on to my startup disk, disk1, which caused some major issues. here is the link to what I