08-28-2007 06:00 AM
Hi I was wondering if I could get some advice (I am new to labview). I have the task of rewriting a piece of software from work into labview from c++. In this program a list of 20 numbers is generated by the program and displayed as a list. Then the user selects which number to use for this list using a mouse click. The problem I am having is trying to work out if I should be using a list or an array and if it should be an indicator or a control?
thanks
08-28-2007 06:21 AM
For selecting with a mouse click, you will basically have to make it a control, since an indicator can not accept user input (you can do it with an indicator, but you would have to write the code yourself and there's no point to that, since a control will do what you want).
The control closest to what you describe is the listbox, with its properties set to allow a selection of 1 item. You can populate it by createing a property node for it (right click on the control or the terminal and select Create>>Property Node) and using the Item Names property. You can monitor value changes by using the event structure.
Other controls you can use include rings and combo boxes, but they have slightly different behavior.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
08-28-2007 06:46 AM