From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Developing more sophisticated enum control methods

Solved!
Go to solution

I would like to select a function name and map it to a module and channel.  For instance, it would be much better to specify "Cold Water Flow Rate" than to specify "Module 3" and "Channel 7" which have no real meaning.  How can I develop something like an enum but with immutable data with more than one dimension?  I'm thinking the best solution is to make an enum of the function names and use it as an index into an array of module and channel enums but the array is not immutable, or is it?  What other methods should I consider?

0 Kudos
Message 1 of 2
(2,165 Views)
Solution
Accepted by topic author kc64

An array is not immutable.  But is Module 3 or Channel 7 something which will never change? What if you get a new DAQ device with different channel numbering?

 

Make the array a diagram constant or read the data from a configuration file and then do not change the values in the array within the program.  Then index as you mentioned.

 

Lynn

Message 2 of 2
(2,154 Views)