LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DaqMX Channel Constants as something like a Menu Ring

Say I initialise my code with Y Mirror as the first resource and Z mirror as the second. Later in my code I want to set upper and lower limits on inputs as I have done in the intialisation stage. I can extract these values using property nodes, but I need to pass channel name to it. If this channel were to change in a later design I would have to change this constant as well as the constant at the beginging of the intitalisation stage. 

 

I have a pinout table that I use and I would like it so that in my code you're inputting plain english instead of channel names, that is all. Programmatically there should be a way of telling my code in the same style as an enumerated variable, that a plain english input translates to a resource name such that if I update the resource name it will actually be  updated everywhere in the code. Ideally I want it type defined so that if I do change the pinout by adding then I won't need to change any code in the body of the program. 

0 Kudos
Message 11 of 13
(1,075 Views)

I don't want the user changing the pinout at all, but I do want a programmer to be able to update the code later. 

0 Kudos
Message 12 of 13
(1,069 Views)

So I'm not sure if you're not understanding what I mean or if I'm not getting what you want. I see your enum/channel screenshot, so I think I know what you want. The solution I'm proposing relies on your data handling within your application, not on having a million type-defined instances of your channel selection input.

I edited the Simple State Machine template to show what I mean with the front panel control. It's attached here.

 

The combo box dialog looks like this:

Combo Channels.PNG

The user sees the item options and the values are your channels. If the developer needs to change the channels in the future, he/she can just change them in this dailog and the value will get passed throughout your code as long as your code is handled well. See how the value is passed and updated in my attached code.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 13 of 13
(1,059 Views)