LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a SubVi unique for multiple calls without interference to each other

Solved!
Go to solution

Hi Application Engineers,

 

I built a SubVi that takes N consecutive points of running data in sequence, namely Get sequence VI. There is a 2D array that contains X and Y data points. I wanted to get sequences of X and Y separately by calling the Get sequence VI using X and Y value separately in parallel in a loop, however, I got mixed  data of X and Y from using either X or Y data. 

 

Then I saved the same SubVi with different names, Get sequence A and Get sequence B, then call Get sequence A using X data and call Get sequence B using Y data, both calls worked properly.

 

The main VI is Two Calls for the same SubVi

 

edmonton_0-1611614872346.png

 

edmonton_1-1611614934841.png

 

 

I want to know how to make the Get sequence VI independent to different calls?

 

I use LabView 2015.

 

Regards,

Gu

 
 

 

 

0 Kudos
Message 1 of 5
(1,061 Views)
Solution
Accepted by topic author edmonton

If each subVI instance should be an independent clone, make it reentrant.

(VI properties...execution...preallocated clone reentrant execution)

 

(Btw, it is really annoying if all VIs are maximized to the screen. How can you get any work done?)

 

What is the logic behind creating these huge mostly redundant data structures.? Seems quite pointless. What are you actually trying to do with all this?

Message 2 of 5
(1,025 Views)

Hi 

 

 

 

 

0 Kudos
Message 3 of 5
(1,013 Views)

Hi  

 

 

The point-by-point peak detector VI outputs a "True" when a peak is found. I realize that it stops at the center of each peak rather than at the end of each full peak.  I found it by change the for loop to a conditional loop and set the loop to stop when the first peak is found.  The problem is that the ramp pattern VI can not work properly. The ramp includes the first half peak rather than its base. 

 

To solve the problem, I used the N points running sequence for iteration to pass the peak center and covers a whole peak for the subsequent ramp pattern Vi to work properly, and then go back to get the center point (or the peak position).

 

Regards,

Gu 

0 Kudos
Message 4 of 5
(1,007 Views)
Solution
Accepted by topic author edmonton

@edmonton wrote:

 


NO!!!! Don't overthink this. Leave all priority settings at normal. LabVIEW is fully capable to perfectly manage multitasking for you.

 

(time critical priority is actually very dangerous because things like the user interface will get deprioritized, meaning that your program will react very sluggishly to user interactions and things won't update in time)

 

 

Message 5 of 5
(1,004 Views)