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

string clear

Hi, I am trying to clear up the string by clicking a button.

 

I attached a picture of the block diagram within this posting.

 

as you guys can see, I want to clear "read string" and "string to write", which are in the case structure. 

 

However, though I click the button, the string doesn't go off. 

 

Please help me out of this problem.  

 

 

labview.JPG

Message Edited by SuperstaR on 06-15-2010 06:19 PM
Message Edited by SuperstaR on 06-15-2010 06:21 PM
0 项奖励
1 条消息(共 15 条)
4,126 次查看

Hmm...  it works for me.  You do know that as soon as you clear the Read string, the serial read will populate it again.  So it will appear to not clear.  However, the write string should clear just fine.

 

Also, if the code is in the delay sequence, the strings will not clear until the delay is over because the code will not read your buttons until the delay is done.

 

Message Edited by tbob on 06-15-2010 05:23 PM
- tbob

Inventor of the WORM Global
0 项奖励
2 条消息(共 15 条)
4,114 次查看
Thank you for replying. but clearing "string to write" is still not working. Do you have any other suggestion?
0 项奖励
3 条消息(共 15 条)
4,101 次查看
Please post your VI.  I can't see any reason from your screenshot that the String to Write wouldn't clear.
0 项奖励
4 条消息(共 15 条)
4,098 次查看

Attach your entire vi and any subvi's that it calls.  I see nothing wrong with your picture.

 

- tbob

Inventor of the WORM Global
0 项奖励
5 条消息(共 15 条)
4,097 次查看
0 项奖励
6 条消息(共 15 条)
4,079 次查看

It works just fine for me.

 

If you are still having problems, try running your VI with highlight execution turned on to see how it is executing.  Maybe put a Beep VI inside that case structure so you can hear that the case is executing.

Message Edited by Ravens Fan on 06-15-2010 11:18 PM
0 项奖励
7 条消息(共 15 条)
4,069 次查看
mamake sure that you don't have some defualt value for this string.
0 项奖励
8 条消息(共 15 条)
4,043 次查看

JTAG wrote:
mamake sure that you don't have some defualt value for this string.

 

How would that cause a string not to clear?
0 项奖励
9 条消息(共 15 条)
4,013 次查看

Perhaps that's the problem: Your buttons have switching behaviour and your cases are wired to be executed on button press (true) so clearing the strings only works when pressing a button, not when releasing it! I'd suggest to use latching buttons and an event structure.

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