LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect items in one enum to other in the same VI

Solved!
Go to solution

Hello,

I found a VI  written by someone for one of the measurement instruments in my lab. In the front panel of the VI when I select an item in one enum, corresponding items are displayed in the second and third enums. If I choose a different item in the first enum, I get different items in the second and third eums. I think they are interconnected somehow. But I don't see any additional functions in the control panel. Any leads will be appreciable. 

 

Thank you in advance.

0 Kudos
Message 1 of 9
(1,482 Views)

Hi,

Could you please attach your code , to better understand your question , and to help you solve your issues.

Best Regards

Message 2 of 9
(1,465 Views)
Solution
Accepted by topic author Tesa1710

Well, if you look at the diagram, you can probably see how things are "connected" 😄 . Do you have the source code or just a built executable?

 

Since the items of an enum are fixed at runtime, it is very likely that at least the second and third are not enums, but rings (Do you know the difference?) Can you verify that? You can write the items (and corresponding values) of rings via property nodes (examples).

Message 3 of 9
(1,440 Views)
Solution
Accepted by topic author Tesa1710

Thanks a lot for your reply. The problem is solved. I found this piece of code in the VI that I mentioned before. Now I understood how the items are linked together. Since this is a part of a large VI, I did not notice it initially. test.PNG

0 Kudos
Message 4 of 9
(1,400 Views)

@Tesa1710 wrote:

Thanks a lot for your reply. The problem is solved. I found this piece of code in the VI that I mentioned before. Now I understood how the items are linked together. Since this is a part of a large VI, I did not notice it initially. test.PNG


Glad you solved it. Of course it is not clear at all why you think you need to read from a value property node instead of the terminal. It is also not clear why you have all these loose cluster scalars (herding cats!) instead of a 1D array (of clusters) constant. You could probably even get rid of the case structure and simply index into a ragged 2D array of clusters. Easier to maintain!

 

Can you attach this part of the code in a simple VI?

0 Kudos
Message 5 of 9
(1,393 Views)
Solution
Accepted by topic author Tesa1710

@altenbach wrote:

You could probably even get rid of the case structure and simply index into a ragged 2D array of clusters.

Here's how that could look like:

 

(A ragged 2D array can be implemented as a 1D array of clusters, each containing an array of clusters in this case. Alternatively, you could even use a map constant)

 

altenbach_0-1653321519986.png

 

Message 6 of 9
(1,384 Views)

Thanks for your reply. Please find the attachment.

0 Kudos
Message 7 of 9
(1,344 Views)

Sorry, cannot open LabVIEW 2021. Consider "save for previous".

0 Kudos
Message 8 of 9
(1,324 Views)
0 Kudos
Message 9 of 9
(1,309 Views)