LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI:s with same subVI:s in it

Hi!

In a VI I have 6 signals that will go through same numerical manipulation. I made a subVI
and put 6 of that same subVI in the "main" VI.
I ran the VI and it worked fine but can there be trouble doing like this?

Also, If several VI:s, running at same time, including for example one same subVI, can this cause
problem? I mean if the VI:s would call that subVI at "same time"? Or can that never happen?

Thanks!
0 Kudos
Message 1 of 5
(3,182 Views)
Hello Fred,

your subvi's will not run at the same time, they will be processed one after the other.
But you can change this behaviour by setting "reentrant execution" in the vi properties->execution page. This will make your subvi reentrant, so that it will run in parallel with all other instances of this subvi.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,175 Views)
Hi

What means by a reentrant subvi and that it will run in parallel with all other instances of this subvi? When is it good
to use this?

/Fred
0 Kudos
Message 3 of 5
(3,157 Views)
Hello fred,

the Labview Help (see AN114, it should come with your Labview installation) says:
Reentrant execution is useful in the following situations:
• When a VI waits for a specified length of time or until a timeout occurs
• When a VI contains data that should not be shared among multiple instances of the same VI

If you want your subvi's to work in parallel, they have to be reentrant.

For more information read this application note (subtitel "Simultaneously Calling SubVIs from Multiple Places")!

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(3,152 Views)
thanks!
0 Kudos
Message 5 of 5
(3,144 Views)