From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-15-2013 10:46 PM
Hello,
I have the following problem: I have a cluster in a VI and I wish that when I select a unit in a combobox, this unit appear in "caption.text" on each controller type string present in this cluster.
Once it has many controls, I did a subVI that receives the cluster, change its captions and then returns another cluster.
However, it is only returning the values, not the "new captions". Then I thought about having as output a "reference" for the cluster ... But having this output, how could I do the other cluster SubVI receive it?
Thanks
10-15-2013 10:52 PM
It's hard to figure out what you are doing because you only posted one VI. I don't see where the subVI fits into this. Is this the subVI or the main VI?
Note: Since the 3 cases of the case structure are nearly identical, all the identical code should be outside the case structure and the only thing inside the cases are the parts that are actually different.
10-15-2013 11:04 PM
This is the SubVI,
In the VI, I choose that control (mm, degree or step) in a combobox, than I want to change the captions in the cluster's controls in the VI (a cluster identical that in the SubVI).
Yes, all the cases are identicals so far. Actually, I intend to change the "Step" case, because if I choose "Step", I want some controls.visible = false. Thanks.
I guess I can do it without the SubVI, but it would be giant. So, what I want is something that changes all the captions in my cluster with just one block (this subVI)
10-15-2013 11:30 PM
You need to pass the reference of the cluster from the main VI into this subVI, not try to pass it out.
Change your cluster reference on the front panel from an indicator to a control.
Now hook up a property node to that reference control, and set it for the Controls[] property. This will give an array of references to all the controls that make up the array. Index that array and wire each of those references to the property node instead of the reference constants you have now.
You can actually get rid of the control and indicator of the cluster that exists in the subVI. You don't need it, it doesn't do you any good, and is just confusing you now.
10-16-2013 03:06 AM
You just want to change the caption of the control, right?
So you don't need the output in sub vi, all you need to do is to pass the control reference to sub vi, and use property node to change the text of controller caption.
Once you change the caption in sub vi by property node, it will update in you main UI.
Hope can help you.
BR
Vincent
10-16-2013 06:55 AM - edited 10-16-2013 07:04 AM
Thanks, I guess I undesrtood the idea.
There was also a red point in the SubVI block, I correct that... But its not working yet, what's wrong?
10-16-2013 08:37 AM
What is the error from "error out"?
10-16-2013 08:41 AM
You need to provide some detail as to what way it is not working.
Note: You only need one index array function. You can drag the bottom boundary downwards to get more outputs. By default, without wiring anything to the index inputs, you'll get elements 0, 1, 2, 3, .....
The coercion dot means that the data type of the reference being passed into the subVI doesn't match the data type of the reference inside the subVI. One you have the cluster created, make it a typedef. Then use a copy of that in the main VI and subVI and create your references from that typedef.