LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A basic problem with SubVI

Kurt_come,

I think it's a pretty universal thing, regardless of the language used, that if you ask a question, you get some answers (Quite good ones in this case).

If you want to ignore people's answers, go ahead, but if you don't want answers, why ask the questions?

I don't see the problem.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 11 of 14
(903 Views)
Bad attitude kurt. Either accept the help or RTFM.
Message 12 of 14
(781 Views)


@kurt_come wrote:
Is true that...
Every time I built a subvi, in a block with Local Variable, Labview produces reference.
In this procedure Labview , create mistake, in subvi---> A correct sub Vi becomes a incorrect sub VI

Yes, it is true! LabVIEW must act this way whenever you create a subVI from a code segment that contains local variables.

A local variable is just that: local to the current VI. It refers to a control or indicator on the current diagram, it cannot point to something in another subVI. 
If you create a subVI containing a local variable, LabVIEW is nice enough to replace the local variable with a reference to the object of the local variable to retain your original code functionality (kudos to the LabVIEW developers!) instead of breaking the subVI. For all practical purposes, the functionality of your code is retained. The reference points to the original object on the calling VI.

LabVIEW does not create a "mistake" at all!

From your code, it looks like you haven't been programming in LabVIEW for more than a very short time because it contains many mistakes that beginners typically make, especially if they are only familiar with text based code . You need to use sequence structures and local variable only sparingly or not at all, they are rarely needed.

LabVIEW is all about data flow! Once you truly grasp that concept, you'll never go back to text based code. 😄

As with anything new, there will be an initial activation barrier that needs to be overcome. For guidance, you've come to the right place. Ask questions and listen to the answers. There is no need to bark at us. 🙂

Back to your code. It is still not clear what your program is supposed to do. Which elements of the array do you want to compare, depending on the value of the index? Should the boolean be true if (1) all comparisons are true or (2) at least one comparison is true? Do you possibly only want to compare the single array element at index (but why would you use a FOR loop then?)?

Message 13 of 14
(761 Views)
Thank you for your help. It is very useful.
I would like explain what my program do. but I don't speak english.
I'm studying english.
 
thank you.
 
p.s. I don't bark.
 
0 Kudos
Message 14 of 14
(717 Views)