LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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 Kudos
Message 1 of 15
(3,699 Views)

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 Kudos
Message 2 of 15
(3,687 Views)
Thank you for replying. but clearing "string to write" is still not working. Do you have any other suggestion?
0 Kudos
Message 3 of 15
(3,674 Views)
Please post your VI.  I can't see any reason from your screenshot that the String to Write wouldn't clear.
0 Kudos
Message 4 of 15
(3,671 Views)

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 Kudos
Message 5 of 15
(3,670 Views)
0 Kudos
Message 6 of 15
(3,652 Views)

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 Kudos
Message 7 of 15
(3,642 Views)
mamake sure that you don't have some defualt value for this string.
0 Kudos
Message 8 of 15
(3,616 Views)

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 Kudos
Message 9 of 15
(3,586 Views)

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 Kudos
Message 10 of 15
(3,578 Views)