07-15-2013 02:18 PM
Hi,
I am having trouble resetting the values of table, once I hit the clear button it clears the values but when I acquire again it remembers older values. But if I re-run the VI then table is reset and older values are not remembered. Can anyone help me how to clear values from table, so that after clearing the table and loading new values it does not remember older values. I am attaching the vi with this post. Please take a look at it.
Solved! Go to Solution.
07-15-2013 02:39 PM
First make sure you save an empty table as default
Then use the invoke node "Reinitalize To Default" whenever you want to clear the table.
07-15-2013 02:47 PM
You forgot to include the state control (enum typedef).
Well made these three changes and you're good to go:
1.
Disable this code, as resetting (connecting TRUE constant) a new 'Build Table' express VI has nothing to do with the other 'Build Table' express VI placed in 'acquire' state.
2.
Set next state as 'acquire', and make following change (point#3).
3.
07-15-2013 02:51 PM
So the point is...
'Build Table' express VI keeps the data in its buffer (uninitialized shift register implemented inside the express VI)... Now everytime when you add data, this express VI actually keeps on appending it to existing data...!!
Now in order to clear the data, one must input a TRUE boolean to this express VI's 'Reset' terminal and that's it.
07-16-2013 08:58 AM
how do you save an empty table as default ?
07-16-2013 09:08 AM
In two steps:
1. Right click the Table (on Front Panel) and select 'Empty Table'.
2. Right click the Table (on Front Panel) and select 'Make this Default'.
07-16-2013 09:11 AM
Right click on the empty table ---->Data Operations ----->Make Current Value Default
07-16-2013 01:14 PM
It is still not working, please take a look a the vi I am attaching. May be I am doing something wrong.
07-16-2013 01:17 PM
I applied the changes but I wanted to clear the table when I press clear. In this case when I press clear, it clears the table and also acquire one value which i do not want.
07-16-2013 01:25 PM
Have you seen this particular reply of your post, follow it and it will solve the issue.
There is scope to make your VI efficient, by removing unnecessary code.