NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I iterate using elements of an array in TestStand?

Juergen - Thanks for the post. Forgive me for all of the questions but I have never done this in TestStand before so everything I am seeing is new to me. This method that you propose seems to work for a fixed array. I am bring in a two dimensional array of strings from a Labview VI. This is a dynamic array meaning that the user of the test can specify any number of test configurations to run. The example before this one showed to be dynamic in that nature. I am not sure I completely understand the container aspect that you are using. If you wouldn't mind explaining I would appreciate it.

0 Kudos
Message 11 of 16
(2,256 Views)

HI

 

The example was done as static. But you can resize it dynamically in your LabView code.

Take a look to this code snipped. It shows how you add a element to the container.

array.jpg

It is done in C# but the TS-Api Calls in LabView are the same.

 

Hope this helps

 

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 12 of 16
(2,246 Views)

Juergen - I feel as though we are getting closer. I do not know C# so this is not really making any sense to me. I am going to come right out and ask. Would you be able to supply an example of how this is done between TS and LV? Again this type of interaction between the two I haven't messed with much. I went and read up on containers and now they make sense to me so I have have that done. Again in Labview this is a snap and I could go with that solution, I am just trying to use TS as much as possible and make my deployments not so LV heavy.

 

Thanks,

Troy

0 Kudos
Message 13 of 16
(2,243 Views)

Hi Ray or asbo,

 

Would you please provide an example on how to add elements on typed containers.

On my private maschine i have no LV available and of course i am not very well with LV.

 

Thanks

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 14 of 16
(2,240 Views)

hi,

 

I would like to have some solution...could you ls give me the olution

 

requirement is as follows

 

Array XX [ A_Temp,

               B_Temp,

               C_Oil Pressure,

               D_Oilpressure,

               ......

               ......]

 

Note : A_Temp, B_Temp,C_Oil Pressure,D_Oilpressure all these parameters will be getting  numerical values (dynamically) from the simulink models and also in future I may need to add parameters to this array.

 

 

Array YY [A_Temp_1,

               B_Temp_2,

               C_Oil Pressure_3,

               D_Oilpressure_4,

               ......

               ......]

 

Note : A_Temp_1, B_Temp_2,C_Oil Pressure_3,D_Oilpressure_4 all these parameters will be getting  numerical values (dynamically) from the simulink models

 

So my question :

 

I would like to verify A_Temp >= A_Temp_1

                            B_Temp >= B_Temp_2

                            C_Oil Pressure  >= C_Oil Pressure_3  etc

 

My teststand version is TS 4.2.1.83

 

I also tried usingforeachloop passing 2 parameters but it passes only one parameter in foreach loop...FYI

0 Kudos
Message 15 of 16
(2,009 Views)

Hi,

 

I noticed that you have a duplicate post here. Since this thread is over 2 years old, your new thread is more likely to be viewed by other users. We do not recommend creating duplicate posts because all threads are monitored and it reduces the effectiveness of answering your question.

Regards,

Anjelica W.
National Instruments
Product Marketing Manager
FlexLogger and TestStand
0 Kudos
Message 16 of 16
(1,991 Views)