08-28-2018 06:36 PM
I have a sub VI that gets called multiple times from the Main VI. Each time through the Sub-Vi, only 1 new button's value will be changed to true. I am wanting whatever button gets selected on that run through the Sub VI to be disabled and have the button text populated from a numeric field when the user presses the stop button. Using property nodes, I can successfully disable one button, but not necessarily the button that was changed to true on that time through the sub-VI. I also attempted to change the content on the button to that numeric, but got an error that this property was writable only when the VI is in edit mode.
So I am looking to:
1) Programatically link a property node to the button that was pressed according to the boolean array.
2) Disable that button and put the value of the numeric on the button for user reference the next time the sub VI is called.
Solved! Go to Solution.
08-28-2018 07:19 PM
You can't change labels at run time, but you can change captions and boolean text.
08-28-2018 07:34 PM - edited 08-28-2018 07:49 PM
Ah, Boolean text is what I wanted. Didn't know the difference between a label, a caption and Boolean text.
Can you help me with my first request:
1) Programatically link a property node to the button that was pressed according to the boolean array. As of now, whatever button is pressed, the numeric gets assigned to button 1 (because that is the button that I've linked the property node to), rather than reacting to which button was pressed.
Also, at the start of my sample VI, I have a for loop that enables all of the buttons in the cluster if it is the first time the Sub VI is run. Can you assist me with re-initializing the boolean text back to blank in that same for loop (so that it is performed on all buttons only the first time that the Sub VI is run).
08-28-2018 09:31 PM
Try this
08-29-2018 06:12 AM
@ryancam wrote:
Also, at the start of my sample VI, I have a for loop that enables all of the buttons in the cluster if it is the first time the Sub VI is run. Can you assist me with re-initializing the boolean text back to blank in that same for loop (so that it is performed on all buttons only the first time that the Sub VI is run).
1. Use the First Call function connected to a Case
2. Set the values in the True case.
3. Profit. 🙂
/Y
08-29-2018 10:16 AM
I have version 16 of Labview so I am unable to open your file. Is there any way that you can save it so that I can open it?
08-29-2018 10:22 AM
Here it is in LV2016
08-29-2018 10:35 AM
That did the trick, I just had to add a property node inside of the for loop of that first case structure to reset the boolean texts back to blank if it was the first run of the VI, but that otherwise did the trick. Thank you!