cancel
Showing results for 
Search instead for 
Did you mean: 

string clear

kunmok
Member

string clear

Message contains an image Message contains an attachment

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
14 REPLIES 14
tbob
Trusted Enthusiast

Re: string clear

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
kunmok
Member

Re: string clear

Thank you for replying. but clearing "string to write" is still not working. Do you have any other suggestion?
RavensFan
Knight of NI

Re: string clear

Please post your VI.  I can't see any reason from your screenshot that the String to Write wouldn't clear.
tbob
Trusted Enthusiast

Re: string clear

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

 

- tbob

Inventor of the WORM Global
kunmok
Member

Re: string clear

Message contains an attachment
Here is my VI file
RavensFan
Knight of NI

Re: string clear

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
JTAG
Member

Re: string clear

mamake sure that you don't have some defualt value for this string.
RavensFan
Knight of NI

Re: string clear


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

 

How would that cause a string not to clear?
candidus
Member

Re: string clear

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.