05-22-2022 01:39 AM
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.
Solved! Go to Solution.
05-22-2022 03:00 AM
Hi,
Could you please attach your code , to better understand your question , and to help you solve your issues.
Best Regards
05-22-2022 05:52 PM - edited 05-22-2022 05:54 PM
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).
05-23-2022 10:38 AM
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.
05-23-2022 10:46 AM
@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.
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?
05-23-2022 11:01 AM
@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)
05-24-2022 02:15 AM
Thanks for your reply. Please find the attachment.
05-24-2022 08:42 AM
Sorry, cannot open LabVIEW 2021. Consider "save for previous".
05-25-2022 02:38 AM
VI version 20.0