04-21-2022 03:03 PM
Hi all,
I am working on a project where the panel will have a bunch of clickable tiles arranged in columns. There will be multiple columns with clickable tiles.
Clicking a particular tile within the column will change its background color to say bright green and assign the value "True" for Enabled. Clicking the tile again will will change its Boolean value to "False" for Disabled and its background color to dark green.
The dark green marked tiles will be skipped in the program execution.
Additionally, I'd like to be able to mark the tile that is currently being executed with a red LED.
I googled around for a while, but haven't yet found any examples that would be suitable for clueing-in.
Please find the attached PNG file for a rudimentary explanation of what I am trying to accomplish.
For clarity, only one column with tiles is shown.
LabVIEW version is 2018.
Best regards to all and thanks.
LonginusP
04-21-2022 03:17 PM
Sounds like you want to create some kind of test executive. What do you have so far? Realize that, if you don't have anything so far, that is kind of an indicator of your LV experience, and it is going to be a fairly daunting task to get something like this created from scratch. You won't need advanced knowledge to pull this off, but you will need a solid comprehension of the basics.
04-21-2022 03:29 PM
List boxes can be useful to implement all desired functionality, just maybe graphically slightly different:
04-21-2022 03:40 PM
@altenbach wrote:
List boxes can be useful to implement all desired functionality, just maybe graphically slightly different:
A simple old forum example
multiple selection in listbox without using ctrl key
Make sure to set the selection mode to "0 or more" items.
05-02-2022 09:53 AM
Per your suggestion, I started experimenting with the listboxes. Since I've never used them before, there is a fair amount of trial-and-error on my part. The front panel GUI still looks pretty basic, but I am making progress.
Thanks for the suggestion.
LP
05-02-2022 09:54 AM
Thanks for sharing the link, it's helpful.
Best regards.
LP
05-02-2022 04:04 PM - edited 05-02-2022 04:05 PM
@billko wrote:
Sounds like you want to create some kind of test executive. What do you have so far? Realize that, if you don't have anything so far, that is kind of an indicator of your LV experience, and it is going to be a fairly daunting task to get something like this created from scratch.
...
How daunting depends on how nice you want it to be. Version 1 of our 2nd generation general-purpose test framework was quite simple and only took me a couple of months to make. I kept cobbling on features, and after version 4, I realized that the next version would have to be a complete redo. I've been working on the 3rd generation for a few years now (It's almost ready). It comprises several hundred VIs (and I had to invent Y Controls to prevent insanity (well, OK, to prevent more insanity (well, OK, to mitigate the increase in insanity))).
05-05-2022 10:41 AM
Hi all,
I ran into an issue.
My listbox has both integer and non-integer cells. I need to assign the values to the non-integers that are different from ones visible to the operator. For example an "aaa" string in the panel must have a value of "k=1" assigned in the diagram. A "100" string has the value of "100" in the diagram. Is there a way to do it with listboxes?
Attached are the sample vi and a PNG with some notes for better understanding.
Thanks in advance,
LP
05-05-2022 11:25 AM
The value of a listbox is the index of the selected item. This is not changeable.
You can do something like what you are asking with a ComboBox, but it only has a single column.
05-08-2022 01:05 AM
I didn't look at the code, but it looks like you simply need to have a separate data structure in the code to hold your actual data.
Based on your image, I would suggest something like a 2D array of clusters, where each cluster has the following values: {Type [enum], Value [probably variant], Name [string to be displayed]). You then use that data structure for the actual code. You can take the name from each cluster to update the MCLB and use the type enum to know how to convert the variant. This is also possible from the variant itself, but I would suggest just having the enum.
Note that because you have an MCLB and it looks like you only want a single cell in the 2D array, you will also have to track the active cell separately (local variable, shift register, etc.). You can use the Mouse Down event and then call the Point to Row Column method on the MCLB to know which cell was clicked (right click the MCLB>>Create>>Invoke Node to call the method).