Jump to content

enum or ring control with arbitrary numeric values


bekrul

Recommended Posts

Hi,

I want to set up a control where the user selects a string/text and an associated numeric value is passed along, however, i want to choose the numeric values to be something other then 0, 1, 2, etc.

for example, something like...

modeA (0)

modeB (4)

modeC (9)

It sounds like ring controls are the way to do this, however, i'm using labview version 6.1. i've been unable to figure out how to do this, and ive spent a fair amount of time reading the manuals and fooling around trying to figure this out.

thanks,

ben

Link to comment
There is a topic on how to create an arbitrary text-ring in the NI knowledge base. Unfortunately one would need CVI. There is no other way to have it directly in LV6.1. They appeared in LV7

Here the link:

Arbitrary text-ring

Didier

3850[/snapback]

Thanks for the ideas everyone, I'd actually already been using the array indexing method that Michael suggested, i was just hoping to find a better solution. I'm writing VI's that interface to a DLL, and wanted to have the constants that users use in Labview to be the same values as the constants used by the DLL.

However, I dont have CVI setup so i think i'll just have to leave it as it is, and document the differences.

ben

Link to comment

Another option that I use a lot is to put all the information in the item name separated by delimiters.

Then write a simple vi to parse out the information. I prefer this method to the array indexing because if I need to add to the list

I only have to update the enum and not the conversion vi.

post-584-1108086429.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.