Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Open FPGA VI reference is not working when used in parallel while loop

hi,
I am using PCI 7831R and PCI 6509.  I have installed FPGA, DAQ mx 8.0 and NI RIO drivers in my computer.
I am using all the DIO's in my FPGA card.  I have about 25 subVI's.  I am calling the FPGA VI in all these sub vi's using open FPGA reference method and i am closing it while exiting from that VI. 
At any time at least 5 of these VI's will be in running.  Some time's when i start running the code the code is getting stuck in any one of the open FPGA VI reference and it is not comming out of that. 
 
Am i doing any thing wrong.  am i not suppose to frequently open and close the FPGA VI reference or i not suppose to use multiple FPGA VI reference for the same VI.
 
 
Thanks in advance
 
Regards,
Visswanathan
0 Kudos
Message 1 of 2
(5,173 Views)

Hi Visswanathan,

You said that any 5 subvis will be running at the same time, each with an open/close FPGA reference. You cannot open a reference while one to the same thing is open, and so it sounds like some of your subvis are trying to open the reference that is already open. You could just pass the reference into the subvis from the main one rather than opening and closing it in every subvi. You could also want to use a sequence structure to ensure each reference is closed before the next one created.

If you need further assistance, could you be more specific as to how often the code is getting stuck? Can you figure out if it is exactly one subvi that is causing it to get stuck? I imagine that the problem is with the open and close, so hopefully my suggestion above will clear this up.

Stephanie

Message 2 of 2
(5,143 Views)