NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to compare 2 arrays with different operator options using parameters in Teststand

This should work.....

David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 11 of 15
(1,317 Views)

I am able to open the sqe file...thanks for sending in TS 2010 format....

 

I saw the logic but it compares 2 arrays but i need to compare each element in Array 1 and Array 2..pls let me know

 

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

0 Kudos
Message 12 of 15
(1,306 Views)

This sequence should do what you want it to and will compare using any of the default TestStand comparison types found on the 'Comparison Type' pull down menus for numeric limit tests but have just listed GE (>=), LE (<=), or EQ (==).

 

If you run it and look at the report at the end it should show which elements have failed the comparison.

David Clark
CLA | CTA
Genesee Technologies Ltd
Hampshire, England
0 Kudos
Message 13 of 15
(1,302 Views)

thanks for sending ........i want to use this as a subsequence so that users can input only elements into arrays.

0 Kudos
Message 14 of 15
(1,290 Views)

can we Pass two array parameters in ForEach loop

 

ex

 

foreach(parameters.array1 into locals.array_1, parameters.array2 into locals.array_2)

 

Pls lt me know

0 Kudos
Message 15 of 15
(1,277 Views)