LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating a clone

I am relatively new to LabVIEW, trying to build a VI with multiple clones of the same subVI and having troubles.  I have copied the subVI I need but its outputs are those of the first one.
0 Kudos
Message 1 of 4
(2,319 Views)
It is not entirely clear what you are trying to do. What determines the output values of the subVI?
 
If each instance of the subVI needs to have its own data, try setting it to reentrant.
0 Kudos
Message 2 of 4
(2,317 Views)

I am creating a counter where each overflow sends a pulse to a subsequent counter upon resetting the original counter.

(0000) 0000.....0001.....0010.....0011.....0100.....0101.....0110.....0111......1000.....1001--->carry one and reset

(0001) 0000.....0001.....0010.....0011.....0100.....0101.....0110.....0111......1000.....1001--->carry one and reset

etc...

I have the first counting program as an input into the second but I get the same output from both.

 

P.S. how do I set a VI to 'reentrant'?

 

Thanks

0 Kudos
Message 3 of 4
(2,315 Views)

Hi why_ME,

I think that the problem you're having may be due the LabVIEW's dataflow paradigm.  If you have a wire connecting the output of subVI A to the input of subVI B, then subVI A will execute first.  After it completely finishes execution, the second subVI will execute.  These subVIs run consecutively and will only run one time each unless they are in a loop.  It's often very helpful to watch your program execute with Highlight Execution turned on (by clicking on the lightbulb button).  You can also just step through your program execution.

If you're new to LabVIEW, you may want to check out these helpful introductions to LabVIEW:
LabVIEW Three Hour Introduction Course
LabVIEW Six Hour Introduction Course

The way that you can make a VI reentrant is by going to File >> VI Properties >> Execution and checking the reentrant check box.  From your description of the problem, I don't think this is the solution, but it's possible. 

I hope this helps, if you have more trouble you could always post a small section of your code that demonstrates the problem you are having.
Good luck!
Megan
Applications Engineer

0 Kudos
Message 4 of 4
(2,294 Views)