I have a series of VI's that run in parallel, each to manage different functions- pumping, sensing, a fluid flow model, an experiment generator/runner. These need to exchange data, which I am currently doing using invoke nodes (that are all in subVIs), using methods "Set control value" and "Get control value". I find that every now and then (perhaps 1% of the time) the data isn't exchanged correctly and therefore the system doesn't work. I can imagine how "set" could go wrong if they happen simultaneously, and can devise ways of preventing this. However, the "Get" method suffers from the same problem. This is a major problem, because I want to leave it running for several hours. I could in principle achieve the same thing using property nodes and find myself wondering if this might be more reliable. But I don't want to change over only to find it makes no difference! Can anyone advise?
Use functional globals, notifiers or ques. Try to avoid setting values using property nodes (even locals are better in most cases). If you ever want to build an application of your code the set control value method is not supported(!), so go for functional globals or something that is.
You can use some kind of syncronization such as queues, occurances, or notifiers but I think the easiest way would be to create and action engine. This was only one action can execute at a time avoiding a "race condition". Possibly a write action and a read action might help. You also can add queues or notifiers into this concept. hope this helps.
Hi Mads, the help of LV 6.1 states Get/Set Control Value is available in runtime. If it really does not work is the help wrong or is it a bug? Waldemar
Heey, you are right! I'm outdated:-) It did not use to be, but I just tested it in LV7 and it works fine. If it sometimes fail though, as described here...functional globals, notifiers etc. may still be a better solution.