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: 

Pointer Slide Enum?

I am really getting frustrated. I know I have used slider controls wired to case selectors before and it acted like an enum. I could add cases for every value, etc. But now I am missing something and can not figure out how to do this. When I wire the slider to a case structure it acts like an integer is wired to the selector. I tried changing it to a typedef and that didn't work (I didn't expect it would)

 

Here are the steps:

  • Drop a pointer slide on the front panel from controls/modern/numeric
  • Right click and select text labels
  • Right click and select edit items
  • Add items "one", "two", "three", "four"

I noticed this is a type DBL so I changed that to a U16.

 

When I wire it to a case selector it does not behave like an enum. This is killing me because I know I have done this before. I am glad this is frustrating me on my CLD practice exam instead of the real thing!

 

Capture.PNG

 

I can right click on the control and create a constant. It creates a thing that looks like an enum with all the items that I added.

 

 

=====================
LabVIEW 2012


0 Kudos
Message 1 of 5
(3,527 Views)

I have come to the conclusion that I was imagining things. Maybe this is something for the idea exchange?

=====================
LabVIEW 2012


0 Kudos
Message 2 of 5
(3,516 Views)

Hello Steve!

 

Have you resolved your own issue?  Is there no longer a problem?  Please respond because I'd be happy to look into this for you.

 

All the best on the CLD exam!  Maybe CLA one day? Smiley Happy


Greg S.

Sincerely,

Greg S.
0 Kudos
Message 3 of 5
(3,483 Views)

you can make an enum, use the enum to populate your slider and typecast the slider to the enum.

The slider acts as the user interface for the enum.  This way you dont have to update 2 controls and can have the best from the enums advantages.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 5
(3,473 Views)

 


@Greg S wrote:

Hello Steve!

 

Have you resolved your own issue?  Is there no longer a problem?  Please respond because I'd be happy to look into this for you.

 

All the best on the CLD exam!  Maybe CLA one day? Smiley Happy


Greg S.


 

The only resolution is that I think I must have been imagining things.

 

It has been a long time since I have used any sliders or knobs with text labels. But I seem to recall that if you select text labels and add some items then you could wire the slider to a case structure and select based on the labels just like an enum. Maybe not. I know that if you create a constant from the slider you edit it the same way as an enum constant - it shows the labels. Maybe that is why I thought you could just wire it directly to a case structure.

 

Thanks.

=====================
LabVIEW 2012


0 Kudos
Message 5 of 5
(3,457 Views)