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.

Similar Messages

  • 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

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

  • 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

  • Load "Selected" in a Property Loader test step from file

    Hi,
    The Import/Export tool stores its selected properties in the file �PLPropertyLoader.ini�. Is it possible to use this file to specify which properties a �Property Loader Test Step� should load? How? Then the information about what to export and load dynamically later is stored in the same location and the risk possibilities is reduced to one place.
    Best regards,
    Morten Pedersen
    CIM Industrial Systems A/S
    Denmark

    Morten -
    By default, the Property Loader step type stores its selected property list in the step's property "Step.PropertyList". The Edit Property Loader dialog box has the "Property List Source" expression control that specifies this as its value.
    If you created a Station Globals array property of type "DatabasePropertyMapping", you could specify that the steps use this property. You might have to set to show hidden properties to find the "DatabasePropertyMapping" type in the insert menu. Note that when you do this when you edit the selected list in a step you are editing the selected list stored in the station global array property.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

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

  • Editing a Property loader locks up TS

    I can add a property loader step to my sequence, but when I go to edit the loader, my TS session locks up. This is true for every installation that I have installed TS on. I must have missed something in the installation, but can't think of where I went wrong.
    rjmiller

    Share_Good
    1. Does it happen every time you open the property loader step configuration dialog?.
    2. Could you attach an example?
    Property loader configuration dialog seemed to hang in TestStand 3.1 if your sequence contained very long arrays.
    This issue was resolved with the service pack.
    If you are seeing a similar behavior in TestStand 4.2 it is likely that is not the same issue found in TestStand 3.1.
    Regards.

  • How can I pass an empty array to a parameter of type PLSQLAssociativeArray

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

  • How to use the property-loader?

    Hello,
    i´m using TS 3.5 and LV 8.0. Now i also want to use the built-in property-loader from Teststand.
    Is there somewhere a documentation for "beginners" how to use this property-loader? At the end i want to read parameters from an ascii-file which updates my input-parameters of the steps in the current-sequence.
    I know how to read and change parameters from teststand in labview via active-x, but i have no idea how to use this propertyloader-thing.
    Is there an easy help file somewhere in the net ( I havent found one yet)?
    Thanks for your help.

    Meanwhile i can use the propertyloader for Limits and Variables which are in a container of the teststep. What not worked was:
    1.) setting the properties of a "Messagebox". For example the property "Button1Label". Why is this not working?
    2.) The second thing what is not clear: Do i need for each sequence an own property-loader? I tested it with a sequence with one subsequence. Does the subsequence needs its own property-loader?
    Currently the import-csv-file looks like this:
    Start Marker,,,
    <Step Name>,Limits.Low,Limits.High,Cont.Voltage
    TestStep_1,1,2,4
    TestStep_2,8,16,32
    End Marker,,,
    When Teststep_1 and Teststep_2 are both in mainsequence then it works. When i copy Teststep_2 in a subsequence then i get an error (-18).
    Any ideas about my two questions?
    Thanks

  • How to Use Property Loader to Load All Step Limits of SubSequence

    I have a MainSequence which have 7 Sequence Call Steps,and these Steps all have several Numeric Limit Test(LabVIEW Adapter),Now I want Creat a property Loader Step in the Setup Table of MainSequence to load all the SubSequences' Steps Limits.But I do not know how to realize it?Who Can help me,Thank you!

    It wasn't your english I just misread the question. I found this link that might help answer your question.
    http://forums.ni.com/ni/board/message?board.id=330&message.id=13163&requireLogin=False
    Hope it helps.
    Using LabVIEW 2010SP1 and TestStand 4.5

  • How can I add a new vaiable to the file loaded by Property Loader without changing my script

    I have an input file to my script that I load via Property Loader. The number of parameters in the input file may change from test to test.. Is it possible in some way to add a new parameter without changing the sequence file?
    Is there for example a way to make the Property loader read parameters until end of file, and put the parameter into a temporary variable in my script?
    Hope there is a way to resolve this.
    Cheers
    Claus Christophersen

    Claus,
    The solution you have is a valid one.
    Basically you have a variable (global or local) and you import the expected parameter to this variable before you pass it to the hardware.
    You use that variable as the input parameter you pass to your hardware of course.
    You have to modify your source file depending on the test type you want to execute every time you want to change the test type though.
    Another solution would be to use Data Markers in your file to separate the variable values corresponding to each test type.
    Check the example I am attaching.
    At the beginning I prompt the user for the Test Type (Type I or Type II).
    Based on the type, I import the corresponding variables from the source file using Data Markers.
    If you have questions let me know.
    Attachments:
    SourceFile.zip ‏8 KB

  • How to load a second array?

    I have this code loading a set of thumbnails. Right now the
    first set of thumbs loads fine but how to load my second array in a
    new row?

    Well my first idea would be that somewhere you are out of
    scope and therefore you are getting an undefined somewhere in your
    code.
    So it might be trying to pass "undefined" as your url.
    I would start with the debugger and step through the code to
    make sure that it is able to get all the values it needs at every
    step.
    A good understanding of the debugger tool will save you tons
    of time.
    My next idea would be to split the code up using the command
    pattern.
    Also, since you only have two arrays, you could put an if
    statement before incrementing the arr variable.
    example:
    if (arr < 2){
    arr++;
    }

  • Using WHERE command in property loader SQL query

    Hello All,
    Hopefully this will be a fairly straight forward question.
    I am attempting to use Property Loader to read in test limits from a SQL database. There are many types of models that need to be tested, each having a unique set of limits. I want to be able to retrieve the appropriate limits for the model of product under test.
    To do this I have the product model number available in a FileGlobal. The database contains a table with the test limit information with an identifying 'ModelNumber_Number' column.
    I have written the following SQL query achieve this:
    "SELECT *  FROM TESTLIMITS WHERE ModelNumber_Number=+ FileGlobals.ModelNumber"
    However, this is where I am confused. I'm not sure on the syntax for accessing a variable in the SQL command. I receive the following error:
    The multi-part identifier "FileGlobals.ModelNumber" could not be bound.
    Can someone please provide guidence on how to do this?
    Many thanks,
    Cam.
    Solved!
    Go to Solution.

    Thank you very much for your reply.
    Upon changing the query to as you suggest, I am presented with the following:
    Error In SQL Statement Expression. "SELECT *  FROM TESTLIMITS WHERE ModelNumber_Number = " + FileGlobals.ModelNumber
    Specified value does not have the expected type.
    The type of FileGlobals.ModelNumber is a numeric represented as a double precision 64 bit signed integer.
    The database column is also of type int 64.
    Can you suggest a solution?
    Many thanks.

  • 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

Maybe you are looking for

  • Javascript  Acrobat on my form works, until someone else tries to use it how can I resolve this?

    I created a form with a java script to rotate the page to fill in the rest of the form.  This works fine on the computer I created it on. However, when I distribute the form, whomever opens it and clicks on the Java script button to rotate the page,

  • Guests net problem AirPort Extreme

    I can not create a guest network on my 5th gen AirPort Extreme. When I configure it, airport utility ask me for a name and a password for the guest name. I create it but it never appears on the wifi networks list. Any help guys? Thanks in advance.

  • Equipment floc bom

    Hello Gurus, In our legacy system....we have lot of sub levels going on and on from the higher level ex ab-225 treating this as a equipment in legacy and it has 10 sub components listed and each sub component has again sub levels of spare parts.we we

  • What exactly is a shared hyperlink destination?

    Well, nothing in the documentation explains what a "shared hyperlink destination" actually is.  The very name itself ("shared hyperlink destination") implies that you've got two separate links in your document both pointing to, say, adobe.com (the de

  • Oracle Reports Runtime / WebToGo

    Hi, We are doing a Web application using WebToGo where the users will be able to "go offline" with the application and their data. This portion of the project works fine. We have a couple of rather complex reports that are available while the users a