LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to pass cluster from Python to LabVIEW DLL

I need to use some code from LabVIEW in Python. LabVIEW code is used as DLL. So, I'm using ctypes library in Python. In one case, I need to pass clusters from Python to LabVIEW. I'm facing issues in passing clusters.

The problem is with particular ordering of elements inside the LabVIEW cluster(I am aware that clusters strictly follow ordering). My cluster has a double value and an integer array. When the double is the first element in the cluster things work well. But when the array is set as the first element and double as the second element, things don't work at all. I'm using LabVIEW 2015 and Python 3.

I have narrowed down this issue to the following example. The DLL in this example has 2 functions. Each function uses a cluster. Func1 uses cluster1 which is array followed by a double. While Func2 uses cluster which is double followed by array. Both these functions receive a clusteras input and just return the double value(as it is from the input cluster) as output.

When I call this DLL in Python, Func1is not working. The other function is working. I tried using the DLL in C. It is working in C. So, is there any specific reason why it is not working in Python? Has anyone tried it previously?

 

Find the sample codes in the .zip file attached.

0 Kudos
Message 1 of 1
(2,426 Views)