取消
显示结果 
搜索替代 
您的意思是: 

How to clear up a string control afer input

Hi folks,极度高兴的表情
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 项奖励
1 条消息(共 15 条)
10,988 次查看

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 项奖励
2 条消息(共 15 条)
10,977 次查看
First of all: thanks for your reply 极度高兴的表情

I not able the say: i know what you mean. There is a big questionmark in my mind. 眨眼表情

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
极度高兴的表情



0 项奖励
3 条消息(共 15 条)
10,947 次查看


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.
4 条消息(共 15 条)
10,944 次查看

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 项奖励
5 条消息(共 15 条)
10,924 次查看
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 项奖励
6 条消息(共 15 条)
10,907 次查看
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 项奖励
7 条消息(共 15 条)
10,888 次查看
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.
8 条消息(共 15 条)
10,882 次查看
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.

 

9 条消息(共 15 条)
10,873 次查看

Hi "altenbach".

Thanks for your competent answer.

It seems that I have a lot to learn.
This separates the rookies from the veterans! 吃惊表情
I hope I can use your modification further....
... without any charge?!眨眼表情

greetings and a HAPPY NEW YEAR

Thomas

 

0 项奖励
10 条消息(共 15 条)
10,846 次查看