LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gui design, 'array' of different commands

Hello to you all,

 

I am starting a new project. In this project a user should be able to make a list of different commands.

for instance:

  • wait 10 seconds 
  • ramp up from x:0 to y:20
  • change z to 50
  • and so on

I want to check if the commands are valid and if they are okay I want to send them to a statemachine.

 

I can make an array with clusters, however an array can not contain different type's of clusters. E.g. an array can not contain a cluster of a wait cluster and a cluster of a ramp up (see pictures).

 

What would be the best approach here? Can I make a custom control which contains something like a tab control with 10 different tabs and each tab containing a unique cluster or is there another way? I did add some screenshots to give a idea of what I would like to make. 

 

 

Its_Me_0-1747912313521.png

 

 

Its_Me_1-1747912347815.png

 

 

Its_Me_2-1747912475747.png

eventually I am looking for something like this:

 

Its_Me_3-1747913393223.png

 

 

 

 

hope someone can help. Thanx!

 

 

0 Kudos
Message 1 of 4
(355 Views)

Hi Me,

 


@~Its_Me~ wrote:

In this project a user should be able to make a list of different commands.

for instance:

  • wait 10 seconds 
  • ramp up from x:0 to y:20
  • change z to 50
  • and so on

I want to check if the commands are valid and if they are okay I want to send them to a statemachine.

 

I can make an array with clusters, however an array can not contain different type's of clusters. E.g. an array can not contain a cluster of a wait cluster and a cluster of a ramp up (see pictures). 


I recommend a more generic data storage, even a simple (array of) string might be ok!

  • Your "validator" can check the user commands for validity, according to your own rules.
  • A "parser" can translate the strings into an array of clusters, where a single cluster contains as many elements as needed to hold ALL data of ALL commands. I would store the command itself (like "wait", "ramp", "let", …) as an enum in the cluster…
  • Your "interpreter" will read such an array of clusters and execute them in the correct order…
  • When presenting the parsed command list on a GUI I recommend to use a MultiColumnListbox…

Don't forget to type-define the enum and cluster!

 

Generic advice: separate data storage in your program from data presentation on your GUI. This way you can optimize the data storage on your needs while still presenting a "nice GUI" to the user!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(349 Views)

Hello GerdW

 

thank you for your reply!

 

You start your reply with the sentence:

 

"I recommend a more generic data storage, even a simple (array of) string might be ok!"

 

Do you mean storage or (on the block diagram) or the user input (Front panel)?

 

Lets divide my question in parts I think points 1 and 5 are GUI related and 2,3,4 are more block diagram related.

I think I find the GUI part the hardest part, as I cannot make a scrollable array with different clusters or, use a command ring to choose a GUI blok of data.I can put all the control's in a tab structure but I cant make it a type def. of this etc.

 

  1. How can I make a GUI which is easy for the user. So in part B of the picture below a user can click the menu ring for a command, and then he / she sees the options available. different options have different variables e.g. wait has got: user comment wait time and a boolean. Ramp up has user comment start value and end value. I did only show 2 commands but I would like to have an "array" of commands.
  2. "Your "validator" can check ......" okay sounds reasonable.
  3.  "A "parser" can translate the strings ... ALL..." I understand that now you can make an array as the cluster is always the same. 
  4. "Your "interpreter" will read such....." okay and then send the Queue SM commands
  5. "When presenting the parsed command list on a GUI I recommend to use a MultiColumnListbox…" I understand this, this will also make it easy to save the data to a file. However, I am looking for a method to make it easy for the user. If I can present an user friendly gui, like a pull down menu which shows the corresponding options I think the users will be happy. 

 

 

Its_Me_0-1747924363194.png

 

I think I can use A, but it is a lot harder for the user. What do I need to do to use a scrollable version of option B with tens of rows ?

 

thanx for the help ! 

 

 

 

 

 

0 Kudos
Message 3 of 4
(297 Views)

Hi Me,

 


@~Its_Me~ wrote:

Do you mean storage or (on the block diagram) or the user input (Front panel)?


Front panel elements are either data sources or data sinks, but shouldn't be used for data storage.

THINK DATAFLOW!

 


@~Its_Me~ wrote:
"When presenting the parsed command list on a GUI I recommend to use a MultiColumnListbox…" I understand this, this will also make it easy to save the data to a file. However, I am looking for a method to make it easy for the user. If I can present an user friendly gui, like a pull down menu which shows the corresponding options I think the users will be happy. 

Using a MCLB for data presentation does not "help with saving to file"!

I repeat: separate the data storage structures from UI presentations!

 

For "user friendly GUIs":

  • It's a common scheme to present the current list of items (aka "command") in a MCLB.
  • Place some buttons next to the MCLB to add/insert new items, delete the selected item, re-order items, in general: edit the list of items.
  • To edit a single item you can place an "Edit" button that shows the current item settings in dedicated controls next to the MCLB, including your pulldown menu to select the command…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(270 Views)