Discussion:
How to clear up a string control afer input
(too old to reply)
Pnt
2007-12-27 17:40:09 UTC
Permalink
You can connect the control to an input terminal, or
just write an emty string to the control, at the start of the vi
ThoFu69
2007-12-28 17:40:07 UTC
Permalink
First of all: thanks for your reply :smileyvery-happy:
I not able the say: i know what you mean. There is a big questionmark in my mind. :smileywink:The string control is an input control and what is an input terminal, i didnt find an input terminal in the controls palette and not in the functions palette.How can i see the LabVIEW code in C++, maybe there is a way to solve the problem on the C++-way.Thomas:smileyvery-happy:
altenbach
2007-12-28 18:10:05 UTC
Permalink
ThoFu69 wrote:The string control is an input control and what is an input terminal, i didnt find an input terminal in the controls palette and not in the functions palette.How can i see the LabVIEW code in C++, maybe there is a way to solve the problem on the C++-way.


You already have a terminal, so all you need ot to write an empty string to it whenever it is read, e.g. via a local variable of it. Are you using an event structure?
 
It seems you have some misconceptions about LabVIEW. There is no C++ code behind LabVIEW, the code is graphical.
It would help if you could attach a simple version of your code so we can better see what is going on.
Pnt
2007-12-29 09:10:04 UTC
Permalink
ThoFu69  wrote "what is an input terminal"
right click icon and select "show connector". As you already have an output terminal, i think it is easy to connect an input terminal.
The more simple way is to write an emty string to the control, at the start of the vi with a local variable.


21.jpg:
Loading Image...
altenbach
2007-12-30 19:10:04 UTC
Permalink
OK, here are a few comments to your program.
 
Front panel
 
First of all, the user interface is too complicated. You should pattern it according to standard password dialogs containing just a password field and a cancel button and not much else.
Since you allow closing the window with the [X] in the opper right corner, you don't need the "Abbrechen" button, just create an event for "panel close?" for this function.
 
Code

- Your loop has no wait statement and thus will spin millions of times per second consuming all CPU while not really doing anything except polling the controls.

- This will starve all other processes for resources and thus can hurt performance.

- Place a small wait (e.g. 100ms) in the loop or better yet, use an event structure. Place an indicator on the iteration terminal to see the difference! :)

- The two buttons have a very unusual mechanical action (Switch until released), which is meaningless in this context. Use e.g. a "latch when released" mechanical action, which sets them true until the new value is read by the code.

- Just reset the password field to blank when the loop ends.

Here's a quick draft that shows some of the possibilities.
Another possibility to clear the password field would be to assign it to an input connector and then wire an empty string when calling it.
 


Passwort13MOD.vi:
http://forums.ni.com/attachments/ni/170/292425/1/Passwort13MOD.vi
ThoFu69
2008-01-01 13:10:04 UTC
Permalink
Hi
"altenbach".

Thanks for your competent answer.

It seems that I have a lot to learn.
This separates the rookies from the veterans! :smileysurprised:
I hope I can use your modification further....
.. without any charge?!:smileywink:

greetings and a HAPPY NEW YEAR

Thomas


 

Loading...