11-14-2013 02:52 PM
I'm attempting to have a sub VI 'pop up' its front panel so the User can input data into this window (since I need to make the text customizable and 'prompt user for input' doesn't offer that functionality. The issue I'm running into is boolean inputs interact correctly, but string inputs cannot be focused/clicked on/typed into. I can get the insertion point in the string input. I can't copy data data into them either. My only option is to ignore this input.
11-14-2013 03:08 PM
@Valarauca wrote:
I'm attempting to have a sub VI 'pop up' its front panel so the User can input data into this window (since I need to make the text customizable and 'prompt user for input' doesn't offer that functionality. The issue I'm running into is boolean inputs interact correctly, but string inputs cannot be focused/clicked on/typed into. I can get the insertion point in the string input. I can't copy data data into them either. My only option is to ignore this input.
Are you talking about string controls? You can put a "starter" into a string control by creating a local variable outside your loop (you're gong to need a loop in order to manually put anything anywhere) and wire a constant to it with your starter string.
If this isn't what you mean, maybe try again to describe it.
Cameron
11-14-2013 05:52 PM
(I'm going to attempt to answer your question by describing what it does, hopefully should give you a better answer).
The master application calls this subVI in a loop (concerning a group of measurements). These then enter a for loop, where this subVI (I'm having problem with) exists.
The SubVI is basically a while loop. It take a string argument (and error in). Updates the front panel (via properity node) (this is what the string arguement is used for).
The subVI is running in such a way that dispite its 'inline call' (I guess), it still accepts some front panel inputs (which have 2 boolean, and a string). The Front Panel still appears.
Both boolean work, If I click them their value changes in the log (and one is to click okay and close the while loop/let the subVI finish running). But I literally cannot interact with the string input (the non argument, it is hidden).
11-15-2013 06:45 AM
I'm still completely lost. It would help a lot if you can post some code.
11-15-2013 07:22 AM
11-15-2013 07:42 AM
This is the SubVI in question. It is called by another VI (in a loop). When the parent VI executes you see this SubVI's front panel, the goal being you can interact and give customized input.
11-15-2013 07:55 AM
Well, now I'm confused. Where specifically do you want to enable user input? And, in order to preclude the obvious second request, submit an example of your whole VI (including the subVI), so we don't give a solution which becomes irrelevant in the larger scope. Please indicate which controls/indicators are to accept user input and which are just programmatically filled.
Cameron
11-15-2013 08:00 AM - edited 11-15-2013 08:01 AM
You have what we have affectionately called a "greedy loop". It is that While loop that does nothing but read the button and string control with nothing to slow it down (ie waits). This will hammer your CPU, not letting other functions work. It is quite possible that this loop is keeping your string from being allowed to update.
Instead, use an Event Structure with just a case for the button's value change. That will use no CPU and will just wait until you hit the OK button. Oh, and replace your button with an actual OK Button.
11-15-2013 08:22 AM
Thank you 🙂
11-15-2013 08:59 AM
You've discovered a strange behavior of the String control. Apparently you can't have it configured to limit to a single line and to show the horizontal scroll bar. Turn of the scroll bar and Bob will be your uncle.