04-05-2013 03:36 PM - edited 04-05-2013 03:37 PM
Pls let me know how to compare 2 arrays using different operators like <= or >= or ==......
04-08-2013 05:04 AM
I would say that TestStand is probably the wrong place to be doing this kind of function - it would probably be far better to pass your 2 arrays into a LabVIEW sub VI or a C#/C++ method etc depending on what you're using with a control to tell the code module how to compare the two arrays and pass back a boolean to say whether the condition has been met.
If you absolutely have to do it in Teststand then you will probably have to iterate through both arrays simultaneously and compare them element by element to get your comparison.
04-08-2013 08:25 AM
hi,
Thanks for your reply.
Do you have any example in teststand related to my query...
thanks
04-08-2013 09:39 AM
I've put a really simple sequence together to show how to compare 2 arrays aggregate i.e. all indexes added together, but I'm not sure if that's entirely what you are looking for.
The sequence just sets up 2 arrays then iterates through each one adding up the total value and then compares them using the value you entered in the dialogue.
Get back to me to let me know if this helps or not if I'm not understanding your issue correctly.
Sequence is in TS 2012.
04-08-2013 09:47 AM
Thanks for taking your time for this assignment, Since I am using TS 2010 I am not able to open this file.........is it possible to send the seq file in TS 2010 format.....
04-08-2013 10:02 AM - edited 04-08-2013 10:03 AM
I am using TS 2010. FYI
ex:
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
04-08-2013 10:04 AM
Try this.
04-08-2013 10:11 AM
getting error"
array comparsion.seq was saved in teststand 4.5.0.310 and is incompatible with TS 4.2.1.83...Error code : - 17098...." FYI
04-08-2013 10:12 AM
I am having TS 4.2.1.83
04-08-2013 10:21 AM
Use a FOR loop to iterate through the two arrays. You can use GetArrayElements(XXX) to get the number of elements in an array. So that goes into the number of iterations to perform. Create an indexing variable (I'll use i for example purposes). So then your comparison is simply Array1[i] >= Array2[i].