10-17-2012 09:59 AM - edited 10-17-2012 10:00 AM
Hello forum users,
I wanted to create a Labview DLL for testing purposes. So I created a Labview 2012 DLL project with two simple VIs (one adds two input values and outputs the result, the other one multiplies them). This works fine so far.
However, if I call them from a Python 3.3 script, the Labview runtime seems to crash. What can I do?
Here is the Python code:
from ctypes import * from sys import exit lvdll = WinDLL("labview-testdll.dll") add = lvdll.Addition add.argtypes = [c_int, c_int] add.restype = c_int print("Addition von 3 und 3:", add(3, 3)) exit()
The VIs look like so:
If I call this little Python script, I get this access violation error:
I attached the Labview project with the Python script in test-dll.zip. The crash log is also attached. Is this problem caused by Python or by Labview? What is wrong here?
10-18-2012 08:03 AM - edited 10-18-2012 08:03 AM
Hi,
I just tried and it seem to work for me:
I used LabVIEW 2012 x86 and Python 3.3.0 x86. What are you using?
Best regards
10-29-2012 05:31 AM
I used Labview 2012 f2 32 bit and tested with Python 3.2.3 and 3.3.0 (both 32 bit).
However, I just updated my Labview 2012 to f3, and now it works. Maybe I was a victim of the faulty patch f2 (http://forums.ni.com/t5/LabVIEW/2012-f2-patch/td-p/2176250).
Anyway, thanks for testing! 🙂