From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

table / tree hybrid?

I have in mind a feature that I'd like to implement: a test executive GUI to enable my production staff to build their own life cycle test sequence.  To date, I've "hard coded" the sequence of tests in a large state machine.  But that's not very future-proof.

 

So my first thought was a table control on a panel.  The first column could be set to a ring control populated with test types for the user to select from.  Depending on the test type, the remaining relevant columns can be grayed/ungrayed.  I have used this concept in other projects to good success.  In this case, each row of the table represents the test to be executed in sequence.

 

However!  In this test executive, I also need to incorporate loop control.  Some tests must be run multiple times before proceeding onto the next test.

 

So that's where I'm thinking hard about tree controls.  Their hierarchical nature lends itself well to loop boundaries; i.e., the top most child item of a tree branch would be the first member of a loop, and the last child is the end of the loop.

 

But unfortunately, it looks like tree controls can't have numeric columns.  And my table control would require them for testing parameters.  I've mocked up a hybrid control, and what it could look like:

 

table tree concept.png

 

So in this mockup, what's happening is Test 1 completes and then we start into a 4-test loop.  Test 2 lasts for 1 hour, Test 3 for 2 hours, Test 4 for half an hour, and finally Test 5 for 2 hours.  Then we start again at Test 2, repeating this cycle for 24 hours.  Finally Tests 6-7 and we are done.

 

Any thoughts about this?  Is there a better way to go about what I'm trying to do with looping?  To minimize the number of table lines, I would need to devise a way to capture both the start and end of a loop sequence.  Not sure how else to do that cleanly.

0 Kudos
Message 1 of 3
(4,243 Views)

Hi ElectroLund

For what I can tell you are on the right track as far as controlling sequential code using the state machine architecture. It’s hard to give advice without looking at your coding structure but seem that what you have done already it completely functional.

What’s your specific concern about looping?

I also want to let you know that NI offers a test executive software, NI TestStand which you may find interesting here are some links:

 http://www.ni.com/teststand/

http://sine.ni.com/tacs/app/fp/p/ap/ov/lang/en/oc/gs/pg/1/sn/n8:33/

Chris S.
Message 2 of 3
(4,182 Views)

In the end, I was able to achieve what I needed with a single table control.

 

I handle looping by allowing any row in the table to loop back to any previous row (test).  Never forward.  Functionally, this behaves like a do..while loop structure.  It's a bit complicated, but it works well.

0 Kudos
Message 3 of 3
(4,023 Views)