LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Attempting to Launch Data Control windows using reentrant execution using LV7.1

Need to get several devices connected to one Data collection System. Each Window will poll its assigned device and get a data packet which needs to go into a histograph. All the devices then need to pass their data back into the main window to be calculate the overall state of the system.

 

Now I am trying to create a single VI that will be reentrant and can be repeatedly called, handed a device, and go on it's way. I can't seem to get this idea to work though. I have included my testbed VIs I am trying to just get the reentrant code to open several FPs but with no luck so far.

 

and clues what is wrong with it or is this not possible on 7.1?

Download All
0 Kudos
Message 1 of 13
(4,006 Views)

Hi BCharlton44,

rename your subvi to *.vit. It becomes a VI template and you'll get an instance with every call.

 

Mike

Message 2 of 13
(3,993 Views)

Follow Mike's advise.

 

LV 7.1 could not show multiple FPs of re-entrant VIs.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 13
(3,984 Views)

 


@MikeS81 wrote:

Hi BCharlton44,

rename your subvi to *.vit. It becomes a VI template and you'll get an instance with every call.

 

Mike


Wow, I didn't know you could do that. See, you learn something new everyday!

 

Cory K
0 Kudos
Message 4 of 13
(3,982 Views)

Is there anything about a VI "template" that really seperates it from a normal VI?

also my secondary doesn't seem to run when I call it. It just sits there....how do I make it run without manually hitting the run button?

0 Kudos
Message 5 of 13
(3,976 Views)

@BCharlton44 wrote:

Is there anything about a VI "template" that really seperates it from a normal VI?

also my secondary doesn't seem to run when I call it. It just sits there....how do I make it run without manually hitting the run button?


Yes, everytime you open a new ref for it, a new instance is created with a new name.

 

Invoke node >>> Run

 

To run the VI

 

Search on "Ben Nugget occurence" for an example that loads and runs many.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 13
(3,961 Views)

I am still having problems making the opened VIT "run". It opens but then it doesn't actually do anything. I am looking through that "nugget" but since everything is a rentrant and you can't debug reentrant VIs it is hard to really compare at times.

0 Kudos
Message 7 of 13
(3,925 Views)

Drop some break-points and reduce the number of templates until you figure it out.

 

The gang realy beat-up the idea re-entrancy it that thread, if you have nort reviewed the replies I suggest a quick read of them.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 13
(3,918 Views)

I just can not figure out how to make my template "run" when I open it. It just sits there and doesn't do anything.

Download All
0 Kudos
Message 9 of 13
(3,909 Views)

Your VI worked fine on my computer. It can run multiple instances, and they all run and produce data.

 

You may want to start troubleshooting at the main VI before you go to the effort of using breakpoints to narrow down your .vit file. Since it's not re-entrant, you can troubleshoot it a bit more easily.

 

My first suggestion: add an error wire from your "Run" method. If there's an error there, it's not going to be seen, since it's not hooked up to anything (there's an error in, but no error out).

Caleb Harris

National Instruments | http://www.ni.com/support
Message 10 of 13
(3,886 Views)