LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset a table.

if i wire false it stay in the first row and just keep over writting the data.
0 Kudos
Message 11 of 22
(1,730 Views)
i mean true
0 Kudos
Message 12 of 22
(1,727 Views)
What i just wrote was kind of confusing. if i wire true to reset it will only store data in the first row and just over write itself. i dont want this i want to see all the data.
0 Kudos
Message 13 of 22
(1,722 Views)
Yes, the way you have it set up is not what you really want. You should not call the table express VI every iteration of the loop. You should create an array inside the loop and send that to the table which should be outside the loop.
0 Kudos
Message 14 of 22
(1,715 Views)
And you have created a wonderfull race condition.
The reset table and the while loop will process in a unknown order!!!!
Take the time to get the functions you use to know

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 15 of 22
(1,685 Views)

Like so:

Yes, there is a race condition in there that I did not address. However, you don't even need that reset table anymore, this will work without it.

Message Edited by Marc A on 12-06-2006 04:37 PM

0 Kudos
Message 16 of 22
(1,681 Views)
well it should reset the table first since its the first thing it will encounter. i always run the error line through the program so it knows what order to run things. im sorry next time i will spend more than 2min creating one just for you ton. Smiley Very Happy

Message Edited by jabu on 12-06-2006 03:41 PM

0 Kudos
Message 17 of 22
(1,678 Views)
No, it's not necessarily the first thing it will encounter. That's why it's a race condition. In this case it won't be a problem because the loop and call to build table will take more time than you setting the table to an empty array. However, this is not good programming. You are never 100% garaunteed that one thing will run before another if they are side by side like that on a block diagram.
0 Kudos
Message 18 of 22
(1,670 Views)
like i said before everyone bashes me. I KNOW. gezz.
0 Kudos
Message 19 of 22
(1,668 Views)

No one is bashing you. I'm trying to help you. I just wanted you to understand why that is a race condition and can give you inconsistent results. In this case, theoretically the while loop could finish first and set the table to the values 1 to 100. Then it could be reset to a blank table. This is unlikely, but it is quite possible.

Did you get it to work?

0 Kudos
Message 20 of 22
(1,631 Views)