LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple instances of a VI running on a RT target

Hello,

 

I have this problem when I go to run a VI on my PXI computer.  I run the VI, it then goes through the whole process of deploying it first and all of it's needed subVIs, variables, etc.  While it's deploying, I notice that it also is deploying 4 other instances of the same VI.  I can't seem to figure out why it keeps doing this and I also cannot seem to find a few to eliminate these other instances as well.  I feel that these additional instances of the same VI are causing problems and really could use some help.  Any ideas?

 

Thanks,

John

0 Kudos
Message 1 of 7
(3,916 Views)

First stupid question: Is the VI set to be reentrant?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(3,911 Views)

No, it is not reentrant.

0 Kudos
Message 3 of 7
(3,904 Views)

Thought I should provide as much information as possible here.

 

I have a PXI computer running this real time application.  I have a touch panel computer running as a host computer.  I have a VI on the touch panel computer which interacts with the PXI omputer using shared variables.  I attached a screen shot here.  As you can see it deploys the timed PID Loop2 VI: instance 3 and 0.  Further down in this deployment you see instance 1 and 2 listed.  If I can't figure out how to keep it from deploying all these instances of the same program, I would hope to at least figure out how to "kill" these other instances.  Rebooting the PXI computer and touch panel computer does not do it.

 

John

0 Kudos
Message 4 of 7
(3,892 Views)

Your PID VIs must be re-entrant. Did they start as copies of one of the NI-provided VIs?

 

Are you using multiple instances of this PID Timed Loop in your program? If so, it is the normal and desired behavior to have multiple instances, because generally a PID stores some state information (the integrator value) which you would not want shared between multiple instances that are controlling different things.

 

What problem is occuring that you're hoping to fix? That would be a much more useful answer. What makes you think the problem is these multiple instances?

0 Kudos
Message 5 of 7
(3,873 Views)

I've seen this a bunch too (with non-reentrant VIs), but I never really worried about it. It didn't seem to hurt anything. But you made me curious so I did a quick search for it and *may* have found something in corrective action request 319436. 

 

If this is the issue, it looks like you will see a "instance" for every express VI running in the caller. So if you have main.vi calling ExpressPID.vi in 3 places, you'd see main.vi, main.vi:0, main.vi:1, etc. It isn't actually deploying multiple copies, it is just reporting that it is. I can't promise this is what you're seeing but the information seems to match up. Bottom line, I wouldnt worry about it. 

0 Kudos
Message 6 of 7
(3,850 Views)

Thanks for the info on this.  I do have a couple of express VIs running within this timedPIDloop2.vi and there are also a few within subVIs of this one so I very likely might have 4 express VIs which would explain these multiple instances.  When I get the time, I should try and convert these to see if I see this problem go away.  I was never really sure if this was causing me problems, it was mostly just an annoyance that I wanted to try and resolve.  Thanks for the info.

 

John

0 Kudos
Message 7 of 7
(3,824 Views)