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

Similar Messages

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

  • 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

  • For some reason, firefox has changed something in my laptop so that when I play games on facebook, such as deal or no deal, who wants to be a millionaire, ect. the games load only to half size, so half of my games are cut off.

    everything i have done has not fixed this problem, its only on my laptop on my parents laptops it works. V

    Oh no... NOT THE 99-PAGER!!! Anything but THAT!!!

  • 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

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

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

  • Property Loader won't Load FileGlobal variable values

    What am I doing wrong here?
    I've Exported three FileGlobal string variables into a tab delimited TEXT file and then cleared out the Values (values="") . The contents of that file is:
    Variable Value
    Variable Value
    FilteredInputValueTag "tag_AI_ENGINEERING_VALUE_FILTERED"
    FullDefaultTag "tag_SYS_FACTORY_DEFAULT"
    OutputValueTag "tag_SYS_OUTPUT_VALUE"
    Variable Value
    If I manually IMPORT the file, it works OK, and tells me that it has imported 3 Variables.
    However, I can't get the values to Import using the Property Loader at Runtime (Context of the FileGlobals remain at blank -""). I DO have the correct Path & Filename set (if I change one charact
    er and it gives me an Error Box.)
    Mike

    Hi Mike,
    I have attached a small TS2.0.1 example which I hope will help you sort your problem.
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    FileGlobalsExample.seq ‏31 KB
    FileGlobalsExample.txt ‏1 KB

  • 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

  • How to apply Property Loader to all sequences in the Sequence File?

    HI,
    I'm following the help instructions for the Property Loader and it states....
    Use Current Sequence File—Selects the file where the step is located.
    Sequence—Specifies the name of the sequence into which to import variables and properties. The specified sequence must exist in the specified sequence file. Select the <ALL SEQUENCES> tag from the drop-down list to instruct TestStand to import variables and properties for all of the sequences in the specified sequence file. You must specify a valid sequence name for the step to work properly.
    In my specific sequence file I added the Callbacks:  SequenceFileLoad, SequenceFileUnload, PreUUT. In addition to that, my MainSequence is calling 2 subsequences.
    I put the propertyLoader step (setting few values of the SequenceFileGlobals) in the setup section of the SequenceFileLoad, checked the 'Use Current Sequence File' and selected ALL SEQUENCES tag in the 'Sequence' option.  I verified that it does what I wanted.  Then, is it entered the PreUUT subsequnce, the values returned to the "original" values.
    Is that a bug?
    If not, how do I use the PropertyLoader in a sequenceFile that include several subsequences as well as Callback sequences.
    Thanks
    Rafi

    Ooops, sorry about that...
    I forgot to mention....it is TS 3.5.
    As per your questions-- yes they all in the same sequence file. 
         mySeqFile.seq
               SequenceFileLoad
               SdequnceFileUnload
               PreUUT
               Seq1
               Seq2
    AS I said....I put the property loader in the setup of the SequenceFileLoad,  I see that it works properly in that subsequence.  Then, after the SuequenceFileLoad is finished, I do Ctl+F5 for Test UUT's.  I put a breakpoint in the first step of the preUUT subsequence and check the context.  I notice that the variables in the FileGlobals to whom the property loader writes, have been changed back to the original values.
    I'll try to create a simple program to duplicate it but it may take me time as this test station is very busy.
    Thanks
    Rafi

  • Can I use property loader in a main sequence to load properties in subsequence?

    Hi, I have been trying to use the property loader to load test limits and local variabels into subsequences from the main sequence.
    I can export all the properties for my main sequence and all the subsequences contained within by selecing <all sequences> in the export function.
    When I try to load the exported file back in using the property loader I get differant errors depending on the format I exported/imported it with.
    For text or csv files iget error -17100
    "The file format is incorrect near the section 'StationGlobals'.  Make sure that you are using start and end markers correctly."
    For an xl format I get error -18 
    "Property loader step failed to import or export properties.
    310 property value(s) were found.
    43 property value(s) were imported from 920 row(s) of data"
    There is no where near 920 rows of data or 320 properties in the exported file.
    If i use the property loader to load properties in just main it works fine, is there extra formating I need to do to the file before importing it or is it not possible to load properties into a subsequence from a property loader in main?
    Solved!
    Go to Solution.

    Hi,
    I have tried several sequences and building the propertyloader file using the export tool,
    Moving the End_Mainsequence to the bottem did not help.
    I can load values into a single sequence with no problem it is only when I try to load properties into a sub sequence from the main sequence that I have issues.
    Attached is a more simple example of what I am trying to acheive. 
    Kind regards,
    Hugo
    Attachments:
    Sequence File 2.seq ‏9 KB
    Test.csv ‏2 KB

  • 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

  • Property Loader - How to set it up for all sequences?

    Hi,
    I made an attempt to use the property loader for the first time. (TS3.5).
    I set it up in the setup section of the SequenceFileLoad and specified few parameters of the FileGlobals.
    What happened was a proper operation for the SequenceFileLoad sequence, but as soon as the procedure stepped into the MainSequence, the values return to the original values.  I repeated the process with and without import to Run-time sequence only' and it behaved the same.
    Is there a way to set it up so ti will apply to all sequences within my sequence file and also to the external sequence files called from the main sequence.  In short to replace the parameters of the FileGlobals for the duration fo the test.
    Thanks
    Rafi

    Rafi,
    The behavior you are seeing with the SequenceFileLoad engine callback is expected.  The SequenceFileLoad callback occurs before the Sequence File is actually loaded.  In your case, you are setting the FileGlobals then loading the SequenceFile.  When the Sequence File is loaded by the engine, the FileGlobals are also loaded in with the file.  So the FileGlobals are reset to their default values.  If you want to set the FileGlobals from the property loader, put the Property Loader step in the Setup group of the MainSequence.  In this case, you are setting the values of the FileGlobals after the Sequence File is already loaded.
    FileGlobals only have a scope that covers a SequenceFile.  You will not
    be able to load FileGlobals that are accessible to sequences in
    external sequence files.  You have a few options for getting the data into the external sequences:
    (1)  Add parameter variables to the Parameters section of each external sequence.  When the sequence is then invoked, you can pass the data which will be used by the sequence.  This provides the proper data dependency between sequences and avoids confusion on when the data is being initialized.
    (2)  For each Sequence File or each Sequence, create a separate property file.  When each sequence is called, then use the Property Loader step to load in the data.
    (3)  Use StationGlobals instead of FileGlobals.  StationGlobals have a scope that covers all SequenceFiles on a test station.  However, this is not a recommended method, because the data is accessible to all sequences.  For large applications, it is easy to mistake points in the sequences where data is being initialized and used.  In these cases, you may expect the data to be a certain value that it isn't because another Sequence has already changed the data values.  That is why it is better to use smaller scoped data variables.
    Let me know if you have any further questions.
    Thanks,
    Tyler T

  • 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

Maybe you are looking for

  • Excise details for IMPORT vendor

    Hi SAP ients While Doing J1IEX_P for import vendor system gives error msg "maintain Excise details for the vendor" But for IMPORT vendor we dont maitain such details Am I right? Can anybody help? santosh j

  • How do i remove a library from my account

    my spouse synched her new ipad on my pc that created a mess with my library.  Now I cannot find my library or all the music I had in that library.  I did find a previous library with all my music but now most of the songs have that exclamation mark n

  • How to implement Self Registration in EP 7.0

    Hello All, I am working in Enterprise Portal 7.0. I wanted to customize self registraion page in my portal in SAP Netweaver 7.0. Please tell me how to implement self registration in Portal 7.0. Thankx.

  • No more bugs in C !!! just use PARASOFT solutions and forget about it all !

    Just some quick links to the PARASOFT homepage ( www.parasoft.com ) so you can see how YOU could develop bug free applications in C. These are tools developed by professionals for professionals. Check out how powerful they really are by trying them o

  • Problem with orcladmin access rights

    We've successfully installed an OAM/OIM platform with Identity Server & Access Server running on one box; WebPass, Policy Manager and WebGate running on Tomcat-2.0 on another box. All screens are coming up but we get access rights errors when trying