LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need a custom control just like the "DAQ Channel Name" control found on the I/O palete but I want to be able to populate the selection list my self.

I need to have the same functionality as the "DAQ Channel Name" control but I want to be able to populate the selection list my self.

Basically a ring control with the capability to enter text directly with the mouse.

Any ideas?
0 Kudos
Message 1 of 12
(3,505 Views)
right-click on the "DAQ Channel Name" and the second option from the bottom should be,

Allow Undefined Names.

Select that option and you are off and running.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 12
(3,505 Views)
Thanks for your answer but your solution will not allow me to populate the selection list as I had asked in my question.

I need to be able to populate the control with my own values just like you do a Ring or Enum control. It's output value should be an index of an array or the selected string itself.

Atwork
0 Kudos
Message 3 of 12
(3,505 Views)
Use a ring control. Create a property node and select the Strings[] property. Wire to this an array of strings. This will programmatically update the text displayed in the ring. The output value returned from the ring is an integer and corresponds to the index element of the Strings[] array.
0 Kudos
Message 4 of 12
(3,505 Views)
Thanks for responding. Unfortunately this is not what I am looking for.
0 Kudos
Message 5 of 12
(3,505 Views)
Can you describe what you mean by "the capability to enter text directly with the mouse" ? It looked to me that ebarker's answer would work. Peharps you could describe it differently?
Tim
0 Kudos
Message 6 of 12
(3,505 Views)
I guess this could be explained like this. A RING control and a STRING control. Now, we know the functionality of a RING control in that we can populate it by using an array of strings by using a property node. The problem with a RING control is that it will not allow the USER to enter "Undefined TEXT" to it. And ofcourse, a STRING control allows you to type in values directly into it, no selection involved. So now imagine a control allowing you to do both, select a value from a list or type a value. On my original question I mentioned the "DAQ Channel Name" control because it allows you to do just that, except that it uses MAX to populate it's list and I can't populate the list programmatically my self.
I hope I've explained it well.
0 Kudos
Message 7 of 12
(3,505 Views)
Gotcha, I don't think that's possible without a work around. I've done something similar in the past where I made the last selection in the ring a choice called "Add new item to list . . .". When the user selects this, I pop up a dialog with a string control to enter his new item in text. I insert this string into the next to last spot in the "items" array and update the ring control using a property node.

It's not exactly what you want, but it might functionally satisfy your requirements. If this it confusing I can try to pull out some example code.

Good luck,
Tim
0 Kudos
Message 8 of 12
(3,505 Views)
That's a good work around and I might use it if none else work. I also have an idea that I might use if it works and that is to use two controls, a "[CLASSIC]Simple String" and a "[CLASSIC] Dialog Ring" together might work by applying a little logic and modifying the size and look of the controls.

Wouldn't it be nice if the Control Editor would allow you to combine controls and their functionality or if we could define the functionality? Maybe Im asking for too much. Thanks
0 Kudos
Message 9 of 12
(3,505 Views)
I wouldn't say it's asking too much. I'm quite sure that we're not the only 2 people who've wanted this ability.
0 Kudos
Message 10 of 12
(3,505 Views)