LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String Input Non-Interactive

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.

0 Kudos
Message 1 of 11
(3,415 Views)

@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

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 11
(3,412 Views)

(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).

0 Kudos
Message 3 of 11
(3,386 Views)

I'm still completely lost.  It would help a lot if you can post some code.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(3,357 Views)

I had a colleague with a problem that sounds like yours.  What he thought was a String control was actually an indicator.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 11
(3,347 Views)

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.

0 Kudos
Message 6 of 11
(3,342 Views)

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

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 7 of 11
(3,337 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 11
(3,332 Views)

Thank you 🙂

0 Kudos
Message 9 of 11
(3,326 Views)

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.

 

FunkyControl.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 10 of 11
(3,317 Views)