LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Ring to Control Case

I have a fairly simple vi that reads data from a file and then displays it in a number of ways. I would like to create a ring (or something similar to a pull down menu) that would allow me to select a specific case which would determine the file that I would open. I know I could leave it so a file dialog pops up every time I run the program, but I want a selection menu type item on the front panel. I have attached the vi I am currently working on so you can get an idea of what I am trying to do.

Thanks,
Travis
0 Kudos
Message 1 of 4
(3,399 Views)
I guess you typed "red text" into the title of each case. That could be the source of the "selector values have wrong type". Please just draw a blank case and wire the ring to the selector, thus the case's type will be defined automatically by the ring. Remember don't type anything into the title. You may use labels inside each case to comment.
0 Kudos
Message 2 of 4
(3,399 Views)
To fix your code will be a very complex process . On the front panel, right click on the ring control and go to the replace submenu.

On the resulting function palette go to the "Ring and ENUM" palette and select enum (last item, first row), and presto hey all is well with the world.

The problem is that you were on the right track but using the wrong type control. A ring has a text display but it is still just a numeric control--hence the problem with the case structure. By contrast, the value of an enum IS the string, so you can use the kind of selector you originally created.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 4
(3,399 Views)
> The problem is that you were on the right track but using the wrong
> type control. A ring has a text display but it is still just a numeric
> control--hence the problem with the case structure. By contrast, the
> value of an enum IS the string, so you can use the kind of selector
> you originally created.
>

Good answer, but playing the role of "really picky nerdy guy", the enum
is really a bit different from a string. The datatype of the enum is, a
strict set of mnemonics. The wire type carries the set info and the
value is the selected element, which can be both a number and a string
since it references the set of mnemonic strings. OK, I admit it, I
really just like using that word.

Greg McKaskle
0 Kudos
Message 4 of 4
(3,399 Views)