LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring Item Change

How can I cahnge Ring item by keyboard input

 

For example

 

Ring Initial as follow

 

Item       Value

AA              1

BB              2

CC             3

DD             4

 

when i choose "BB",then i enter "EE"

 

Ring will change to

 

Item       Value

AA              1

EE              2

CC             3

DD             4

 

but everytime I click on Ring,always show the Item List,so that i can't change the value.

 

I've try "Prompt User",but it will popout a new window,

 

Thx for your reading, and sorry for my poor english

 

0 Kudos
Message 1 of 6
(2,752 Views)

I don't know of any way to do it with a built in feature. But I think this gets your desired functionallity with a combo box...

Download All
0 Kudos
Message 2 of 6
(2,732 Views)

You can easily do that by using the "Strings" property of the Ring control. Select the item you want to replace with a new Item and have the item in a String control. So you can have an update button, once it is clicked use the replace array subset primitive to replace the item with the new one.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 6
(2,722 Views)

 

Thx for

 

 

 

 

 

 

 

0 Kudos
Message 4 of 6
(2,709 Views)

The ring controls have a U16 data type. They're generally meant to index a list of real world things, so that you can select array entries using a term that a person would understand as opposed to a number. They work great in state machines to name the different states. Of course they have many properties and can be modified at run time so end up being more flexible than this. The combo box has string data type. Internally they work on key, value pairs that you can access through property nodes. So they are more like a dictionary. They can have a list of pre-defined strings which the user can choose from, but the user can also enter an out of range string. You can leverage this feature to create the control I think you're trying to create, where the pre-defined list can be easily edited by the user, but the user can't enter out of bounds values.

 

This would make a great X-control which had U16 data type to look like a ring, but have the behaviour you desire!

0 Kudos
Message 5 of 6
(2,677 Views)

@GabeG wrote:

The ring controls have a U16 data type. They're generally meant to index a list of real world things, so that you can select array entries using a term that a person would understand as opposed to a number


Not necessarilly. Ring control can have different data type even DBL and also you can set any value to a selection. If you haven't created the Ring control/Indicator don't use it straightaway without knowing the values of the list, since it may not be sequential.

 


@GabeG wrote:

They work great in state machines to name the different states. 


Actually Enumerated data type is generally used in State machines.

 

 

-----

The best solution is the one you find it by yourself
Message 6 of 6
(2,668 Views)