LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why I need to replace a subvi with itself?

Hello.

 

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.

Peter

0 Kudos
Message 1 of 4
(2,384 Views)

Peter,

 

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

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 2 of 4
(2,320 Views)

Peter,

 

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.

 

http://digital.ni.com/public.nsf/allkb/654877E62A97B72986256C95006F9B24

 

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

 

 

-Nick

Nick C | Software Project Manager - LabVIEW Real-Time | National Instruments
0 Kudos
Message 3 of 4
(2,299 Views)

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

 

Peter

0 Kudos
Message 4 of 4
(2,284 Views)