Showing results for 
Search instead for 
Did you mean: 

Why I need to replace a subvi with itself?



I am working with a device with FPGA in it and the communication is handled by device driver and API functions. I succesfully imported the API functions to LabVIEW and I created a sequence of callings to these API functions to send and retrieve informations to the FPGA through USB port.


The problem is, that a subvi (created from a DLL function in the process of importing the DLL to LV) which is supposed to configure the FPGA is not working properly when I call it for the first time after starting LV, but when I go to the block diagram and replace one of the other subvis (doesn´t matter which one) with itself, the configuration subvi starts working and works until I don´t exit LV again.


In other words, if I start my VI and run it, I get error messages from FPGA at the stage of configuration, then I right-click on some of other subvi icons I have on the block diagram and choose replace, and replace it with itself and run the VI again, it just works. Any ideas what could be wrong with it?


I am using LV2010


Thanks for your responses.


0 Kudos
Message 1 of 4



I am not familiar with this behavior. The way I read this is that your sub VI only works once you have replaced another one of the sub VIs with an exact copy of itself? Would you mind posting a screen shot of your code. Seeing the block diagram may help me to track down the source of this strange behavior.



Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 2 of 4



Let's try a mass compile of all your VIs. We do this by the following:


Tools >> Advanced >> Mass Compile


Select the directory that all of those subVIs are located in and select "Mass Compile". The link below explains what a mass compile accomplishes.


After you try this close and reopen LabVIEW. Let me know how this works




Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 3 of 4

Thanks, I will try this tommorow in the lab, will let you know about the results.



0 Kudos
Message 4 of 4