07-29-2013 08:02 AM
I have created a LabView project using this function and the VI works as expected. I created a DLL that includes the VI using this function so I can make the call from LabWindows. For some reason, using this function causes my LabWindows program to hang. Upon my first call of any LabView function in the DLL, I get a popup window for the function that includes the integral function and the program just hangs. I assume that this function is being loaded into memory since a different function is actually being called. I'm positive it's the integral function causing the hang. I can delete it and the problem goes away but so does my functionality. Has anyone used this function in a LabView DLL and called the function from LabWindows?
07-29-2013 10:33 AM - edited 07-29-2013 10:59 AM
I've never created a dll in LabVIEW before, so I might not be much help. However, does the following assist at all:
1. The Integral function most likely calls lvanlys.dll, an NI provided dll. Is it possible this dll is not accessible? Are you running on another machine, for example, where this depedency is not available? You could customise a copy of the VI and chop out the call to Integral x(t).vi in the Initialise case that has the dll dependency to see if this avoids the problem. If so, the lvanlys.dll dependency call is your problem.
2. You say you get a popup window just before the hang. What popup window is this? Is this caused by the Integral x(t) function? Or a popup panel of your own? Is it meant to pop up this panel, or is this unintentional?
3. The functionality is described by the help as a discrete integrator, this is simple to replicate in code yourself. Therefore, if you want to bypass this function to workaround this issue, try creating your own code using a simple shift register to perform cumulative integration of a value, as provided point by point.
Sorry if that's not great advice.
07-29-2013 10:42 AM
I am running on the same machine so a dependency shouldn't be a problem.
The popup window is a not intended. It has the name of the VI that includes the function in question. But like I mentioned, when it does pop up it is not the current function being called. It must just be getting loaded to memory for later execution.
I have used LavView DLL calls from LabWindows without a problem before. I'm not sure what is different about this LabView function that is causing the problem.
07-29-2013 11:00 AM
07-29-2013 11:04 AM
No. The function from the DLL that is being called when it popups up a window for a different function containing the Integral function is very simple. It is only downloading the FPGA. I don't imagine it is somehow calling that function also.
07-30-2013 07:10 AM
@JeffMotes wrote:
No. The function from the DLL that is being called when it popups up a window for a different function containing the Integral function is very simple. It is only downloading the FPGA. I don't imagine it is somehow calling that function also.
Are you trying to deploy FPGA code, with LabVIEW code, packaged into a dll, to be called by LabWindows?
07-30-2013 07:14 AM
Yes
07-31-2013 02:59 AM
@JeffMotes wrote:
Yes
Bimey. I didn't know that was possible. Deploying to FPGA from Windows, via a LabVIEW dll. Sorry, but that's not something I feel I can help with anymore. Maybe a blue member can jump in here and assist?
07-31-2013 09:49 AM
@Thoric wrote:
@JeffMotes wrote:
Yes
Bimey. I didn't know that was possible. Deploying to FPGA from Windows, via a LabVIEW dll. Sorry, but that's not something I feel I can help with anymore. Maybe a blue member can jump in here and assist?
That certainly sounds possible! Calling a dll created from a LabVIEW build to export a LabVIEW wrapper to lvanlys.dll from LabWindows SHOULD work (albiet, its a rather "round about" way to get to a solution.... seriously! call the lvanlys.dll function directly)
What may not be possible is the floating point math operations being targeted to a FPGA! What lead you down this "long strange trip?"
07-31-2013 10:23 AM
I might have confused this issue talking about FPGA. The function in question (PtbyPt Integral) isn't being executed on the FPGA. I have a LabView VI reading AZ rates from the gyro output executing on the FPGA. I have another VI that is grabbing the values from the FPGA and using Integral function to calculate direction. I have created a DLL that uses this function that I'm trying to call from labwindows.