LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Practice to present a choosable list of sensors

I am learning Labview on someone else's code. Right now I struggle to retrieve the clicked event of a button in an array of clusters.

Actually the first problem is, that I can't click the "select sensor" button in an array of clusters.

arrayOfClusters.PNGarrayOfClusters2.PNG

 

Afterwards I want to use the chosen clusters data. I would like to know if there is a better practice from which I should start.

Actor Framework
0 Kudos
Message 1 of 6
(1,217 Views)

You can't click them because "SensorList" is an indicator and not a control.

 

Since you're new to LabVIEW, it is recommended to go through the training materials available at the top of LabVIEW board.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 6
(1,213 Views)

Ok, I created a control and initialized it via local variable.

Now I get the desired SensorList Changed Event, when clicking "Select Sensor"

I read that I have to iterate the array of clusters in order to figure out which index actually changed. Is that strill true or is there meanwhile a more elegant way?

Actor Framework
0 Kudos
Message 3 of 6
(1,177 Views)

You can create a reference to the cluster item in the array and do a dynamic event registration for a value change of that cluster. That will return the cluster data of the edited cluster as variant data.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 6
(1,168 Views)

Can you give me further advice? I think my approach is starting wrong?

 

Do I have to iterate through the already populated array? I googled a lot but didn't find suitable examples

Actor Framework
0 Kudos
Message 5 of 6
(1,140 Views)

I found your answer here:

 

Solved: Re: How to obtain which element changed in a clusters using events? - NI Community

 

Since this answer describes the solution for only one cluster and not an array of clusters I am stuck.

Actor Framework
0 Kudos
Message 6 of 6
(1,131 Views)