NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

can i pass the values by declaring the continer in sub seq and calling in main seq

hi,

 

In sub seq, i have created the contianer (under parameter) and the continer has array of numbers and array of strings.....

 

 

My question is

Similar to parameter can i call these container in main seq and can pass the values through these arrays?

 

How to find no of elements of array of string or number which is delcared under contianer?

 

Pls let me know

 

thanks,

chethan

0 Kudos
Message 1 of 9
(4,402 Views)

When you create a variable or container in the parameter group of a sequence you will have to provide this variable from you calling sequence. So if you call the sequence from your mainsequence you'll have to set a variable as parameter.

 

You can use the expression "GetNumElements(array)" to get the number of elements in the given array.

0 Kudos
Message 2 of 9
(4,397 Views)

Thanks for your reply..

 

 

I didn't understand......

 

Currently I have declared as follows

 

SubSeq1

parameter -->. my contianer -->. Arr1[] (integer type),Arr2[] (string type)

 

In Main Seq

I have created as follows

 

locals -->. my contianer -- > Arr1[](integer type), Arr2[](string type)

 

Is this correct way of declaring?

 

To extract no of elements i used

getnumofelements(parameter.mycontianer.arr1)  .....is this correct way of decalring to get no of elements fform arr1 or arr2

0 Kudos
Message 3 of 9
(4,393 Views)

Yes that's the correct way, but I would advice you to create a custom type of your container. If you decide to expand the container you only have to do this once.

Your statement to retrieve the number of elements is correct

0 Kudos
Message 4 of 9
(4,387 Views)

Pls let me know how to create custom type for my requriement

0 Kudos
Message 5 of 9
(4,385 Views)

See attached example. 

 

Press ctrl+T to bring up the types window (or select Types from the View menu)

0 Kudos
Message 6 of 9
(4,367 Views)

I made a small mistake in the previous example, the subsequence calls itself instead of calling it from the mainsequence, please use the attached example.

0 Kudos
Message 7 of 9
(4,359 Views)

I am not able to open this file since I am using Teststand 4.2.3 version (2010 ver)

0 Kudos
Message 8 of 9
(4,318 Views)

Try this one, I saved it for TestStand 4.2.x

0 Kudos
Message 9 of 9
(4,309 Views)