LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem using invoke node

I have some tables on the front panel that I use to display my data results.
I use an invoke node to initialize them (so that results boxes are filled
with X's), but sometimes when I rerun the program old data gets back in.
What happens is if I run one test item, then when the program finishes I
click that test item off and click on the next item it is supposed to remove
the previous results so that the display is fresh for the new run. It does
do that at first, but in a subsequent sequence I take the table and new
results and stuff the new results into the table. Somehow the old results
table is passed to the subvi that does the stuffing. It does not do this
all the time, but it should not have a race condition because the

initialization and stuffing are separated by sequence. I am using generic
vi server class (generic/go object/control/control) because I only want to
initialize the display tables, not everything. Is this bugged or am I doing
something wrong? Maybe I should just use another way to initialize, but it
seemed like an elegant way to do it.
0 Kudos
Message 1 of 2
(2,545 Views)
Using sequences doesn't remove the possibility of having race conditions. It's more a matter of how you pass the data between the different segments of your code. First thing is to NEVER use globals or locals to pass dynamic data between different parts of your code. Second, use dataflow to establish the proper execution of the program, not artificial structures such as sequences--which you should never have to use anyway. I know this message is kind of old, but if you are still having trouble I'd be glad to check out your code as this type of error is almost always a race condition.

Mike...
mporter@arielcorp.com

"...after all He's not a tame lion..."

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 2
(2,545 Views)