取消
显示结果 
搜索替代 
您的意思是: 

Updating a combo box input

Hello. I am creating a VI that reads / writes an EEPROM using the USB-8451. I have a VI written that allows me to read and write but what I would also like to do is update my inputs based on what is read from the EEPROM. For example, I have a combo box from which I select from several options and then write the corresponding value to the EEPROM. I would like to also be able to read from the EEPROM and have this combo box updated to whatever was read. Could someone explain how to accomplish this?

0 项奖励
1 条消息(共 7 条)
3,827 次查看

Example_VI.png

to update a combo box at run time simply use a property node to write StringsAndValues


"Should be" isn't "Is" -Jay
0 项奖励
2 条消息(共 7 条)
3,821 次查看

Or if the values match the strings (default), just use the Strings[] property.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
3 条消息(共 7 条)
3,811 次查看

Thank you both. I am a labview beginner, so I think I have done a poor job of explaining this. I think I understand what you are saying but its not what I am looking to do. I have attached a stripped down example of my VI. Currently, a user can select a value from the combo box (Identifier) on the second tab of the interface and then by selecting (Start Write) on the first tab, write that value to an EEPROM. I would also like to be able to select (Start Read Full EEPROM and Update Tables) and read an EEPROM value and then update the combo box based on this value (indicator labeled element). Is it possible to have a combo box that can be used as both an input and an output?

0 项奖励
4 条消息(共 7 条)
3,798 次查看

That isn't a combo box.  It is a menu ring.  A combo box is string while a ring's data is a number (in your situation, a U8).

 

If you are not updating the strings for the ring, then you just want to set its value?  Use a local variable.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
5 条消息(共 7 条)
3,784 次查看

 Thank you crossrulz. Yes, I have several types of boxes in the actual VI but this particular example is using a ring. I have cleaned up the example a bit and reattached it. Could someone explain or possibly even show me how to wire this up so that the ring menu will update and display the corresponding value that is read from the EEPROM after selecting the "Start Read Full EEPROM and Update Tables" button. I understand how to create a local variable from the output named 'element' but not sure how to make this variable update the menu ring and display the value read on the front panel. Thank you.

0 项奖励
6 条消息(共 7 条)
3,775 次查看

Its not going to work like that.

 

a ring must have unique values (no duplicates)

 

What you seem to be looking for is a "Current Values Table" and there are many examples of a CVT implementation.  NI has a rather nice one over here 

 

It has more features than you really need for a simple application but, it is the right price 


"Should be" isn't "Is" -Jay
0 项奖励
7 条消息(共 7 条)
3,762 次查看