LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically calling an FPGA vi to view over the FP vi

Solved!
Go to solution
Solution
Accepted by topic author Gearmiester

I think we're making some progress.

 

Let's start with the simple thing: the "memory leak" in the dynamic calling example. You allocate a new instance of the reentrant dynamic VI on every loop iteration, although you only run it when the button is pushed. That leaves you with huge numbers of allocated, idle instances of the VI, and eventually you run out of memory. The solution is obvious - move open VI reference into the case structure. Close Reference should go into the case structure too.

 

That said, I suspect that your original issue, if it exists, can be solved without dynamically calling any VIs. If you can provide code that demonstrates a specific problem, or if you can provide a better (simpler?) explanation of the problem, then I can try to help with a solution.

 

Considering rewriting the code shown in the Untitled2.png screenshot to use a more standard producer-consumer pattern with a single event structure in its own loop at the top level. It's not a good idea to put event structures inside case structures, as has been explained in multiple threads in this forum.

0 Kudos
Message 11 of 12
(299 Views)

Thanks for the help nathand.

 

I am going to gothrough and see how to impliment some of the suggestions you posted and until I can write the code for the FPGA and see how it interacts with the main vi I will mark this thread as answered.

 

If I need help further down the road I will start a new thread.

0 Kudos
Message 12 of 12
(274 Views)