NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with LV and/or TS to read list of variables

Solved!
Go to solution

Hi,

 

I am using Labview Adapter in Teststand to open WinIDEA and read variable values. Basically LV lib files are used to read value of variable in runtime and returns the value of variable. Input to this labview function will be string i.e name of variable and output will be cluster type.

 

I need to read list of variables and compare against the limits/value for each variable. I may need to read atleast 50 to 60 variables in one step if possible or one variable at a time in a loop. I would like to add these variables in txt file with limits and read them from Teststand as array of strings and compare the result.This way its easy to add or remove variables from the list and hence their expected value. I tried to use property loader but it needs either step name or local/global variable.

 

Other way is add code in labview to do the comparison of variables value read, then I am losing power of teststand and flexibility.

 

I am struggling to find better way of doing this. Any ideas?

0 Kudos
Message 1 of 7
(3,410 Views)

I'm confused HemaKV,

 

What step type are you using to evaluate each string?  You say that you want to do 50 or 60 in one step but there isn't such a thing as a Multiple String Limit Step Type. 

 

I assume you may be doing the String Value Test and looping as you eluded.  However, the limits will need to change each iteration of the loop.  Therefore you will have to store those limits in a Local or FileGlobal.

 

My recommendation is to use a Local variable and just use the Property Loader.

 

So here's what I'm picturing:

Initially you read in a txt file using the Property Loader and populate an array of strings called Locals.StringLimits.

Then you loop on a LabVIEW call to your WinIDEA (Step type is String Value Test)

The return parameter will contain the string you want to evaluate in the cluster somewhere

Set this to Step.Result.String

On the Limits tab you will set the Expected String Value to Locals.StringLimits[RunState.LoopIndex]

 

Is that what you are talking about?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 7
(3,398 Views)

Thanks Jigg for your reply. I think you got most of what i was trying to say.

 

In the attached file LV2, You can see list of variables I have given as string to labview and converts internally each line into array of strings.

This is input to my winidea to read list of variables, "Variable Values Read" list box in LV2, I am listing all the input string along with output

values for each string element read after running the VI.

 

I would like to call this labview with array of strings from Teststand and read out the values from this labview and compare if they are within the limits.

Output I read can be string or numeric, since we dont have multi string limit test, I am thinking to use multi numeric limit type. So the size of output numeric

array will be size of input array string.

 

I need flexibility of adding the string in text file and send as input to labview and get the result and compare with the limits in txt file.

This way I can keep sequence and labview file same and edit only text file for variables. I would like to know if this is feasible in Teststand

otherwise labview will be the best place to add this functionality??

 

Does it make sense? Please let me know if my explanation still not clear enough.

 

Regards

Hema

Download All
0 Kudos
Message 3 of 7
(3,394 Views)

Do you have to get al the variables at once?  Or can you get them one at a time?

 

It would be easier to implement if you could get 1 at a time.  i.e. your VI would just return 1 value per call.  The reason this would be easier is because then you could do like I said in my other post and just loop on a string value test.

 

The problem with them all coming at once is that if you need to vary how many there are you will have to dynamically change the number of limits for a multi numeric limit test.

 

This is doable but it gets quite tricky.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 7
(3,382 Views)

Hello Jigg,

 

I am ok to read one at a time 50 times in a loop like I said in my first post,

 

Basically i need In Teststand

step 1: Read text file

step 2: Start a loop

step 3: Send first variable i.e winIDEA_Var1 give as input to labview and read back numeric result and compare limits (from txt file corresponding to winIDEA_Var1) as numeric limit test

step 4: Send winIDEA_Var2 as input to LV and read result

step 5: until you read all varaibles in that text file

 

May be I am thinking to define one array of local variable in sequence file and use this variable in property loader if this is possible??

<Locals> Variable Value

                                    <Value ID>                  Limits.Low Limits.High

Locals.ReadVariable[0]="WinIDEA_Var1" 739  762

Locals.ReadVariable[1]="WinIDEA_Var2" 739  762

Locals.ReadVariable[2]="WinIDEA_Var3" 739  762

 

I have attached the file I created to achieve this, if i can achieve reading each array element and send this as input to labview and compare the labview result

with the limit defined in text file for each element, then it will be great. At the moment I wasnt able to do this.

 

The reason i would like to do this way, I dont have to go to sequence variable tab and manually edit each variable name and add limits for each limit test.

By just changing the text file, i would like to repeat the same steps in teststand.

Download All
0 Kudos
Message 5 of 7
(3,373 Views)
Solution
Accepted by topic author HemaKV

I would do it like this.  Basically you have a limit file with 2 arrays of data.  One array contains your variables and the other your limits.  Then you loop on a String Value Test.

 

Let me know if you have any questions.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Download All
0 Kudos
Message 6 of 7
(3,369 Views)

Hello Jigg,

 

I think that helps. Thanks for your time. I can tweak for my need.

 

Regards,

Hema

0 Kudos
Message 7 of 7
(3,359 Views)