LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear up a string control afer input

Hi folks,Smiley Very Happy
i wrote a password controled reset impuls.

The program will work once
but if you use it twice the password
is still in the string-control, so you just have to click on rest.

Did anybody have an idea to clear up the string control, or to solve the password problem a different way

greetings

Thomas


0 Kudos
Message 1 of 15
(9,191 Views)

You can connect the control to an input terminal, or

just write an emty string to the control, at the start of the vi

0 Kudos
Message 2 of 15
(9,180 Views)
First of all: thanks for your reply Smiley Very Happy

I not able the say: i know what you mean. There is a big questionmark in my mind. Smiley Wink

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
Smiley Very Happy



0 Kudos
Message 3 of 15
(9,150 Views)


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.
Message 4 of 15
(9,147 Views)

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.

0 Kudos
Message 5 of 15
(9,127 Views)
In addition to the good comments you have received already, there is also a VI method (called Reinitialize All to Default) that will reset all controls and indicators on a VI's front panel to their default values in one shot.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 15
(9,110 Views)
Thanks for your serious answer Mike.
But it's not possible to select the reinitialize function on every start.
i´ve to select it by hand.
is it possible to reinitialize all values on every start?

Thomas

0 Kudos
Message 7 of 15
(9,091 Views)
Yes, the function I mentioned is a method that you can execute programatically using an Invoke Node. You can find out about invoke nodes in the documentation and examples(!) that ships with LV. Also if you can take a course such as LV Basics from NI it will help your growth as a developer a lot.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 8 of 15
(9,085 Views)
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.

 

Message 9 of 15
(9,076 Views)

Hi "altenbach".

Thanks for your competent answer.

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

greetings and a HAPPY NEW YEAR

Thomas

 

0 Kudos
Message 10 of 15
(9,049 Views)