From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Test sequence with variable actions and parameters UI design

I am designing a user interface for a test sequence.  It should have a user settable variable number of steps or stages in the sequence.  Each stage in the sequence should have the ability to choose the type of action taking place in that stage (perhaps through use of a ring control).  Each action type may have a different number and type of parameters from other actions.  When that action type is changed by the user, the parameters associated with that action type should be displayed so they may be defined.  Each stage should ideally have an enable boolean.  There should be a separate Start Sequence button that initiates the test sequence.  Prior to the Start Sequence at run time, the number of stages and the Action for each stage and its associated parameters can be changed.  All stages with their actions and associated parameters should be visible and available to the user.  Actions may be something like Delay, Set Switch States, Ramp Temperature, Measure Current with associated parameters such as Delay Time, boolean switch states, Ramp start, stop and rate, Measurement duration and rate.  One possible implementation is an array of clusters with each cluster holding the enable boolean, action type and associated parameters.  Use of an array makes it easy to loop over the individual stages to run the sequence.  I am not able to come up with a way to display the different available parameter selections for each action type in an array.  I would like only the parameters associated with the action to be shown for each stage.  An array must show a consistent list of parameters for all indexes.  A subPanel could be used by loading a different VI for each action type but a subPanel cannot be placed into an array (nor can a Tab control).  It would be ok to always show the maximum (say 10 or 20) possible stages to the user rather than only up to the maximum (limiting the number of rows in the array) as defined by the Number of Stages.  Also acceptable is to not use an array but then response to user changes in number of stages and each stage's action needs to be handled as well as ability to step through the stages once the sequence is started.  Example VI attached showing one possible look to the UI.

 

Grant H. - this question was asked of you at the Boston area Developer Days.

0 Kudos
Message 1 of 5
(2,644 Views)

Hi Steve,

 

I looked through your post for a question, but couldn't find one.Smiley Wink

Also, I don't have LV2011 installed so can't see your code.

 

You appear to be trying to define your user interface in terms of the data structures you plan to use to execute the code.

 

Instead of doing it that way, I suggest that you design your UI in terms of what the user needs to see and do, not how the code is implemented behind the scenes.

 

For example, this appears to be what your UI requires:

 

The user must be able to create and delete steps to create a sequence.

A Step consists of an Action with parameters.

Once defined, each Step displays the Action name and it's parameters.

Any Step can be disabled by the user.

When complete, the user presses a button to start the sequence.

Other requirements? Such as change step order, stop sequence, etc.

 

In terms of implementation here is an idea:

 

Use a text representation like a listbox.

When the user wants to add a Step they select a specific Action.

A pop-up for that action allows the user to select the desired parameters.

When complete, the Action name and it's parameters are written to the listbox as a string

Example: "Ramp Temperature: 20 60 25"

 

Now when you start to execute the sequence you simply parse each text string for the Action.

The rest of the string contains your parameters.

In the code for that Action you convert your string parameters to their correct data types.

 

This method solves the issues you mentioned and should provide a better user experience.

 

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(2,632 Views)

Hi,

 

You can also check out the UI group here in the community. I got many useful tips from there. 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 3 of 5
(2,622 Views)

@SteveP wrote:

I am designing a user interface for a test sequence.  It should have a user settable variable number of steps or stages in the sequence.  Each stage in the sequence should have the ability to choose the type of action taking place in that stage (perhaps through use of a ring control).  Each action type may have a different number and type of parameters... 

Grant H. - this question was asked of you at the Boston area Developer Days.


 

Whith out getting into the exotic apporaches (that require a lot of work to develop functionality not native to LV) there is the "generic" appraoch already mentioned and then there is the LVOOP approach. Each of your steps can be an instance of one of many "children" of a "Step" class and can be used in an array on the diagram. The common stuff will be in the Step class and can be displayed as an array or cluster etc. For the stuff that differers for the unique step types use a sub-panel to expose the setting that are child specific.

 

have fun,

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,617 Views)

It sounds like you are trying to recreate TestStand. Have you considered simply using that instead of trying to recreate the functionality?

0 Kudos
Message 5 of 5
(2,603 Views)