bekrul Posted February 9, 2005 Report Share Posted February 9, 2005 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 Quote Link to comment
Mike C Posted February 10, 2005 Report Share Posted February 10, 2005 You can wire the output of the ring (or enum) to a case structure. From there you can output whatever value (or string) you want. I hope the example below helps. MikeC Download File:post-283-1108006120.vi Quote Link to comment
Michael Aivaliotis Posted February 10, 2005 Report Share Posted February 10, 2005 You can wire the output of the ring (or enum) to a case structure. From there you can output whatever value (or string) you want. I hope the example below helps.MikeC 3848[/snapback] This is a good solution. Another option is to take the output of the ring and use that to index an array of numbers that you want. Quote Link to comment
didierj Posted February 10, 2005 Report Share Posted February 10, 2005 This is a good solution. Another option is to take the output of the ring and use that to index an array of numbers that you want. 3849[/snapback] 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 Quote Link to comment
bekrul Posted February 10, 2005 Author Report Share Posted February 10, 2005 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 LV7Here 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 Quote Link to comment
Mark Balla Posted February 11, 2005 Report Share Posted February 11, 2005 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.