05-13-2008 06:20 AM
05-13-2008 06:36 AM
05-13-2008 06:44 AM
05-13-2008 07:13 AM
Or you can use local variables, if the wires are far... (they are not always bad.)
Iit depends of your program's style.
05-13-2008 07:15 AM - edited 05-13-2008 07:19 AM
Using Local Variables "if the wires are far" is not always a good suggestion, since Local's are prone to race conditions.
As for programming styles, people should adopt what NI proposes. And using the wires (direct wiring) is always the better approach.
The code should be structured in such a way that it is never far between objects wired together.
RayR
05-13-2008 07:40 AM - edited 05-13-2008 07:42 AM

05-13-2008 07:54 AM
05-13-2008 07:54 AM
05-13-2008 08:41 AM
I would have given Gerd 20 stars if I could. Listyen to his advice, it is good.
Why are you using Local Variables? Don't tell me that they are the same as the indicators coming out of the two sub-vi's!!
05-13-2008 08:57 AM
Mathan,
I have to agree with Ray and Gerd about the use of local variables. In this code

"...Result" and "....Result 2" will probably be read BEFORE the results of Doctor and Patient complete. Wires are always prefered over locals etc.
I play a game while developing where I win if I don't use any locals. Try it, your code will benefit.
Trying to help,
Ben