ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL Issue, but no error

I'm trying to run a simple DLL from LabView.  After working out a few bugs, it doesn't cough at me when I configure the Call Library Function Node.  When I run the program though, nothing happens (meaning the function doesn't get called and no error returned).  All I have is the DLL call in the VI.  There is no error returned, but the code doesn't run the function called.  The DLL ran fine in a test application to make sure it would run.  But in LabView, nothing happens.

 

The return type is Bool, which I'm just using a signed 32-bit integer for.  There are several functions and I've tried them all.  The simplest doesn't have any argument to pass and still no success.

 

Ideas???

0 Kudos
Message 1 of 3
(2,949 Views)

Hmm...really hard to tell you what's going wrong, but let me just make some suggestions:

- You have written your DLL in C++? If you are using for example Visual C++ (Microsoft, the Express Edition is free), you can use the debugger. So compile your DLL as debug-version, copy it to your LV-Project-Directory. Then, start LabView, open your program. In C++, Select "Debug-->Attach to process". In the process list, you should see LabView. Select it and run the debugger. Set a breakpoint in your code (click on the left of the code). If you see a red filled circle, the code will be processed if you run your program. If it's only a non-filled circle, the point in your program will not be hit, so you have to check the configuration of your Call Library Function Node. Set a breakpoint to the beginning of your function. Now, start your LabView program. The breakpoint should be hit, and you can now process your C++-Code with "F10" and see what happens (If everything is going as desired).

- Try to write something like "return 10;" into your code and look if you get this value out of LabView as return-value.

 

Hope this helps.

 

Greetings, Christian


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
Message 2 of 3
(2,941 Views)

Hi,

 

I think the suggestions provided above are excellent but I would like to add another thing. I am not sure if you are calling the DLL properly, but please take a look at an example called Call DLL.vi which is found in the Example Finder (Help »Find Examples...). This example shows you how the Call Library Function Node should be configured for each datat ype. This might elucidate an error you have in the way you have configured your code.

Eli S.
National Instruments
Applications Engineer
Message 3 of 3
(2,921 Views)