LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List Box Help needed

I am new with listbox and dont know much about it. I am trying to write a program where 4 paths are there and selecting one of them, outputs that path to a path indicator. For this I kept the 4 paths inside a cluster and given it to a listbox. From listbox to a path indicator. So when I run the 4 paths are entered as strings in listbox and what Iam trying to do is when I click on one of the paths, that path should ouput to the path indicator, I have done something for that but it is not working. I have attached the program with this. I dont know very much about listbox. I know extremely little about listbox. Could someone help me by telling me what is wrong with my code and also giúide me in the proper direction on how to do this. Thanking You.

 

 

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

Hello vindsan,

 

for a first sight on the mode of operation of your vi i recommend to switch on the hihlighted execution (little bulb in the toolbar in your block diagram window). Then you will see, that your vi almost does, what you want it to.

Some further hints:

  • you have to doubleclick on the item in your listbox (probably you know that, but you didn't mention)
  • with every loop you feed the paths from the cluster to the listbox, but you only have to do it once (outside the while loop)
  • perhaps it's better, to store the four paths in an 1D-array of paths, then it's very easy to increase the list of paths
  • the loop works without sleep- time (use the wait (ms)- node from the timing palette). This releases the processor
  • what your vi does is called polling, the better way is to use the event structure

 

Greets, Dave
Message 2 of 6
(2,969 Views)

HI vindsan,

 

You were'nt far. I just change a few things. The best way of handeling user event, is to use an event structure into your while loop. Also i choose double click as event but you can change it if you want.

 

Good luck

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
Message 3 of 6
(2,968 Views)

Thanks a lot Dave and Sabri. I was able to correct my mistake. But Sabri I would like to view the modified version u have done. But the problem is u did it in labview version 15 and I have labview version 11. So I cant open it. Is there any way I can open it. Thank you very much for your help.

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

Done for LV 2011. But ain't test it. You should upgrade, development is a lot easier with the new versions.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 5 of 6
(2,931 Views)

Got it. Thanks a lot.

0 Kudos
Message 6 of 6
(2,917 Views)