LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Input array listing possible test results to generate all test scenarios

Solved!
Go to solution

@altenbach wrote:

 


Here' are some ideas. Arguably simpler. 😉 


 Yeah I'll say, now that's what I call optimized. Kudos 😃 I have about a year and a half of experience in LabVIEW so I knew my solution could be cleaned up massively lol.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 21 of 22
(495 Views)

Well, I started programming in the early 70ies and still make mistakes. 🙂

 

As I mentioned in the beginning, your first code had duplicate results, which could be hard to detect without extensive testing. Since you have LabVIEW 2019, you have access to "sets", which allows for (1) quick sanity checks and (2) automatic elimination of all duplicates. As a bonus, it also gives the result in a nicer sort order.

 

If the equal comparison fails AND you don't have duplicates in the input, the algorithm would be faulty!

 

 

altenbach_0-1593701342931.png

 

0 Kudos
Message 22 of 22
(481 Views)